> ## Documentation Index
> Fetch the complete documentation index at: https://docs.webrouter.net/llms.txt
> Use this file to discover all available pages before exploring further.

# NewsAPI.org

> Search news articles from worldwide sources and blogs, top headlines by country, category or source, and the list of sources.

![](https://mintcdn.com/webrouter/JBFYvcRI1PVnd4YX/logo/data-apis/newsapi.webp?fit=max\&auto=format\&n=JBFYvcRI1PVnd4YX\&q=85\&s=1e08325e974fcd1bb88c88d8d4b5531d)

[Web Catalog · Search](https://docs.webrouter.net/data-apis.md?category=search)

Needs&#x20;

`NEWSAPI_API_KEY`

Endpoints

3

Auth

Key in header

[Vendor docs](https://newsapi.org/docs)

&#x20;·&#x20;

[Pricing](https://newsapi.org/pricing)

## Setup

| Variable | | What it is |
| - | - | - |
| `NEWSAPI_API_KEY` | required | a NewsAPI.org key (newsapi.org/account). Sent in the X-Api-Key header. |

Put them in your environment or `.env`; [Data APIs](https://docs.webrouter.net/vendors.md) covers the other ways.

## Notes

* Developer (free) plan: 100 requests a day, articles delayed 24 hours, search back one month only, and for development and testing only (not staging or production).
* Answers carry status, totalResults and articles; page with page and pageSize.

## Endpoints

GET

Search all articles

Articles matching keywords, sources, domains, dates and language.

[Open](#newsapi-everything)

GET

Get top headlines

Breaking headlines by country, category, sources or keyword.

[Open](#newsapi-top-headlines)

GET

List news sources

Sources available to the other endpoints, with ID, category, language and country.

[Open](#newsapi-sources)

### Search all articles

GET

`/everything`

`newsapi.everything`

Articles matching keywords, sources, domains, dates and language.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `q`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Keywords or phrases; quotes for exact, + required, - excluded, AND/OR/NOT with parentheses. Max 500 characters.
      </td>
    </tr>

    <tr>
      <td>
        `searchIn`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated: title, description, content. Default all.
      </td>
    </tr>

    <tr>
      <td>
        `sources`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated source IDs (max 20) from newsapi.sources.
      </td>
    </tr>

    <tr>
      <td>
        `domains`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated domains to restrict to.
      </td>
    </tr>

    <tr>
      <td>
        `excludeDomains`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated domains to exclude.
      </td>
    </tr>

    <tr>
      <td>
        `from`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Oldest article, ISO 8601 date or datetime.
      </td>
    </tr>

    <tr>
      <td>
        `to`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Newest article, ISO 8601 date or datetime.
      </td>
    </tr>

    <tr><td>`language`</td><td>string</td><td>query</td><td>ISO 639-1 code. One of `ar`, `de`, `en`, `es`, `fr`, `he`, `it`, `nl`, `no`, `pt`, `ru`, `sv`, `ud`, `zh`</td></tr>
    <tr><td>`sortBy`</td><td>string</td><td>query</td><td>Default publishedAt. One of `relevancy`, `popularity`, `publishedAt`</td></tr>

    <tr>
      <td>
        `pageSize`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Results per page, default and max 100.
      </td>
    </tr>

    <tr>
      <td>
        `page`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page number, default 1.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://newsapi.org/docs/endpoints/everything) · Same job: [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-news-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-news), [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-news-topics), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-google-news), [Benzinga](https://docs.webrouter.net/data-apis/benzinga.md#benzinga-news), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-news-search)

```python Python theme={null}
router.call_data_api("newsapi.everything")
```

```text MCP theme={null}
call_data_api(endpoint="newsapi.everything")
```

> [!NOTE]
>
> * How far back from and to can reach depends on the plan (one month on Developer).

### Get top headlines

GET

`/top-headlines`

`newsapi.top_headlines`

Breaking headlines by country, category, sources or keyword.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        `country`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        ISO 3166-1 alpha-2 country; the docs list us. Not with sources.
      </td>
    </tr>

    <tr><td>`category`</td><td>string</td><td>query</td><td>Category; not with sources. One of `business`, `entertainment`, `general`, `health`, `science`, `sports`, `technology`</td></tr>

    <tr>
      <td>
        `sources`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Comma-separated source IDs; not with country or category.
      </td>
    </tr>

    <tr>
      <td>
        `q`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Keywords or a phrase.
      </td>
    </tr>

    <tr>
      <td>
        `pageSize`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Default 20, max 100.
      </td>
    </tr>

    <tr>
      <td>
        `page`
      </td>

      <td>
        integer
      </td>

      <td>
        query
      </td>

      <td>
        Page number.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://newsapi.org/docs/endpoints/top-headlines) · Same job: [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-news-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-news), [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-news-topics), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-google-news), [Benzinga](https://docs.webrouter.net/data-apis/benzinga.md#benzinga-news), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-news-search)

```python Python theme={null}
router.call_data_api("newsapi.top_headlines")
```

```text MCP theme={null}
call_data_api(endpoint="newsapi.top_headlines")
```

### List news sources

GET

`/top-headlines/sources`

`newsapi.sources`

Sources available to the other endpoints, with ID, category, language and country.

Input

<table>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        In
      </th>

      <th>
        Notes
      </th>
    </tr>
  </thead>

  <tbody>
    <tr><td>`category`</td><td>string</td><td>query</td><td>Filter by category. One of `business`, `entertainment`, `general`, `health`, `science`, `sports`, `technology`</td></tr>
    <tr><td>`language`</td><td>string</td><td>query</td><td>Filter by language. One of `ar`, `de`, `en`, `es`, `fr`, `he`, `it`, `nl`, `no`, `pt`, `ru`, `sv`, `ud`, `zh`</td></tr>

    <tr>
      <td>
        `country`
      </td>

      <td>
        string
      </td>

      <td>
        query
      </td>

      <td>
        Filter by country code, e.g. us, gb, de.
      </td>
    </tr>
  </tbody>
</table>

[Vendor docs](https://newsapi.org/docs/endpoints/sources) · Same job: [akta.pro](https://docs.webrouter.net/data-apis/akta.md#akta-news-search), [Alpha Vantage](https://docs.webrouter.net/data-apis/alphavantage.md#alphavantage-news), [Andi AI Search](https://docs.webrouter.net/data-apis/andi.md#andi-news-topics), [AnyAPI](https://docs.webrouter.net/data-apis/anyapi.md#anyapi-google-news), [Benzinga](https://docs.webrouter.net/data-apis/benzinga.md#benzinga-news), [Context.dev](https://docs.webrouter.net/data-apis/branddev.md#branddev-news-search)

```python Python theme={null}
router.call_data_api("newsapi.sources")
```

```text MCP theme={null}
call_data_api(endpoint="newsapi.sources")
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.