Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/pratyay360/searchapi/llms.txt

Use this file to discover all available pages before exploring further.

The /news/ endpoint uses DuckDuckGo’s DDGS news search to surface recent articles from news publishers and returns an array of article URLs. Because DDGS indexes fresh news content, this endpoint is particularly effective for current events, breaking stories, and time-sensitive topics. Results come from major news outlets, blogs, and media publishers.
This endpoint is well-suited for building news datasets for LLM fine-tuning, monitoring a topic over time, or feeding a retrieval-augmented generation (RAG) pipeline with fresh information.

Request

GET /news/?query={query}&limit={limit}

Parameters

query
string
required
The news search query. Use specific terms, entity names, or event descriptions for focused results. URL-encode spaces as + or %20.
limit
integer
required
Maximum number of article URLs to return.

Response

Returns a JSON array of URL strings on success.
[*]
string
A URL to a news article from the search results.

Example

curl "http://localhost:8000/news/?query=open+source+AI+models+2024&limit=5"
Response
[
  "https://techcrunch.com/2024/03/15/meta-releases-llama-3/",
  "https://www.theverge.com/2024/4/18/open-source-ai-regulation",
  "https://venturebeat.com/ai/mistral-releases-new-open-source-model/",
  "https://www.wired.com/story/the-open-source-ai-debate/",
  "https://arstechnica.com/information-technology/2024/open-source-models-landscape/"
]

Error response

500
{ "error": "News search failed after maximum retries" }

Build docs developers (and LLMs) love