Machine-readable docs: llms.txt (index), llms-full.txt (complete reference), OpenAPI specification.
- NewsAPI.ai API Documentation | Endpoints, SDKs, and Key Access Explained: Access the complete API documentation for NewsAPI.ai. Learn about endpoints, parameters, Python and Node.js SDKs, rate limits, and response codes. Get started quickly with free registration and your API key.
- Semantic Annotation API | Identify Entities in Text with NewsAPI.ai: Use NewsAPI.ai's annotation tool to uniquely identify people, locations, organizations, and concepts within documents. Supports over 100 languages with semantic annotations linked to Wikipedia pages.
- Semantic Similarity API | Compare Cross-Language Document Similarity with NewsAPI.ai: Compare the semantic similarity between two documents in different languages with NewsAPI.ai's Semantic Similarity API. Identify shared entities and gain deep contextual insights.
- Get Articles API | Search News and PR Content with Advanced Filters from NewsAPI.ai: Find news articles matching one or more search conditions with NewsAPI.ai's Get Articles API. Use advanced search parameters to retrieve the most relevant content, from keywords to locations.
- Get Articles for Topic Page API | Topic-Based News Search with NewsAPI.ai: Retrieve news articles that match a user-generated topic page with NewsAPI.ai's Get Articles for Topic Page API. Use unique URIs to easily filter by concepts, keywords, news sources, and more.
- Stream New News Articles in Real-Time with NewsAPI.ai: Access new articles added to Event Registry with NewsAPI.ai's 'Stream of New Articles' endpoint. Set up filters to get the latest news content directly to your application.
- Search and Retrieve Events by Keyword or Concept with NewsAPI.ai: Discover events related to your interests with NewsAPI.ai. Use the Get Events endpoint to find events that match specific keywords, concepts, categories, and more.
- Retrieve Events for User-Generated Topic Pages with NewsAPI.ai: Use NewsAPI.ai's Get Events for a Topic Page to retrieve events that match your user-generated topics. Customize searches with topic-specific URIs.
- Retrieve Comprehensive Event Details with NewsAPI.ai: Obtain comprehensive details about specific events using NewsAPI.ai's Get Event Details endpoint. Retrieve articles, summaries, and other event metadata.
- Access Real-Time Stream of Events with NewsAPI.ai: Access real-time streams of events added or updated in the last few minutes with NewsAPI.ai's Stream of Events endpoint. Filter by language, keywords, or locations.
- Retrieve the Latest Breaking Events with NewsAPI.ai: Get a list of the most recent breaking events with NewsAPI.ai's Breaking Events endpoint. Retrieve events based on their breaking score and reporting intensity.
- Suggest Concepts for API Queries with NewsAPI.ai: Find concept URIs with NewsAPI.ai's Suggest Concepts API. Retrieve concept details for various API queries by searching partial or full concept labels.
- Suggest Categories for API Queries with NewsAPI.ai: Retrieve category URIs with NewsAPI.ai's Suggest Categories API. Search for categories by partial or full label to assist in filtering various API calls.
- Suggest News Sources for API Queries with NewsAPI.ai: Use NewsAPI.ai's Suggest Sources API to retrieve news source URIs. Search by source name or domain name to assist in filtering API requests.
- Suggest Authors for API Queries with NewsAPI.ai: Find author URIs with NewsAPI.ai's Suggest Authors API. Retrieve authors by name, including partial matches, to assist in API queries.
- Suggest Locations for API Queries with NewsAPI.ai: Retrieve location URIs using NewsAPI.ai's Suggest Locations API. Search by city or country name to get relevant URIs for API filtering.
- Suggest Event Types for API Queries with NewsAPI.ai: Find event type URIs with NewsAPI.ai's Suggest Event Types API. Retrieve event types for API calls by providing a label or prefix.
- Terminology and Definitions for NewsAPI.ai & Event Registry: Explore terminology used in Event Registry and NewsAPI.ai. Learn about articles, events, concepts, categories, sources, and locations for API queries.
- Supported Languages and Language Codes | NewsAPI.ai: See the full list of languages supported by NewsAPI.ai and Event Registry, with the language codes to use in the lang parameter of your API calls.
- Advanced Search Query Language | NewsAPI.ai Documentation: Build advanced NewsAPI.ai queries with AND, OR and NOT logic. Learn the JSON query language to combine keywords, concepts, categories, sources and filters.
- Keyword Search Modes — Phrase, Boolean & Simple | NewsAPI.ai: Learn NewsAPI.ai's keyword search modes: exact phrase matching, full Boolean logic (AND/OR/NOT, NEAR, NEXT), and relevance-based simple search, with examples.
- Response Format and Data Models | NewsAPI.ai Documentation: Understand the response format of NewsAPI.ai. Explore the data models for articles, events, concepts, categories, sources and other returned JSON objects.
- MCP Integration Guide | NewsAPI.ai for AI Assistants: Connect NewsAPI.ai to Claude, Codex, Cursor and other AI assistants with the hosted Model Context Protocol (MCP) server. Search news, track events, find mentions and use topic pages.
- n8n Integration Overview | NewsAPI.ai Automation: Automate news workflows with NewsAPI.ai and n8n. Learn how to set up API credentials and connect Event Registry endpoints to no-code n8n automations.
- n8n Example: Content Research Workflow | NewsAPI.ai: Build a content research assistant with NewsAPI.ai and n8n. Step-by-step workflow to fetch, split and email relevant news articles automatically.
- n8n Example: News Alert System | NewsAPI.ai: Create a news alert system with NewsAPI.ai and n8n. Schedule searches, filter results with conditions, and send email alerts for breaking news automatically.
- n8n Example: Sentiment Analysis Workflow | NewsAPI.ai: Track news sentiment with NewsAPI.ai and n8n. Build a workflow that collects articles, extracts sentiment, and logs results to Google Sheets for analysis.
- Named entity recognition | Event Registry API documentation: Reference for the Named entity recognition endpoint of the Event Registry API: parameters, request examples and the response format.
- Categorize | Event Registry API documentation: Reference for the Categorize endpoint of the Event Registry API: parameters, request examples and the response format.
- Sentiment | Event Registry API documentation: Reference for the Sentiment endpoint of the Event Registry API: parameters, request examples and the response format.
- Extract article information | Event Registry API documentation: Reference for the Extract article information endpoint of the Event Registry API: parameters, request examples and the response format.
- Detect language | Event Registry API documentation: Reference for the Detect language endpoint of the Event Registry API: parameters, request examples and the response format.
- Get article details | Event Registry API documentation: Reference for the Get article details endpoint of the Event Registry API: parameters, request examples and the response format.
- Get mentions | Event Registry API documentation: Reference for the Get mentions endpoint of the Event Registry API: parameters, request examples and the response format.
- API Usage | Event Registry API documentation: Reference for the API Usage endpoint of the Event Registry API: parameters, request examples and the response format.
API Documentation
This is the documentation page intended to demonstrate various API endpoints that you can use and the parameters that are available when calling them. Different API endpoints are grouped by topic in the left side menu. For most endpoints you can also check multiple code examples that demonstrate it's use using your preferred programming language.
Registration and authorization
In order to make the API requests you will need to provide an API key. To obtain an API key you have to create an account (registration is free and it gives you 2.000 tokens total for testing purposes). Once you activate your account and login, you will be able to find you API key on your settings page. When making REST API requests, your API key has to be provided as a parameter in the url (e.g. apiKey=YOUR_API_KEY).
In order to use more than 2.000 tokens you will have to subscribe to a paid plan.
Response codes
Event Registry uses conventional HTTP response codes to indicate the success or failure of an API request.
In general: Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter is missing, all tokens on the plan were already used, etc.). Codes in the 5xx range indicate an error with Event Registry's servers (very rare).
| HTTP status codes | |
|---|---|
| 200 | Success. Everything worked as expected. |
| 204 | Information not available. Request succeeded, but the requested information is not available. |
| 400 | Bad request. The request was unacceptable, most likely due to invalid or missing parameter. |
| 401 | User's limit reached. The user reached the limit of the tokens in his account. The requests are rejected. |
| 429 | Too many requests. The user is making too many simultaneous requests. The requests are rejected. Check the Rate Limiting section below to prevent such cases. |
| 403 | Forbidden. The user's IP or account is disabled, or if all the tokens have been used. Check the error message for more details. |
| 500 | Internal error. Internal error occured while processing the request. |
| 503 | Service unavailable. The service is currently not available. |
Rate limiting
Event Registry has rate limits in place to ensure that the service is available to all users. The rate limits are based on the number of simultaneous requests that the user is making at the same time. The maximum allowed number of simultaneous requests that the user can be executing at the same time is 5. If more requests are made, the user will receive a 429 status code in the response and the request will not be executed. The suggested approach is to not even make the code parallel but instead make requests sequentially, one after the other.
Limits on the conditions in the query
When making queries, you can specify multiple conditions, like keywords, concepts, categories, source, locations, etc. In some cases you need to provide multiple conditions of the same type, like multiple keywords. For each type of the condition, there is a maximum number of items that you can provide in a single query. The limits are set differently for trial users vs. users with a paid API subscription and are shown in the table below.
| Trial | Paid subscribers | |
|---|---|---|
| Sources | 1,000 | 50,000 |
| Keywords | 15 | 60 |
| Concepts | 15 | 60 |
| Categories | 10 | 20 |
| Languages | 5 | 10 |
| Locations | 10 | 15 |
Token usage for API calls
Each API request consumes a number of tokens from your account. Different types of requests cost a different number of tokens. Two things determine the price of a request:
- The type of data you request (searching articles, searching events, computing an aggregate, or analyzing text).
- The time period you query. Accessing only recent data (the last 30 days) has a fixed, low cost. Accessing the archive (data since 2014) is charged per each year of data that the query covers.
When analyzing your own text with the text analytics endpoints (sentiment, categorization, entity extraction, etc.), tokens are charged per analyzed document. These costs are well below one token per document, so a single token covers the analysis of many documents.
Searching and aggregating data
| Request type | Recent data (last 30 days) | Archive data (since 2014) |
|---|---|---|
| Search articles | 1 token | 5 tokens / searched year |
| Search events | 5 tokens | 20 tokens / searched year |
| Simple aggregates top concepts, tag cloud, locations, timeline, sources, sentiment, concept graph, categories | 5 tokens | 10 tokens / searched year |
| Complex aggregates concept trends, date mentions, event clustering, similar events | 10 tokens | 50 tokens / searched year |
Text analytics endpoints
| Endpoint | Cost per document |
|---|---|
| Language detection | 0.01 tokens |
| Named entity detection | 0.02 tokens |
| Sentiment detection | 0.02 tokens |
| Semantic annotation | 0.04 tokens |
| Text categorization | 0.04 tokens |
| Semantic text similarity | 0.05 tokens |
| Extract article info | 0.05 tokens |
For the full, up-to-date breakdown of token costs and the number of tokens included in each plan, see the plans page and the tokens page.
Python SDK, Node.js SDK
OpenAPI specification
You can also find the whole API specification in the YAML file linked below.
Download YAML file.