Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions api-reference/endpoint/google/light-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions api-reference/google/google-search/google-web-search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
24 changes: 24 additions & 0 deletions openapi-google.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
Loading