mcp-newsapi
v1.0.2NewsAPI.ai (Event Registry): 10 read-only MCP tools for news articles, events, autosuggest, trends
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
search_articles
Search news articles (NewsAPI.ai / Event Registry). Cost: 1 token per call (measured live) when limited to the last 31 days (the default); querying the historical archive (allow_archive=true) costs extra tokens per year touched. At least one of keyword / concept_uris / category_uris / source_uris / location_uris is required. Prefer concept_uris (from suggest_concepts, which is free) over free-text keyword for any company, person, place or organisation: keyword is for free terms/topics and is noisy with common words (e.g. "Telefónica" also matches the Spanish adjective "telefónica"), so resol…
| Parameter | Type | Description |
|---|---|---|
allow_archive | boolean | Default false: search only the last 31 days (cheapest). Set true to reach the historical archive, which costs extra tokens per year queried; requires date_start and a range of at most 1 year. |
body_len | integer | Max body characters per article, 0-5000 (default 300; 0 = no body). |
category_uris | Category URIs, e.g. "news/Business" (use suggest_categories). OR-ed. Accepts a single string or an array of strings. | |
concept_uris | Concept URIs for entities: companies, people, places, organisations. PREFERRED over keyword for any named entity: first call suggest_concepts (free) to resolve the name, then pass the returned `uri` h… | |
count | integer | Articles per page, 1-100 (default 10). Keep small to save context. |
data_types | Content types to include (default: all). Accepts a single string or an array of strings. | |
date_end | string | Latest date, YYYY-MM-DD (inclusive); must be >= date_start. With allow_archive the date_start → date_end (default today) span may be at most 1 year. |
date_start | string | Earliest date, YYYY-MM-DD (inclusive). Must be within the last 31 days unless allow_archive=true, which makes date_start mandatory. |
ignore_keyword | string | Exclude articles mentioning this. |
ignore_source_uris | Exclude these news sources. Accepts a single string or an array of strings. | |
include_duplicates | boolean | Include duplicate/syndicated articles (default false). |
keyword | string | Free-text keyword or phrase, for topics and general terms (e.g. "inflation", "wildfire"). Do NOT use it for companies, people, places or organisations: common words double as names (e.g. "Telefónica"… |
keyword_loc | string | Where to look for the keyword (default: the API default, body). |
keyword_search_mode | string | How to match the keyword: simple (any word), exact, or phrase. |
lang | 3-letter ISO 639-3 language codes, e.g. "spa" or ["eng", "spa"]. OR-ed. Accepts a single string or an array of strings. | |
location_uris | Location URIs where the news happened (use suggest_locations). OR-ed. Accepts a single string or an array of strings. | |
max_sentiment | number | Maximum sentiment, -1 to 1 (English articles only). |
min_sentiment | number | Minimum sentiment, -1 to 1 (English articles only). |
page | integer | Result page, starting at 1 (default 1). |
sort_asc | boolean | Ascending order (default false). |
sort_by | string | Sort order (default date). "rel" ranks by relevance to the query. |
source_uris | News source URIs, e.g. "bbc.co.uk" (use suggest_sources). OR-ed. Accepts a single string or an array of strings. |
get_article
Get one article by its URI (the `uri` returned by search_articles), with a longer body (body_len, default 3000 chars). Cost: 1 token per call. Use after search_articles when you need to read the article rather than just its headline.
| Parameter | Type | Description |
|---|---|---|
article_uri * | string | Article URI as returned by search_articles (e.g. "8512345678"). |
body_len | integer | Max body characters, 0-20000 (default 3000). |
search_events
Search news EVENTS: clusters of articles about the same real-world happening, with a title, summary, date, location, key concepts and article count. Best for "what is happening with X" — one event replaces dozens of near-duplicate articles. Cost: 5 tokens (measured live) per call within the last 31 days (default); allow_archive=true costs extra per year touched. At least one of keyword / concept_uris / category_uris / source_uris / location_uris is required. Defaults to 10 events, newest first; use sort_by="size" for the biggest stories. Use get_event for details on one. For companies, peopl…
| Parameter | Type | Description |
|---|---|---|
allow_archive | boolean | Default false: search only the last 31 days (cheapest). Set true to reach the historical archive, which costs extra tokens per year queried; requires date_start and a range of at most 1 year. |
category_uris | Category URIs, e.g. "news/Business" (use suggest_categories). OR-ed. Accepts a single string or an array of strings. | |
concept_uris | Concept URIs for entities: companies, people, places, organisations. PREFERRED over keyword for any named entity: first call suggest_concepts (free) to resolve the name, then pass the returned `uri` h… | |
count | integer | Events per page, 1-50 (default 10). |
date_end | string | Latest date, YYYY-MM-DD (inclusive); must be >= date_start. With allow_archive the date_start → date_end (default today) span may be at most 1 year. |
date_start | string | Earliest date, YYYY-MM-DD (inclusive). Must be within the last 31 days unless allow_archive=true, which makes date_start mandatory. |
keyword | string | Free-text keyword or phrase, for topics and general terms (e.g. "inflation", "wildfire"). Do NOT use it for companies, people, places or organisations: common words double as names (e.g. "Telefónica"… |
lang | 3-letter ISO 639-3 language codes, e.g. "spa" or ["eng", "spa"]. OR-ed. Accepts a single string or an array of strings. | |
location_uris | Location URIs where the news happened (use suggest_locations). OR-ed. Accepts a single string or an array of strings. | |
min_articles_in_event | integer | Only events covered by at least this many articles (filters noise). |
page | integer | Result page, starting at 1 (default 1). |
sort_asc | boolean | Ascending order (default false). |
sort_by | string | Sort order (default date). "size" = most articles first. |
source_uris | News source URIs, e.g. "bbc.co.uk" (use suggest_sources). OR-ed. Accepts a single string or an array of strings. | |
summary_len | integer | Max summary characters per event, 0-2000 (default 300). |
get_event
Get one event by URI (the `uri` from search_events, e.g. "eng-1234567"). Returns its summary info by default; set include_articles=true to instead list the articles covering it (paginated, default 5 per page, body truncated to body_len). Cost: 5 tokens (info view) or 1 (articles view), measured live.
| Parameter | Type | Description |
|---|---|---|
event_uri * | string | Event URI, e.g. "eng-1234567". |
articles_count | integer | Articles per page when include_articles=true, 1-50 (default 5). |
articles_page | integer | Articles page, from 1 (default 1). |
body_len | integer | Max body characters per article, 0-5000 (default 300). |
include_articles | boolean | Return the event’s articles instead of its info (default false). |
suggest_concepts
Resolve a name to concept URIs (people, organisations, places, Wikipedia topics). Pass the returned `uri` as concept_uris to search_articles / search_events — much more precise than a keyword. Does not consume search tokens. Sorted by prominence in the news; check `type` and `label` to pick the right homonym.
| Parameter | Type | Description |
|---|---|---|
prefix * | string | Text typed so far (a name or the start of one), e.g. "Telef" or "bbc". |
count | integer | Max suggestions, 1-50 (default 10). |
lang | string | Language of the prefix, ISO 639-3 (default eng). |
page | integer | Result page, from 1 (default 1). |
types | Restrict to these concept kinds (default: all). Accepts a single string or an array of strings. |
suggest_categories
Resolve a topic name to category URIs (e.g. "news/Business", "dmoz/Sports/Soccer"). Pass the `uri` as category_uris to search_articles / search_events. Does not consume search tokens.
| Parameter | Type | Description |
|---|---|---|
prefix * | string | Text typed so far (a name or the start of one), e.g. "Telef" or "bbc". |
count | integer | Max suggestions, 1-50 (default 10). |
page | integer | Result page, from 1 (default 1). |
suggest_sources
Resolve a publication name or domain to news source URIs (e.g. "bbc.co.uk"). Pass the `uri` as source_uris to search_articles / search_events. Does not consume search tokens.
| Parameter | Type | Description |
|---|---|---|
prefix * | string | Text typed so far (a name or the start of one), e.g. "Telef" or "bbc". |
count | integer | Max suggestions, 1-50 (default 10). |
data_types | Restrict to sources of these content types (default: all). Accepts a single string or an array of strings. | |
page | integer | Result page, from 1 (default 1). |
suggest_locations
Resolve a city or country name to a location URI. Pass the `uri` as location_uris to search_articles / search_events to find news that happened there. Does not consume search tokens.
| Parameter | Type | Description |
|---|---|---|
prefix * | string | Text typed so far (a name or the start of one), e.g. "Telef" or "bbc". |
count | integer | Max suggestions, 1-50 (default 10). |
lang | string | Language of the prefix, ISO 639-3 (default eng). |
page | integer | Result page, from 1 (default 1). |
get_trending_concepts
Get the concepts (people, organisations, places) that are trending right now in the news — computed by comparing mentions in the last 2 days against the last 2 weeks. Use `source` to switch between news, social, pr and blog (blog trends are not computed on every plan: the API then answers "not computed" and the call is still billed). Defaults to the top 10 people/organisations/places in news. Cost: 10 tokens per call regardless of count (measured live) - the priciest tool, use sparingly.
| Parameter | Type | Description |
|---|---|---|
concept_types | Concept kinds to include (default: person, org, loc). Accepts a single string or an array of strings. | |
count | integer | How many trends, 1-50 (default 10). |
source | string | Data source to compute trends from (default news). |
get_usage
Get the token budget of this NewsAPI.ai account: tokens available, used and remaining for the current period. Call it before a batch of searches (measured costs: search_articles and get_article 1 token, search_events and get_event info 5, get_trending_concepts 10). Free: does not consume tokens itself. Suggest tools are free too. Also reports this server’s session budget (NEWSAPI_AI_MAX_TOKENS_PER_SESSION, default 200): calls that would exceed it fail locally without reaching the API.