Skip to main content

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

HeaderValueRequired
x-rapidapi-keyYour RapidAPI API keyYes
x-rapidapi-hostfast-news-with-previews.p.rapidapi.comYes

Query Parameters

ParameterTypeRequiredDefaultConstraintsDescription
topicstringYes--1-100 charactersSearch query (e.g., "artificial intelligence", "bitcoin price")
languagestringYes--2-5 charactersLanguage code (e.g., en, de, ja)
geostringNoall2-5 charactersCountry/region code for localized results (e.g., US, DE, JP)
limitintegerNo101-100Maximum number of articles to return
timeframestringNoanytimeSee values belowTime filter for article recency

Accepted timeframe values:

ValueDescription
last_1hArticles from the last hour
last_24hArticles from the last 24 hours
last_48hArticles from the last 48 hours
last_7dArticles from the last 7 days
last_30dArticles from the last 30 days
anytimeNo 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..."
}
]
}
FieldTypeDescription
topicstringThe topic that was searched (echoed from request)
geostringThe geographic filter applied (defaults to "all" if not specified)
languagestringThe language used for the search
countintegerNumber of articles returned
itemsarrayArray of article objects

Article object fields:

FieldTypeDescription
titlestringArticle headline
sourcestringSource publication name or website domain
published_atstringPublication date in RFC 3339 format. Empty string if the date could not be determined.
urlstringDirect URL to the original article
image_urlstringThumbnail image URL. Empty string if no image is available.
previewstringArticle 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 a published_at date 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 url link.
  • Paywalled content: The API cannot bypass paywalls. Some articles may link to content behind a paywall.