Skip to main content
GET
Google web search
The num parameter is deprecated. Google no longer honours num to widen a page — a single request returns roughly 10 organic results per page, regardless of the value you pass. To collect more results, paginate with the start offset (start=0, 10, 20, …) and merge the pages client-side.

Search pricing

Regular Search costs 20 credits per successful request. Google Light Search has a dedicated /v1/google/light/search endpoint and costs 10 credits for organic results and related searches. No mode parameter is required on the Light endpoint. Legacy /search?mode=fast requests remain compatible at the regular route’s 20-credit price. Move to /light/search for the 10-credit rate.

Raw HTML and same-session pages

Pass output=html to receive the Google page itself instead of parsed JSON. Full Search returns it only when the page is complete. Google’s basic no-JavaScript page, a challenge page, or an AI Overview that could not be loaded (with ai_overview=true) fail with 502 and are not billed, so a retry is free. With ai_overview=true, an overview that Google loads after the page is fetched in the same Google session and written into the page, in the place where a browser shows “Thinking”. To page through results the way one visitor does, pass pages=2 (up to 3) with output=html. All pages come from one Google session (same exit IP and cookies), starting at start. The response is JSON:
Each page is billed as one Search request (pages=2 costs 40 credits). If any page cannot be served from that session, the whole request is retried on a fresh one and otherwise fails with 502, unbilled. Separate requests with start=0 and start=10 are independent sessions. Google hides a result’s URL behind a redirect link (https://www.google.com/goto?url=...). It also paces how fast the links of a result page can be followed: a few at once, the rest over about a minute, and every link once the result page is about 160 seconds old. A search answers within seconds and does not wait for that. Today a search returns the real URL for the first few results of a result page, usually one to three. Each other organic_results item has a link that is still a Google redirect, and two more fields: Both fields are null on a result whose link is already the real URL.
Resolving costs 0 credits. See Resolve Google result links for the request, the response rows and the recommended loop. Every result keeps its position. When you track rankings, do not count google.com as the ranking website of a result whose link is a Google redirect. Resolve the link first. This applies to /v1/google/search and /v1/google/light/search. Links in other blocks of the response can also be Google redirects. Only organic_results items have a link_token.

People Also Ask answers

Google loads each People Also Ask answer only when the question is clicked, so a plain search returns the questions without answers. Pass expand_related_questions=true to open every question the page shows (usually four), or a number such as expand_related_questions=2 to open the first N. Each answered question in related_questions then carries:
  • text_blocks: the AI-written answer Google shows, as paragraph, heading and list blocks, in the same shape as ai_overview.text_blocks.
  • references: the answer’s sources, with title, link, snippet and source. A block’s reference_indexes are positions in this list.
The answers are fetched during the same search, because Google answers a question only for the session that loaded the page. There is no token to expand a question later. A question whose answer did not come back keeps text_blocks and references as null; retry the search to get it. The search adds about a second per opened question, and the parameter implies mode=full. Each answered question is billed as one more regular Search request (20 credits today). A question that does not come back is not billed.

Fast search timeout

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.

Location and request controls

location resolves a Google canonical location and sends its UULE value to Google. For example, New York, USA resolves to New York,New York,United States. You can also pass a Google geo target criteria ID. Use a complete canonical name when a short name is ambiguous; a 422 response includes candidate names. Choose one targeting method:
  • location: a named location, such as New York,New York,United States.
  • uule: an already encoded Google location. Preserve the + by URL encoding it.
  • lat and lon: latitude and longitude, supplied together.
radius specifies location accuracy in meters, with coordinates or a named city whose center is known. It is a location bias, not a geographic boundary around results. The range is 1–199 meters for desktop and 1–1,000 for other devices. For a location without an unambiguous center, supply lat and lon instead. gl sets the country preference; hl sets the interface language. Neither is a city location or a guarantee of the proxy exit country. If gl is omitted, a resolved location supplies the country, then the domain country hint, then us. google_domain is an alias for domain. Requests use www.google.com with the resolved country preference; the response shows the actual request URL. Both Search and Light accept color_scheme=light|dark and the advanced Google controls as_dt, as_epq, as_eq, as_lq, as_nlo, as_nhi, as_oq, as_q, as_qdr, as_rq, and as_sitesearch. Google may change or stop honoring individual advanced operators. Responses are never cached: every request is fetched fresh and billed normally. no_cache is still accepted but has no effect. Full Search accepts udm=14 (web) and udm=18 (forums) for parsed JSON. Other udm values and tbm=isch|lcl|vid|nws|shop|pts|bks require output=html. Use the dedicated Google APIs for parsed vertical results. tbm and udm are mutually exclusive. Light supports web results only.

Diagnose differing rankings

search_parameters records location_requested, location_resolved, gl_requested, domain_requested, and google_parameters from the actual request URL. A resolved location means it was encoded and sent; it does not prove Google used that location. search_metadata includes the fetch source and an opaque session_fingerprint when the upstream session is known. Unknown observed location and exit country remain null. No cookies, proxy credentials, slot IDs, or IPs are exposed. If organic results came from a second fallback page, organic_results_url and mixed_sources identify that situation. Matching query, location, language, country, device, and time reduces differences between runs. Google can still vary rankings between sessions. Every request is fetched fresh; a fingerprint is a correlation hint and cannot be used to select or replay a session.

Google request fields

Search sends oq=q, sourceid=chrome, and ie=UTF-8 by default. Override them with the same-named parameters. An explicit empty string omits that field from the Google request. These are Google query parameters; sourceid does not change the browser User-Agent, and ie is an encoding hint.
string
Original query sent to Google. Defaults to q; an empty string omits it.
string
default:"chrome"
Google source identifier. Defaults to chrome; an empty string omits it.
string
default:"UTF-8"
Google input encoding hint. Defaults to UTF-8; an empty string omits it.
The udm=web alias is accepted and sent to Google as udm=14. Inspect search_parameters.google_parameters to see the actual request. Matching these fields does not guarantee identical rankings across separate sessions.

Authorizations

x-api-key
string
header
required

Query Parameters

q
string
required

Search query (supports Google operators)

gl
string
default:us

Country code

hl
string
default:en

Language code

num
integer
default:10
Required range: 1 <= x <= 100
start
integer
default:0

Page offset (0, 10, 20...)

Required range: x >= 0
domain
string
default:google.com

Google domain

device
enum<string>
default:desktop

Device target: desktop, mobile, iphone, android, tablet. Any other value is rejected with 422.

Available options:
desktop,
mobile,
iphone,
android,
tablet
user_agent
string | null

Custom User-Agent (overrides device)

Maximum string length: 512
Pattern: ^[^\r\n]*$
output
enum<string>
default:json

Response format: json (parsed) or html (the raw Google page). Full Search returns html only when the page is complete: Google's basic no-JavaScript page, a challenge page, or (with ai_overview=true) an AI Overview that could not be loaded fail with 502 and are not billed.

Available options:
json,
html
pages
integer
default:1

Consecutive result pages to fetch in one Google session (same exit IP and cookies), starting at start. Requires output=html. With pages above 1 the response is JSON: pages[] with each page's html, plus search_metadata.session_fingerprint. Each page is billed as one Search request; a request that cannot deliver every page fails with 502 and is not billed.

Required range: 1 <= x <= 3
location
string | null

City-level geo-targeting

lr
string | null

Language restrict (e.g. lang_en)

tbs
string | null

Time filter (e.g. qdr:d)

safe
string
default:off
uule
string | null

UULE encoded location

filter
integer | null

Show omitted results

nfpr
integer
default:0

Disable auto-correction

cr
string | null

Country restrict

ludocid
string | null

Google Place CID

lsig
string | null

Knowledge Graph map ID

kgmid
string | null

Knowledge Graph entity ID

si
string | null

Cached search params

ibp
string | null

Layout control

uds
string | null

Google filter string

ai_overview
boolean
default:false

Load Google's deferred AI Overview. JSON: merged into ai_overview. output=html: the overview is loaded in the same Google session and written into the page, so the page never shows the "Thinking" placeholder. Adds ~1-3s when the SERP defers the overview; the request price is unchanged.

mode
enum<string>
default:full
Available options:
full,
fast
expand_related_questions
string | null

Open all People Also Ask answers (true) or the first N (0-99).

Pattern: ^(true|false|[0-9]{1,2})$
google_domain
string | null

Alias for domain; Google requests use google.com with country targeting.

lat
number | null

Latitude; supply together with lon instead of location or uule.

Required range: -90 <= x <= 90
lon
number | null

Longitude; supply together with lat.

Required range: -180 <= x <= 180
radius
number | null

Location accuracy in meters; requires lat/lon or a named city with a known center.

Required range: 1 <= x <= 1000
color_scheme
enum<string> | null

Google color scheme.

Available options:
light,
dark
tbm
enum<string> | null

Google search type. Use output=html for verticals; dedicated APIs provide parsed vertical results.

Available options:
isch,
lcl,
vid,
nws,
shop,
pts,
bks
udm
string

Google result filter: web or 14 for web, 18 for forums. Other verticals require output=html.

Pattern: ^(web|[0-9]{1,3})$
no_cache
boolean
default:false

Ignored: responses are never cached, so every request is fetched fresh. Accepted for compatibility.

as_dt
string | null

Site restriction mode: i includes, e excludes as_sitesearch.

Pattern: ^[ie]$
as_epq
string | null

Exact phrase.

as_eq
string | null

Words to exclude.

as_lq
string | null

Find pages linking to this URL; availability depends on Google.

as_nlo
string | null

Numeric range minimum.

as_nhi
string | null

Numeric range maximum.

as_oq
string | null

Match any of these words.

as_q
string | null

Additional query words.

as_qdr
string | null

Time range, such as d, w, m or y1.

as_rq
string | null

Related URL; availability depends on Google.

as_sitesearch
string | null

Restrict results to a site.

oq
string | null

Original query sent to Google. Defaults to q; an empty string omits it.

sourceid
string | null
default:chrome

Google source identifier. Defaults to chrome; an empty string omits it.

ie
string | null
default:UTF-8

Google input encoding hint. Defaults to UTF-8; an empty string omits it.

Response

Successful Response

Response for GET /api/v1/search.

search_information
SearchInformation · object
required

Metadata about the search query.

pagination
Pagination · object
required

Pagination metadata.

ai_overview
AiOverview · object | null

Google AI Overview (AI-generated summary).

Google increasingly serves the AI Overview as a deferred block — the initial SERP HTML contains only a placeholder plus a page_token that the client has to POST back to retrieve the actual content. When that happens, the SERP parser populates page_token and leaves text_blocks/references empty. Callers of /v1/google/search can pass ai_overview=true to have the scraper chase the token automatically and merge the result back into this object.

ai_overview_status
enum<string> | null

Set when ai_overview=true. present: an overview was returned. absent: Google showed no AI Overview for this query (a definitive answer, not a fetch miss). unavailable: Google offered one but it could not be fetched this time (deferred overview lost, or a thin SERP); retrying may return it.

Available options:
present,
absent,
unavailable
organic_results
OrganicResult · object[]
ads
AdResult · object[]

Sponsored text ads in page order, when Google shows them. Always empty for mode=fast.

knowledge_graph
KnowledgeGraph · object | null

Knowledge Graph panel.

local_results
LocalResult · object[]
people_also_search_for
PeopleAlsoSearchFor · object[]
news_results
NewsResult · object[]
inline_videos
InlineVideo · object[]
shopping_results
ShoppingResult · object[]
perspectives
Perspective · object[]
discussions_and_forums
DiscussionResult · object[]
short_videos
ShortVideo · object[]
things_to_know
ThingToKnow · object[]