OpenSERP Cloud Updated Quickstart →

Search API Examples

Practical, copy pasteable examples for calling a search engine from code. Each page below covers one engine the query parameters that matter for it, a workin...

Practical, copy-pasteable examples for calling a search engine from code. Each page below covers one engine - the query parameters that matter for it, a working request in the SDKs and curl, and what the results look like. There is also a megasearch page that runs several engines at once and compares where a page ranks on each.

Every example targets OpenSERP Cloud at https://api.openserp.org and authenticates with a Cloud API key. The same code runs against a self-hosted open-source OpenSERP server - swap the apiKey for a local baseUrl and drop the auth header.

export OPENSERP_API_KEY="osk_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

New here? Create an API key, then try any query in the Search Playground before you write a line of code.

Pick an engine

Engine Best for Example page
Google Broad global coverage, SEO rank tracking Google Search API
Bing News, images, a lenient alternative to Google Bing Search API
Yandex Russia and CIS results, Cyrillic queries Yandex Search API
Baidu Mainland China and Simplified Chinese results Baidu Search API
DuckDuckGo Privacy-leaning results, no region tracking DuckDuckGo Search API
Ecosia Bing-powered results with a European lean Ecosia Search API

Search all of them at once

Run a query across several engines in one call and merge the results, or line the rankings up side by side to see where a page sits on each engine:

The shared shape

Every engine returns the same envelope, so switching engines is a one-word change. A single-engine web response looks like this:

{
  "query": { "text": "golang", "engines_requested": ["google"] },
  "meta": { "request_id": "019dc6c1-...", "took_ms": 642 },
  "results": [
    {
      "rank": 1,
      "title": "The Go Programming Language",
      "url": "https://go.dev/",
      "domain": "go.dev",
      "snippet": "Go is an open source programming language.",
      "engine": "google"
    }
  ],
  "pagination": { "page": 1, "has_more": true, "next_start": 10 }
}

See the Endpoints reference for every parameter and field.

Next steps