● serp.hilgard.cz

Google SERP API documentation

One endpoint returns a live Google results page as JSON: organic results with positions, People Also Ask, ads and the complete AI Overview with its cited sources. This page covers authentication, parameters, the response schema, errors and limits.

Authentication

Send your key in the Authorization header as a Bearer token on every request. Keys are issued per account — request one with 20,000 free test requests. Never put the key in browser code; call the API from your backend.

Authorization: Bearer YOUR_API_KEY

Request: POST /v1/search

POST https://serp.hilgard.cz/v1/search with a JSON body (Content-Type: application/json, max 4 KB).

ParameterTypeDefaultDescription
querystringrequiredSearch query, 1–200 characters.
countrystring"us"Google country code (gl). See supported markets below.
languagestring"en"Interface and results language (hl).
include_ai_overviewbooleantrueExtract the AI Overview. Set false when you only need rankings (~2 s instead of ~15 s).

Response

A successful call returns HTTP 200 and the object below. Only these responses are billed.

FieldTypeDescription
search_metadata.statusnumberAlways 200 on success.
search_metadata.latency_msnumberEnd-to-end time of the request.
search_metadata.ai_overview_statusstring"extracted", "not_present" (Google showed none), "failed" or "skipped".
organic_results[]arrayOrganic results in ranking order.
organic_results[].positionnumber1-based rank on the page.
organic_results[].title / url / snippetstringResult title, resolved target URL and snippet.
organic_results[].domainstringRegistrable domain, e.g. "teamwork.com" — handy for share-of-voice.
organic_results[].displayed_urlstringBreadcrumb URL as Google shows it.
people_also_ask[].questionstringPeople Also Ask questions, in page order.
ads[]arrayPaid results: position, headline, url, domain, description.
has_next_pagebooleanWhether Google offers a further results page.
ai_overview.presentbooleanFalse when Google shows no AI Overview for this query and market.
ai_overview.markdownstringFull AI Overview as markdown, with a numbered source list.
ai_overview.textstringThe same answer as plain text.
ai_overview.sources[]arrayCited sources in citation order: position, title, url, domain, attribution.
ai_overview.cited_domains[]arrayPer-domain roll-up: domain, count, first_position.

AI Overview extraction

Google renders the AI Overview progressively, so the API waits until the answer stops growing before reading it — you get the complete text, not the first paragraph. That is why a request with include_ai_overview: true takes around 15 seconds, while organic results alone come back in about 2 seconds.

Citation chips, embedded video cards and the source panel are stripped from the text; the citations are returned separately in sources (in the order Google cites them) and rolled up per domain in cited_domains — the metric to track when you measure AI visibility for a brand.

Google does not show an AI Overview for every query. In that case ai_overview.present is false and ai_overview_status is "not_present": a real observation for that query and market, not an error.

Errors and limits

Errors are JSON { "error": "...", "message": "..." }. Failed requests are never billed.

HTTPerrorMeaning
400bad_requestInvalid JSON, missing query or unsupported country / language.
401unauthorizedMissing or invalid API key.
429rate_limitedPer-key rate limit exceeded — honour the Retry-After header.
502 / 504upstream_errorGoogle could not be fetched in time. Retry — failed requests are not billed.

Supported markets

Countries (country): United States (us), United Kingdom (gb), Germany (de), France (fr), Spain (es), Italy (it), Netherlands (nl), Poland (pl), Czechia (cz), Slovakia (sk), Austria (at), Switzerland (ch), Canada (ca), Australia (au), India (in), Brazil (br), Mexico (mx), Japan (jp).

Languages (language): English (en), German (de), French (fr), Spanish (es), Italian (it), Dutch (nl), Polish (pl), Czech (cs), Slovak (sk), Portuguese (pt), Japanese (ja). Need another market? Ask.

Code examples

cURL, Python, Node.js and Go. Want to see real output first? Run a live query in the playground.

curl -X POST https://serp.hilgard.cz/v1/search \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "best enterprise crm",
    "country": "us",
    "include_ai_overview": true
  }'
200 OK · application/json
{
  "search_metadata": {
    "status": 200,
    "latency_ms": 1420,
    "query": "best enterprise crm",
    "country": "us",
    "language": "en",
    "ai_overview_status": "extracted"
  },
  "ai_overview": {
    "present": true,
    "markdown": "The best enterprise CRM depends on scale and ecosystem…\n\n- **Salesforce:** the most customizable…\n- **Microsoft Dynamics 365:** strongest fit for…",
    "sources": [
      {
        "position": 1,
        "title": "The 10 Best Enterprise CRM Software of 2026",
        "url": "https://www.example.com/enterprise-crm",
        "domain": "example.com",
        "attribution": "Example"
      },
      {
        "position": 2,
        "title": "Enterprise CRM comparison",
        "url": "https://www.example.org/crm",
        "domain": "example.org",
        "attribution": "Example Org"
      }
    ],
    "cited_domains": [
      {
        "domain": "example.com",
        "count": 2,
        "first_position": 1
      }
    ]
  },
  "organic_results": [
    {
      "position": 1,
      "title": "Best Enterprise CRM Software",
      "url": "https://www.example.com/",
      "domain": "example.com",
      "displayed_url": "https://www.example.com › crm",
      "snippet": "…"
    }
  ],
  "people_also_ask": [
    {
      "question": "What is the #1 CRM for enterprise?"
    }
  ]
}