/news
GET /news
Section titled “GET /news”Endpoint
Section titled “Endpoint”curl -X GET "https://api.newsdatahub.com/v1/news" \ -H "X-Api-Key: your_api_key_here" \ -H "User-Agent: docs-news/1.0-curl"Retrieve news articles with granular filters for topics, geography, and metadata enrichment.
Learn More
Section titled “Learn More”- Advanced Search & Filtering — Boolean search with AND/OR/NOT operators
- Country-Specific News Filtering — Filter by ISO country codes
- Filter by Source Type — Target newspapers, magazines, digital-native outlets, and more
- Filter by Political Leaning — Build balanced feeds across the political spectrum
Access Requirements
Section titled “Access Requirements”The /news endpoint is available on all plans, including the free tier. However, response data varies by plan:
Free tier: Receives all article fields except sentiment, topics, and keywords (which are returned as empty). Content is truncated to 100 characters. In the source object, only reliability_score is provided; other fields (id, country, political_leaning, type) show “Available on paid plan”. Data has a 48-hour delay.
Paid plans: Get real-time data with full article content, sentiment analysis, topic classification, keyword extraction, and complete source metadata.
Query Parameters
Section titled “Query Parameters”The /news endpoint supports extensive filtering options including search queries, date ranges, topics, countries, political leanings, source types, and more.
| Parameter | Type | Description |
|---|---|---|
q | string | Full-text search with Boolean operators (AND/OR/NOT) |
search_in | string | Specify which fields to search: all (default), title, description, content, or comma-separated values |
topic | string | Filter by detected topics (comma-separated or repeated) |
exclude_topic | string | Exclude specific topics from results |
language | string | ISO 639-1 language code (e.g., en, es, fr). See available languages |
country | string | ISO 3166-1 alpha-2 country codes (comma-separated). See available countries |
source | string | Filter by source name |
exclude_source | string | Exclude specific sources from results (comma-separated or repeated) |
political_leaning | string | Filter by source political bias: left, center_left, center, center_right, right, far_left, far_right |
source_type | string | Filter by publication type: digital_native, press_release, newspaper, magazine, mainstream_news, blog, specialty_news |
start_date | string | Start date in YYYY-MM-DD format |
end_date | string | End date in YYYY-MM-DD format |
per_page | integer | Results per page (max 100, default varies by tier) |
cursor | string | Pagination cursor from previous response |
sort_by | string | Sort order: relevance (default) or date (newest first) |
fields | string | Comma-separated list of fields to include |
deduplicate | boolean | Remove duplicate articles with the same title. When true, only one article per unique title is returned (default: false) |
See the Filtering Articles section for detailed documentation of all parameters with examples.
Response Format
Section titled “Response Format”{ "next_cursor": "MTc0MTA5NDI4MDAwMCw5NTI1OTMwNQ==", "total_results": 1245, "per_page": 50, "data": [ { "id": "5b710ed2-caf0-4e33-bdf7-c9ff0eb37989", "title": "France investigates oil tanker linked to Russia's shadow fleet", "source_title": "Reuters", "source_link": "https://www.reuters.com", "article_link": "https://www.reuters.com/world/europe/france-investigates-oil-tanker-2025-09-30", "keywords": [ "shadow fleet", "Russian oil", "Benin-flagged tanker", "Pushpa" ], "topics": [ "politics", "energy", "sanctions" ], "language": "en", "description": "French authorities are investigating...", "pub_date": "2025-09-30T14:30:00Z", "creator": "Reuters Staff", "content": "PARIS (Reuters) - French authorities...", "media_url": "https://example.com/image.jpg", "media_type": "image/jpeg", "sentiment": { "pos": 0.02, "neg": 0.068, "neu": 0.912 }, "source": { "id": "reuters", "country": "GB", "political_leaning": "center", "reliability_score": 9.0, "type": "news_agency" } } ]}Response Attributes
Section titled “Response Attributes”Root Level
Section titled “Root Level”- next_cursor (string or null) — Pagination cursor for the next page of results
- total_results (number) — Total count of available articles
- per_page (number) — Number of articles returned per page
- data (array) — Array of article objects
Article Object
Section titled “Article Object”- id (string) — Unique identifier for the article
- title (string) — Article title
- source_title (string) — Name of the publication source
- source_link (string) — URL of the publication source
- article_link (string) — Direct URL to the article
- keywords (array) — Array of relevant keywords (Paid tiers only)
- topics (array) — Array of relevant topics (Paid tiers only)
- language (string) — Language the article is written in
- description (string) — Brief article description or summary
- pub_date (string) — Publication date in ISO 8601 format
- creator (string or null) — Article author or creator
- content (string or null) — Full article content where available (truncated for the Free tier)
- media_url (string or null) — URL of the main media asset
- media_type (string or null) — MIME type of the media asset
- sentiment (object) — Sentiment analysis scores for the article (Paid tiers only)
- source (object) — Metadata about the news source
Source Object
Section titled “Source Object”- id (string) — Unique identifier for the news source
- country (string) — 2-letter ISO country code of the source
- political_leaning (string) — Political bias rating (left, center_left, center, center_right, right, far_left, far_right)
- reliability_score (number) — Source reliability score (0-10, higher is more reliable)
- type (string) — Source type (newspaper, magazine, blog, digital_native, etc.)
Sentiment Object
Section titled “Sentiment Object”- pos (number) — Positive sentiment score (0-1)
- neg (number) — Negative sentiment score (0-1)
- neu (number) — Neutral sentiment score (0-1)