From d4d6e73ed5ea9d243a0ca137d6e4d1672d1f3dec Mon Sep 17 00:00:00 2001 From: kasparasizi1 <132673909+kasparasizi1@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:32:16 +0200 Subject: [PATCH] docs(google): explain deferred links and raw HTML speed options (SCR-712) --- .../endpoint/google/light-search.mdx | 19 +++++++++++++++ .../google-search/google-web-search.mdx | 7 ++++++ openapi-google.json | 24 +++++++++++++++++++ 3 files changed, 50 insertions(+) diff --git a/api-reference/endpoint/google/light-search.mdx b/api-reference/endpoint/google/light-search.mdx index ec3066a..19163df 100644 --- a/api-reference/endpoint/google/light-search.mdx +++ b/api-reference/endpoint/google/light-search.mdx @@ -26,6 +26,25 @@ Use `start=10`, `20`, and so on for later pages. Google may return fewer results than requested by `num`; a page commonly contains about ten organic results. Set `output=html` to receive the raw Google response instead of parsed JSON. +## Faster responses + +Set `defer_links=true` to skip inline organic URL lookups while keeping parsed +JSON. URLs already present in the page stay direct. Every unresolved organic +result keeps its position and carries a `link_token` with +`retry_after_seconds: 0`. Send those rows to +[`POST /v1/google/resolve`](/api-reference/endpoint/google/resolve) when you need +their destination URLs. A resolve response may ask you to wait before retrying. +The Search price is unchanged, and resolving costs 0 credits. + +With `output=html`, you receive the page without parsing or URL lookups; +`defer_links` has no additional effect. These options remove processing steps; +Google blocks, proxy latency and retries can still affect response time. + +```python +serp = await client.google.search.light("vinted api", defer_links=True) +results = await client.google.search.resolve_all(serp["organic_results"]) +``` + `search_information.organic_results_state` is `Results for exact spelling`, `Results for spelling correction` (Google showed results for a corrected spelling), `Results with suggested correction` (Google suggested a spelling with "Did you mean" but kept your query) or `no_results`. `total_results` and `time_taken` are filled only when Google prints them. Light usually gets Google's basic page, which shows no result count or search time, so both are often `null` on Light. Use [regular Search](/api-reference/google/google-search/google-web-search) when you need them. Google hides a result's URL behind a redirect link diff --git a/api-reference/google/google-search/google-web-search.mdx b/api-reference/google/google-search/google-web-search.mdx index d5610e9..87f83db 100644 --- a/api-reference/google/google-search/google-web-search.mdx +++ b/api-reference/google/google-search/google-web-search.mdx @@ -119,6 +119,13 @@ curl "https://scrapebadger.com/v1/google/search?q=are+noise+cancelling+headphone ## Fast search timeout +For faster JSON responses, set `defer_links=true` to skip inline organic URL +lookups. Direct URLs stay direct; unresolved results keep their ranks and carry +`link_token` and `retry_after_seconds` fields. Redeem them through +[`POST /v1/google/resolve`](/api-reference/endpoint/google/resolve) when needed. +This option also works on Light Search, preserves the request price, and does +not change `output=html`, which already skips parsing and URL lookups. + With `mode=fast`, search has a 12-second processing budget shared by fetching, retries, fallback and parsing. If no result is ready within that budget, the API returns `503` with `Retry-After: 60`. Wait at least 60 seconds before retrying. Network transit and gateway processing can add to the time you observe. This budget also applies to `/v1/google/light/search`. The dedicated Light endpoint cannot enable rich SERP features through `mode=full` or `ai_overview=true`. The budget does not apply to regular full Search. diff --git a/openapi-google.json b/openapi-google.json index e80934a..a35b456 100644 --- a/openapi-google.json +++ b/openapi-google.json @@ -846,6 +846,18 @@ ], "default": "UTF-8" } + }, + { + "name": "defer_links", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Skip inline organic URL lookups; redeem result link_tokens with POST /v1/google/resolve. JSON only; price unchanged.", + "default": false, + "title": "Defer Links" + }, + "description": "Skip inline organic URL lookups; redeem result link_tokens with POST /v1/google/resolve. JSON only; price unchanged." } ], "responses": { @@ -6288,6 +6300,18 @@ ], "default": "UTF-8" } + }, + { + "name": "defer_links", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "description": "Skip inline organic URL lookups; redeem result link_tokens with POST /v1/google/resolve. JSON only; price unchanged.", + "default": false, + "title": "Defer Links" + }, + "description": "Skip inline organic URL lookups; redeem result link_tokens with POST /v1/google/resolve. JSON only; price unchanged." } ], "responses": {