News API · Capability

News API — Articles

News API — Articles. 1 operations. Lead operation: Search all articles. Self-contained Naftiko capability covering one News Api business surface.

Run with Naftiko News ApiArticles

What You Can Do

GET
Geteverything — Search all articles
/v1/everything

MCP Tools

search-all-articles

Search all articles

read-only idempotent

Capability Spec

news-articles.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: News API — Articles
  description: 'News API — Articles. 1 operations. Lead operation: Search all articles. Self-contained Naftiko capability
    covering one News Api business surface.'
  tags:
  - News Api
  - Articles
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    NEWS_API_API_KEY: NEWS_API_API_KEY
capability:
  consumes:
  - type: http
    namespace: news-articles
    baseUri: https://newsapi.org/v2
    description: News API — Articles business capability. Self-contained, no shared references.
    resources:
    - name: everything
      path: /everything
      operations:
      - name: geteverything
        method: GET
        description: Search all articles
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: q
          in: query
          type: string
          description: Keywords or phrases to search for in article title and body.
        - name: searchIn
          in: query
          type: string
          description: Fields to restrict the q search to. Comma-separated list of title, description, content.
        - name: sources
          in: query
          type: string
          description: Comma-separated string of identifiers for the news sources or blogs (max 20).
        - name: domains
          in: query
          type: string
          description: Comma-separated string of domains to restrict the search to.
        - name: excludeDomains
          in: query
          type: string
          description: Comma-separated string of domains to remove from results.
        - name: from
          in: query
          type: string
          description: A date and optional time for the oldest article allowed (ISO 8601).
        - name: to
          in: query
          type: string
          description: A date and optional time for the newest article allowed (ISO 8601).
        - name: language
          in: query
          type: string
          description: The 2-letter ISO-639-1 code of the language.
        - name: sortBy
          in: query
          type: string
          description: The order to sort articles in.
        - name: pageSize
          in: query
          type: integer
          description: The number of results to return per page.
        - name: page
          in: query
          type: integer
          description: Use this to page through the results.
    authentication:
      type: apikey
      key: apiKey
      value: '{{env.NEWS_API_API_KEY}}'
      placement: query
  exposes:
  - type: rest
    namespace: news-articles-rest
    port: 8080
    description: REST adapter for News API — Articles. One Spectral-compliant resource per consumed operation, prefixed with
      /v1.
    resources:
    - path: /v1/everything
      name: everything
      description: REST surface for everything.
      operations:
      - method: GET
        name: geteverything
        description: Search all articles
        call: news-articles.geteverything
        with:
          q: rest.q
          searchIn: rest.searchIn
          sources: rest.sources
          domains: rest.domains
          excludeDomains: rest.excludeDomains
          from: rest.from
          to: rest.to
          language: rest.language
          sortBy: rest.sortBy
          pageSize: rest.pageSize
          page: rest.page
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: news-articles-mcp
    port: 9090
    transport: http
    description: MCP adapter for News API — Articles. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: search-all-articles
      description: Search all articles
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: news-articles.geteverything
      with:
        q: tools.q
        searchIn: tools.searchIn
        sources: tools.sources
        domains: tools.domains
        excludeDomains: tools.excludeDomains
        from: tools.from
        to: tools.to
        language: tools.language
        sortBy: tools.sortBy
        pageSize: tools.pageSize
        page: tools.page
      outputParameters:
      - type: object
        mapping: $.