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 /wiki/ endpoint aggregates results from six wiki sites in a single request. Internally, it runs six separate searches — one per site — and merges all results into a single array. This gives you broad encyclopedic coverage without making multiple API calls. The sites covered are Wikipedia, Wikibooks, Wiktionary, Grokipedia, Wikiquote, and Wikisource.
Because the endpoint runs six internal searches, the response can contain up to 6 × limit URLs. The actual count may be lower if some sites return fewer results than requested.

Request

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

Parameters

query
string
required
The search query. Works best with specific topic names, concepts, or terms. URL-encode spaces as + or %20.
limit
integer
required
Maximum number of results to return per site. The total response may contain up to 6 × limit URLs.

Sources searched

SiteContent type
wikipedia.orgEncyclopedic articles
wikibooks.orgOpen-content textbooks
wiktionary.orgDictionary and thesaurus
grokipedia.comWiki-style reference
wikiquote.orgQuotations from notable figures
wikisource.orgPublic domain source texts

Response

Returns a JSON array of URL strings. Results from each site appear in the order listed above, concatenated together.
[*]
string
A URL to a page on one of the six wiki sites.

Example

curl "http://localhost:8000/wiki/?query=reinforcement+learning&limit=2"
Response
[
  "https://en.wikipedia.org/wiki/Reinforcement_learning",
  "https://en.wikipedia.org/wiki/Q-learning",
  "https://en.wikibooks.org/wiki/Reinforcement_Learning",
  "https://en.wikibooks.org/wiki/Artificial_Intelligence",
  "https://en.wiktionary.org/wiki/reinforcement",
  "https://en.wiktionary.org/wiki/reward",
  "https://www.grokipedia.com/reinforcement-learning",
  "https://www.grokipedia.com/machine-learning",
  "https://en.wikiquote.org/wiki/Artificial_intelligence",
  "https://en.wikiquote.org/wiki/Alan_Turing",
  "https://en.wikisource.org/wiki/Artificial_Intelligence_references",
  "https://en.wikisource.org/wiki/Computing_Machinery_and_Intelligence"
]

Error response

500
{ "error": "Wiki search failed" }

Use case

The /wiki/ endpoint is well-suited for building encyclopedic knowledge datasets. The combination of Wikipedia (facts), Wikibooks (structured learning), Wiktionary (language), Wikiquote (quotations), and Wikisource (primary texts) gives broad coverage of human knowledge in a single call.

Build docs developers (and LLMs) love