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.
Instructions
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 resolve entities with suggest_concepts first and pass concept_uris. Results are compact: title, truncated body (body_len, default 300 chars), url, source, date, sentiment. Defaults to 10 results, newest first, duplicates skipped. Paginate with page; check total and pages in the response.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lang | No | 3-letter ISO 639-3 language codes, e.g. "spa" or ["eng", "spa"]. OR-ed. Accepts a single string or an array of strings. | |
| page | No | Result page, starting at 1 (default 1). | |
| count | No | Articles per page, 1-100 (default 10). Keep small to save context. | |
| keyword | No | 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" also matches the ordinary Spanish adjective "telefónica") and produce irrelevant results. For those entities call suggest_concepts first and pass the returned URI in concept_uris. | |
| sort_by | No | Sort order (default date). "rel" ranks by relevance to the query. | |
| body_len | No | Max body characters per article, 0-5000 (default 300; 0 = no body). | |
| date_end | No | 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. | |
| sort_asc | No | Ascending order (default false). | |
| data_types | No | Content types to include (default: all). Accepts a single string or an array of strings. | |
| date_start | No | Earliest date, YYYY-MM-DD (inclusive). Must be within the last 31 days unless allow_archive=true, which makes date_start mandatory. | |
| keyword_loc | No | Where to look for the keyword (default: the API default, body). | |
| source_uris | No | News source URIs, e.g. "bbc.co.uk" (use suggest_sources). OR-ed. Accepts a single string or an array of strings. | |
| concept_uris | No | 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` here. Multiple values are OR-ed and far more precise than keyword, which avoids homonym noise. Accepts a single string or an array of strings. | |
| allow_archive | No | 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 | No | Category URIs, e.g. "news/Business" (use suggest_categories). OR-ed. Accepts a single string or an array of strings. | |
| location_uris | No | Location URIs where the news happened (use suggest_locations). OR-ed. Accepts a single string or an array of strings. | |
| max_sentiment | No | Maximum sentiment, -1 to 1 (English articles only). | |
| min_sentiment | No | Minimum sentiment, -1 to 1 (English articles only). | |
| ignore_keyword | No | Exclude articles mentioning this. | |
| ignore_source_uris | No | Exclude these news sources. Accepts a single string or an array of strings. | |
| include_duplicates | No | Include duplicate/syndicated articles (default false). | |
| keyword_search_mode | No | How to match the keyword: simple (any word), exact, or phrase. |