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 /search/engine endpoint lets you target a specific search engine instead of letting SearchAPI choose automatically. This is useful when you want results from a particular index — for example, Bing for English-language coverage, Yandex for Russian-language content, or DuckDuckGo for privacy-respecting results. The engine parameter must be one of the eight supported values listed below; any other value returns a descriptive error message with HTTP 200.
Google aggressively rate-limits automated search requests. Sending many requests to engine=google in a short period is likely to result in CAPTCHAs or blocked responses. Use engine=duckduckgo or engine=bing for high-volume workloads.

Request

GET /search/engine?query={query}&engine={engine}&limit={limit}

Parameters

query
string
required
The search query string. URL-encode spaces as + or %20.
engine
string
required
The search engine to use. Must be one of: bing, brave, duckduckgo, google, mojeek, yandex, yahoo, wikipedia.
limit
integer
required
Maximum number of URLs to return.

Supported engines

ValueEngine
bingMicrosoft Bing
braveBrave Search
duckduckgoDuckDuckGo
googleGoogle Search
mojeekMojeek
yandexYandex
yahooYahoo Search
wikipediaWikipedia search

Response

Returns a JSON array of URL strings on success.
[*]
string
A result URL from the specified search engine.

Invalid engine behavior

If the engine value is not one of the eight supported options, the endpoint returns HTTP 200 with a descriptive message rather than an error status. Always validate the engine value on the client side before making a request.
200 (invalid engine)
{"Invalid engine: altavista  choose one from ['bing', 'brave', 'duckduckgo', 'google', 'mojeek', 'yandex', 'yahoo', 'wikipedia']"}

Example

curl "http://localhost:8000/search/engine?query=transformer+architecture&engine=bing&limit=5"
Response
[
  "https://jalammar.github.io/illustrated-transformer/",
  "https://arxiv.org/abs/1706.03762",
  "https://huggingface.co/docs/transformers/index",
  "https://en.wikipedia.org/wiki/Transformer_(machine_learning_model)",
  "https://pytorch.org/tutorials/beginner/transformer_tutorial.html"
]

Error response

400
{ "error": "Search engine returned an unexpected error" }

Build docs developers (and LLMs) love