GET /news
Search for news articles by topic. This is the primary news search endpoint — provide any topic query and receive a list of matching articles from diverse sources.
Request
URL
GET /news
Headers
| Header | Value | Required |
|---|---|---|
x-rapidapi-key | Your RapidAPI API key | Yes |
x-rapidapi-host | fast-news-with-previews.p.rapidapi.com | Yes |
Query Parameters
| Parameter | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
topic | string | Yes | -- | 1-100 characters | Search query (e.g., "artificial intelligence", "bitcoin price") |
language | string | Yes | -- | 2-5 characters | Language code (e.g., en, de, ja) |
geo | string | No | all | 2-5 characters | Country/region code for localized results (e.g., US, DE, JP) |
limit | integer | No | 10 | 1-100 | Maximum number of articles to return |
timeframe | string | No | anytime | See values below | Time filter for article recency |
Accepted timeframe values:
| Value | Description |
|---|---|
last_1h | Articles from the last hour |
last_24h | Articles from the last 24 hours |
last_48h | Articles from the last 48 hours |
last_7d | Articles from the last 7 days |
last_30d | Articles from the last 30 days |
anytime | No time restriction |
Example Requests
# Basic search
curl -X GET "https://fast-news-with-previews.p.rapidapi.com/news?topic=artificial+intelligence&language=en" \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: fast-news-with-previews.p.rapidapi.com"
# With geo and limit
curl -X GET "https://fast-news-with-previews.p.rapidapi.com/news?topic=bitcoin&language=en&geo=US&limit=20" \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: fast-news-with-previews.p.rapidapi.com"
# With timeframe filter
curl -X GET "https://fast-news-with-previews.p.rapidapi.com/news?topic=climate+change&language=en&timeframe=last_7d" \
-H "x-rapidapi-key: YOUR_RAPIDAPI_KEY" \
-H "x-rapidapi-host: fast-news-with-previews.p.rapidapi.com"
Response
200 OK
{
"topic": "artificial intelligence",
"geo": "us",
"language": "en",
"count": 10,
"items": [
{
"title": "Made-up article about AI",
"source": "example-news.com",
"published_at": "2026-04-16T10:30:00Z",
"url": "https://example-news.com/articles/ai-update",
"image_url": "https://cdn.example-news.com/thumb.jpg",
"preview": "Bla bla bla this is a sample preview of what an article excerpt looks like in the response..."
}
]
}
| Field | Type | Description |
|---|---|---|
topic | string | The topic that was searched (echoed from request) |
geo | string | The geographic filter applied (defaults to "all" if not specified) |
language | string | The language used for the search |
count | integer | Number of articles returned |
items | array | Array of article objects |
Article object fields:
| Field | Type | Description |
|---|---|---|
title | string | Article headline |
source | string | Source publication name or website domain |
published_at | string | Publication date in RFC 3339 format. Empty string if the date could not be determined. |
url | string | Direct URL to the original article |
image_url | string | Thumbnail image URL. Empty string if no image is available. |
preview | string | Article text excerpt, up to 250 characters. Falls back to the title if no content was extracted. |
Error Responses
400 Bad Request — missing required parameter
{
"detail": "Key: 'NewsRequest.Topic' Error:Field validation for 'Topic' failed on the 'required' tag"
}
400 Bad Request — invalid timeframe
{
"detail": "Key: 'NewsRequest.Timeframe' Error:Field validation for 'Timeframe' failed on the 'oneof' tag"
}
401 Unauthorized
{
"detail": "Missing authentication header"
}
503 Service Unavailable
{
"detail": "News service temporarily unavailable"
}
Notes
- Source diversity: Results are automatically filtered so that no single domain dominates the response. By default, no more than 25% of articles come from the same source.
- Deduplication: Articles with identical or near-identical titles are automatically deduplicated. Non-MSN sources are preferred when duplicates are found.
- Timeframe filtering: When a specific timeframe is set (anything other than
anytime), articles without apublished_atdate are excluded since the API cannot verify they fall within the requested window. - Content preview length: Previews are limited to 250 characters. For the full article text, follow the
urllink. - Paywalled content: The API cannot bypass paywalls. Some articles may link to content behind a paywall.