# NewsData.io > NewsData.io is a news API: one REST/JSON API for real-time and historical news articles from 100,000+ sources in 206+ countries and 90+ languages, with AI enrichment (sentiment, topic tags, regions, organizations, summaries) and a real-time WebSocket stream. It covers latest news (past 48 hours), a news archive (up to 10 years back), crypto news, stock-market news, a news-source directory and article counts. Base URL: `https://newsdata.io/api/1/`. Authentication: an API key in the `apikey` query parameter or the `X-ACCESS-KEY` header. A free plan is available. Last updated 2026-10-22 (API v1). For complete, self-contained details read [llms-full.txt](https://newsdata.io/llms-full.txt); for the machine-readable contract read [openapi.json](https://newsdata.io/openapi.json). Key facts for writing correct requests: - Endpoints: `GET /api/1/latest`, `GET /api/1/archive`, `GET /api/1/crypto`, `GET /api/1/market`, `GET /api/1/sources`, `GET /api/1/count`, `GET /api/1/crypto/count`, `GET /api/1/market/count`. Real-time stream: `POST /api/1/websocket/register` (returns a `registration_id`), then connect to `wss://ws.newsdata.io/ws/event?apikey=YOUR_API_KEY®istration_id=ID`; manage with `GET /api/1/websocket/fetch` and `DELETE /api/1/websocket/delete`. - All parameters go in the URL query string, also for POST and DELETE. Parameter names are case-insensitive. List values are comma-separated: `country=us,gb`. - Credits per call: 1 for latest, crypto, market and sources; 5 for archive; 50 for each count endpoint; 0 for WebSocket management; 1 per streamed article per connected device. The cost is flat per call whatever the number of results (including zero); error responses cost nothing. Leave `size` at its default, the maximum: 50 articles on paid plans, 10 on Free. - Pagination: send the response's `nextPage` value back as `page`. It is a cursor, not a page number (page numbers apply only with `sort=relevancy`, `source` or `fetched_at`). Stop when `nextPage` is `null`. - Time: `/latest` covers the past 48 hours and takes `timeframe` (hours `1`-`48`, or minutes such as `30m`; paid plans), not dates. On paid plans, `/archive`, `/crypto`, `/market` and the count endpoints take `from_date` and `to_date` (`YYYY-MM-DD` or `YYYY-MM-DD HH:MM:SS`, always UTC); the count endpoints require both. - Cannot be combined: `q`, `qInTitle`, `qInMeta` (use one); `country`/`excludecountry`; `category`/`excludecategory`; `language`/`excludelanguage`; `domainurl`/`excludedomainurl`; `timeframe`/dates. `id` and `url` must be used alone. - Filter a source with `domainurl` (its URL, e.g. `bbc.com`), a stock with `market_id` (e.g. `aapl-us-vy`), a coin with `coin` (e.g. `btc`), a topic with `tag` (e.g. `artificial_intelligence`). Unknown values return HTTP 422 with `recommendations` of valid values. - Success: `{"status":"success","totalResults":N,"results":[...],"nextPage":"..."}`. Error: `{"status":"error","results":{"code":"...","message":"..."}}` with HTTP 400 (malformed query or missing required parameter), 401 (missing or invalid key), 403 (not in your plan, or IP/domain not allowed), 422 (invalid parameter or value), 429 (rate or credit limit), 500 (server error) or 503 (maintenance). - Plan-gated article fields hold a notice string instead of data when the plan lacks them: `ONLY AVAILABLE IN PAID PLANS` (`content`, `ai_summary`), `ONLY AVAILABLE IN CORPORATE PLANS` (`ai_region`, `ai_org`). - Plans: Free ($0, 200 credits per day, 12-hour delay, no archive or count), Basic ($199.99/month, 20,000 credits, 6-month archive), Professional ($349.99/month, 50,000 credits, 2-year archive), Corporate ($1,299.99/month, 1,000,000 credits, 10-year archive, AI regions and organizations), Custom (contact sales). Sentiment and AI tags are on every plan, including Free. Rate limit: 30 requests per 15 minutes on Free, 1,800 on paid plans. ## Reference - [llms-full.txt](https://newsdata.io/llms-full.txt): the complete API reference in one Markdown file - every endpoint, parameter, response field, error code, plan limit, valid category and tag value, SDK, recipe and common mistake. Start here. - [OpenAPI 3.1 specification](https://newsdata.io/openapi.json): machine-readable schema of all endpoints, parameters, responses and error codes. ## Documentation - [About the API](https://newsdata.io/documentation): overview and coverage - [Get an API key](https://newsdata.io/documentation/get-api-key) - [Make your first request](https://newsdata.io/documentation/first-api-request) - [Authentication](https://newsdata.io/documentation/api-authentication) - [Response object](https://newsdata.io/documentation/response-object) - [Security](https://newsdata.io/documentation/api-security) - [Pagination](https://newsdata.io/documentation/api-pagination) - [Advanced search](https://newsdata.io/documentation/advanced-search): `q`, `qInTitle` and `qInMeta` syntax - [Rate limit](https://newsdata.io/documentation/api-rate-limit) - [Credits per plan](https://newsdata.io/documentation/api-credit-limits) - [How credits are consumed](https://newsdata.io/documentation/api-credit-usage) - [HTTP response codes](https://newsdata.io/documentation/http-response-code) ## Endpoints - [Latest News API](https://newsdata.io/documentation/latest-news-api): `GET /api/1/latest` - news from the past 48 hours; 1 credit - [News Archive API](https://newsdata.io/documentation/news-archive-api): `GET /api/1/archive` - historical news by date range, up to 10 years back (paid plans); 5 credits - [Crypto News API](https://newsdata.io/documentation/crypto-news-api): `GET /api/1/crypto` - cryptocurrency news with a `coin` filter; 1 credit - [Market News API](https://newsdata.io/documentation/market-news-api): `GET /api/1/market` - stock-market and financial news with a `market_id` filter (beta); 1 credit - [News Sources API](https://newsdata.io/documentation/news-sources-api): `GET /api/1/sources` - up to 100 news sources by country, category, language, URL or rank; 1 credit - [News Count API](https://newsdata.io/documentation/news-count-api): `GET /api/1/count`, `/api/1/crypto/count`, `/api/1/market/count` - article totals or hourly/daily counts (paid plans); 50 credits - [Real-Time Streaming API](https://newsdata.io/documentation/real-time-streaming): register a query, then receive matching articles over `wss://ws.newsdata.io/ws/event` as soon as they are collected ## SDKs and tools - [Python SDK](https://github.com/newsdataapi/python-client): `pip install newsdataapi` - [Node.js SDK](https://github.com/newsdataapi/newsdata-nodejs-client): `npm install newsdata-nodejs-client` - [React hooks SDK](https://github.com/newsdataapi/newsdata-reactjs-client): `npm install newsdataapi` - [PHP SDK](https://github.com/newsdataapi/php-client): `composer require newsdataio/newsdataapi` - [Java SDK](https://github.com/newsdataapi/newsdata-java-sdk): Maven `io.newsdata:newsdataapi` - [Go SDK](https://github.com/newsdataapi/newsdata-go-client): `go get github.com/newsdataapi/newsdata-go-client@latest` - [.NET SDK](https://github.com/newsdataapi/newsdata-dotnet-sdk): `dotnet add package Newsdata.Api` - [Dart and Flutter SDK](https://github.com/newsdataapi/newsdata-flutter-client): `flutter pub add newsdataapi` - [MCP server](https://github.com/newsdataapi/newsdata.io-mcp): run with `uvx newsdata-mcp` and set `NEWSDATA_API_KEY`; news tools for Claude, ChatGPT, Cursor, VS Code, Windsurf, Zed, Cline and other MCP clients - [Postman collection](https://www.postman.com/newsdata-io/newsdata-io/collection/43496198-39f14cdb-35fb-4951-9c59-8fab42431deb) ## Plans and account - [Pricing](https://newsdata.io/pricing): plans, credits, archive depth and features - [Sign up](https://newsdata.io/register): free API key, no card required - [Contact](https://newsdata.io/contact): support at hello@newsdata.io, sales and general questions at contact@newsdata.io ## Optional - [News sources directory](https://newsdata.io/news-sources) - [Free news datasets](https://newsdata.io/datasets) - [API changelog](https://newsdata.io/changelog) - [Integrations](https://newsdata.io/integration): Kibana, Streamlit, Power BI, Google Docs, WordPress, MCP - [Microsoft Power Automate and Power Apps connector](https://learn.microsoft.com/en-us/connectors/newsdataio/) - [Blog](https://newsdata.io/blog) - [Terms and conditions](https://newsdata.io/terms)