News API for AI agents and LLMs

World News API gives an AI agent current and past news through a REST API and an MCP server: 170,000+ new articles a day from 210+ countries in 86+ languages, with history back to January 1, 2022. A search costs 1 point plus 0.01 points per result, so a tool call that returns 5 articles costs 1.05 points and the free plan's 50 points a day cover about 47 such calls.

  • MCP server: world-news-api-mcp on GitHub, configured with your key in WORLD_NEWS_API_KEY. Works with Claude Desktop, Cursor and other MCP clients.
  • Tools to expose: search-news (1 point + 0.01 per result) and top-news (1 point) for discovery, retrieve-news (0.1 points per article) and extract-news (2 points) for grounding.
  • Full text: search results carry the article text, summary, url and publish_date, so the model can cite its sources.
  • Short headlines: top-news with headlines-only=true returns only id, title and URL per story, which keeps the model's context small (the call still costs 1 point).
  • Auth: api-key query parameter or x-api-key header. Free plan: 50 points a day, 1 request per second, last month of history, backlink required.

Connect an MCP client

The quickest way to give Claude Desktop, Cursor or another MCP client access to news is the World News API MCP server. Install it with the instructions on the MCP GitHub page, open your client's MCP config file and add this entry with your API key:

{
  "mcpServers": {
    "world-news-api": {
      "command": "world-news-api-mcp",
      "env": {
        "WORLD_NEWS_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Restart the client and ask about the news. When the model decides World News API can answer, it calls the API for you. The MCP setup guide has a screenshot and a video of a conversation in Claude Desktop.

Function calling with search-news and top-news

If you run your own agent loop, wrap two endpoints as tools. search-news answers "what happened with X" questions and top-news answers "what is the news today in country Y". Return only the fields the model needs, which keeps context tokens down; the points depend on the endpoint and the number of results, not on the fields you keep. This sketch uses plain requests, no SDK:

import requests

API = "https://api.worldnewsapi.com"
HEADERS = {"x-api-key": "YOUR_API_KEY"}


def search_news(text, language="en", earliest_publish_date=None, number=5):
    params = {"text": text, "language": language, "number": min(number, 10)}
    if earliest_publish_date:
        params["earliest-publish-date"] = earliest_publish_date
    r = requests.get(f"{API}/search-news", params=params, headers=HEADERS, timeout=30)
    r.raise_for_status()
    return [{"id": n["id"], "title": n["title"], "url": n["url"],
             "publish_date": n["publish_date"], "summary": n.get("summary")}
            for n in r.json()["news"]]


def top_news(source_country, language, date=None):
    params = {"source-country": source_country, "language": language,
              "headlines-only": "true", "max-news-per-cluster": 1}
    if date:
        params["date"] = date
    r = requests.get(f"{API}/top-news", params=params, headers=HEADERS, timeout=30)
    r.raise_for_status()
    return [cluster["news"][0] for cluster in r.json()["top_news"]]


# JSON Schema tool definitions. Most LLM APIs take a name, a description and a
# parameter schema; rename the keys to the format your provider expects.
TOOLS = [
    {"name": "search_news",
     "description": "Search news articles by keywords. Returns id, title, url, publish_date, summary.",
     "parameters": {"type": "object", "required": ["text"], "properties": {
         "text": {"type": "string", "description": "3-100 characters. Quotes for phrases, OR, -exclude."},
         "language": {"type": "string", "description": "ISO 639-1 code, e.g. en"},
         "earliest_publish_date": {"type": "string", "description": "YYYY-MM-DD"},
         "number": {"type": "integer", "minimum": 1, "maximum": 10}}}},
    {"name": "top_news",
     "description": "Top headlines of a country for a day, one per story.",
     "parameters": {"type": "object", "required": ["source_country", "language"], "properties": {
         "source_country": {"type": "string", "description": "ISO 3166 code, e.g. us"},
         "language": {"type": "string", "description": "ISO 639-1 code spoken in that country"},
         "date": {"type": "string", "description": "YYYY-MM-DD, default today"}}}},
]


def run_tool(name, arguments):
    return {"search_news": search_news, "top_news": top_news}[name](**arguments)

Tips for the tool descriptions: tell the model that text needs at least 3 characters, that all words are required unless joined with an uppercase OR, and that a minus sign excludes a word. For questions about people and companies, add an entities argument such as ORG:Tesla or PER:Elon Musk (see semantic types). The same call as curl:

curl -G "https://api.worldnewsapi.com/search-news" \
  -H "x-api-key: YOUR_API_KEY" \
  --data-urlencode "text=earth quake" \
  -d "language=en" -d "earliest-publish-date=2024-04-01" -d "number=5"

Example response (shortened). This is the documented example response for the same search with the default number of 10; the model sees the fields your wrapper keeps:

{
  "offset": 0,
  "number": 10,
  "available": 83,
  "news": [
    {
      "id": 206030983,
      "title": "Nearly 30 aftershocks recorded around NJ quake epicenter since Friday",
      "text": "New Jersey continues to shake after Friday’s 4.8-magnitude earthquake ...",
      "summary": "Twenty nine areas around Whitehouse Station, NJ, which was the epicenter of the quake, have since reported rumbles.",
      "url": "https://nypost.com/2024/04/06/us-news/nearly-30-aftershocks-recorded-around-nj-quake-epicenter/",
      "publish_date": "2024-04-06 22:44:18",
      "authors": ["Deirdre Bardolf"],
      "category": "environment",
      "language": "en",
      "source_country": "us",
      "sentiment": -0.545
    }
  ]
}

Grounding and RAG with retrieve-news and extract-news

For grounded answers, retrieve at question time and pass the article text to the model together with its URL and publish date, so every claim in the answer can point to a source. A pattern that keeps tokens low: the agent first sees headlines or summaries, picks the articles it needs, and only then you fetch their full text by id with retrieve-news at 0.1 points per article. When a user pastes a link, extract-news returns the title, text, images, authors and publish date of that page for 2 points, or 4 with analyze=true for entities and sentiment.

# Uses requests, API and HEADERS from the example above.
def grounding_context(ids, max_chars=4000):
    r = requests.get(f"{API}/retrieve-news", params={"ids": ",".join(map(str, ids))},
                     headers=HEADERS, timeout=30)
    r.raise_for_status()
    blocks = []
    for n in r.json()["news"]:
        blocks.append(f"[{n['id']}] {n['title']} ({n['publish_date']}) {n['url']}\n"
                      + n["text"][:max_chars])
    return "\n\n".join(blocks)

The news data for RAG guide has a longer walkthrough. Extraction works best on public pages; the extract-news docs note that paywalled articles may come back incomplete.

Keep costs predictable

Every call has a fixed price in points, so you can budget per question before you ship:

Tool callRequestPoints
Search, 5 resultssearch-news?text=...&number=51.05
Search, 100 resultssearch-news?text=...&number=1002
Top headlines of a countrytop-news?source-country=us&language=en&headlines-only=true1
Full text of 3 articlesretrieve-news?ids=1,2,30.3
Read a pasted URLextract-news?url=...2 (4 with analyze=true)

An agent that makes 3 searches of 5 results and one retrieve of 3 articles per question uses 3.45 points. That is about 14 questions a day on the free plan, about 144 on Reporter (500 points a day, $39 a month), and each further 1,000 questions on Reporter cost 3,450 points, or $10.35 at $0.003 per point. Cap number at 5 to 10, limit tool calls per conversation, and log the X-API-Quota-Request and X-API-Quota-Left response headers. On the free plan the API answers HTTP 402 once the day's points are used; quotas reset at midnight UTC (see quotas and rate limiting).

What the API does not do for agents

  • No vector search. Search is by keywords, entities and filters. If you want embeddings, compute them yourself from the text field.
  • No hosted MCP endpoint is documented. The setup guide covers a server your client starts locally. GNews, NewsAPI.ai and NewsCatcher run hosted MCP servers (GNews, NewsAPI.ai, NewsCatcher) and NewsData.io ships newsdata-mcp, which may suit you better if you need a remote URL. Checked November 22, 2026.
  • No stored index by default. The terms of use do not allow copying or storing the data the API returns, and caching user-requested data for up to 1 hour needs prior written permission. If your agent needs a persistent news index, write to [email protected] first.
  • Sentiment only for English and German. Articles in other languages have no sentiment score.

Related: news API in Python, get a free news API key, news API comparison, media monitoring.

Frequently asked questions

Does World News API have an MCP server?

Yes. The World News API MCP server is on GitHub at github.com/ddsky/world-news-api-mcp. After installing it, add it to your client's MCP config with the command world-news-api-mcp and your key in WORLD_NEWS_API_KEY. The setup guide uses Claude Desktop; Cursor and other MCP clients are configured the same way.

How much does a news tool call cost?

A search-news call costs 1 point plus 0.01 points per result, so 5 results cost 1.05 points. top-news costs 1 point, retrieve-news 0.1 points per article and extract-news 2 points. The free plan includes 50 points a day.

Can I use World News API for RAG?

Yes, for retrieval at question time: search-news returns the full article text with title, URL and publish date, which you pass to the model as context with citations. The terms of use do not allow storing API data without a separate written agreement, so ask before you build a persistent index.

How do I stop an agent from using up my quota?

Cap number at 5 to 10 (search-news costs 0.01 points per result), limit tool calls per question and read the X-API-Quota-Request and X-API-Quota-Left response headers. On the free plan the API returns HTTP 402 when the day's points are used, and quotas reset at midnight UTC.

Last updated November 22, 2026 by the World News API team. Spotted an error? Tell us at [email protected] or on Discord.

More from World News API

  • Compare news APIs
    World News API next to NewsAPI.org, NewsData.io, GNews, Mediastack and others.
  • Guides
    Step-by-step tutorials with working code.
  • Use cases
    AI agents, finance, media monitoring and research.
  • Documentation
    Every endpoint with parameters, examples and quotas.

Get a free API key