Saltar para o conteúdo principal
POST
Search Google Places

Autorizações

Authorization
string
header
obrigatório

Your API key, sent as Authorization: Bearer <key>.

Cabeçalhos

Prefer
string

wait=<seconds> holds the request at most that long, up to 290. wait=0 answers with the task id at once and queues the task when every concurrency slot is taken.

Exemplo:

"wait=120"

Corpo

application/json
query
string
obrigatório

The search term, for GOOGLE, AIMODE, GOOGLE_SERP, GOOGLE_PLACES, GOOGLE_NEWS, BING_SEARCH, COMMERCE_SERP and NAVER_* engines. BING_SEARCH reads prompt first and falls back to query, and rejects text over 4,000 characters with 422 VALIDATION_ERROR.

country
string

ISO 3166-1 alpha-2 country code, case-insensitive. Omitted, empty or null means US (KR for NAVER_* engines). A value that is not an officially assigned code, such as UK (use GB), is rejected with 400 VALIDATION_ERROR, and a country this engine cannot serve is rejected at submit time with 422.

Exemplo:

"US"

city
string

GOOGLE_PLACES only. The place to search from, named the way Google names places: city, state or region, and country, for example Reno, Nevada, United States. Every Places page is searched from it. Send city or uule; city together with uule is rejected with 422 VALIDATION_ERROR. The response echoes it as city.

Required string length: 1 - 100
Exemplo:

"Reno, Nevada, United States"

uule
string

GOOGLE, AIMODE, GOOGLE_SERP and GOOGLE_PLACES. Google's own location parameter in its w+ form, exactly as it goes into a Google search URL, for example w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM for Austin, Texas. It is sent to Google unchanged, so the results page, AI Overview and AI Mode answer for that place. Use it instead of state when your system already stores UULEs; sending both is rejected with 400 VALIDATION_ERROR, as is a value that is not a w+ UULE (for example the percent-encoded w%2B…). Other engines reject it with 422 LOCATION_UNSUPPORTED. GOOGLE_PLACES takes no state and rejects uule together with city with 422 VALIDATION_ERROR. The response echoes it as uule.

Pattern: ^w\+[A-Za-z0-9+/_-]{4,600}={0,2}$
Exemplo:

"w+CAIQICIaQXVzdGluLFRleGFzLFVuaXRlZCBTdGF0ZXM"

limit
integer

COMMERCE_SERP: product count, integer 1-40 (default 20) with query, 1-200 (default 200) with url. GOOGLE_PLACES: the places to return from the top of the list, 1-100 (default 20, one page); the task holds 1 credit per 20 places and is charged for the pages it read. Send limit or page, not both.

Intervalo necessário: 1 <= x <= 200
page
integer
padrão:1

GOOGLE_SERP, NAVER_SERP and GOOGLE_PLACES. The results page to return, 1-10 (1-5 for GOOGLE_PLACES). Positions count across pages, so page 2 starts at 11 on Google, at 16 on Naver and at 21 on Google Places. GOOGLE_PLACES reads that one page alone and charges 1 credit; send page or limit, not both (422 VALIDATION_ERROR).

Intervalo necessário: 1 <= x <= 10
include
object

Optional output flags. markdown, rawResponse, searchQueries, ads and shopping are ignored by engines that do not support them. citationLinks is PERPLEXITY only and requires markdown: true. analysis on an unsupported engine is rejected with 422 VALIDATION_ERROR, html with 422 EVIDENCE_UNSUPPORTED, and screenshot: true with 400 VALIDATION_ERROR on every engine. See the engine guide for the support table.

idempotencyKey
string

Optional. A repeat of the key within at least 30 days answers with the task that holds it, so a caller that hung up can ask again.

priority
integer
padrão:1

Compatibility field; does not guarantee execution order. Values outside 1–10 are clamped, not rejected.

Intervalo necessário: 1 <= x <= 10
webhook
object

Optional. Omit to collect the result by polling instead.

Resposta

The task ended: the body GET /v1/async/task/{id} returns, with the result in response or the reason in error.

success
boolean
obrigatório
task
object
obrigatório
credits
object
obrigatório

Credits, with up to two decimals (for example 1.25). The submit response always shows 0: nothing is charged yet, and the task's price is held from your balance when it starts. Polling shows 0 until the task is terminal, then the settled charge: the task's price for COMPLETED, 0 for FAILED. A task webhook reports the same charge in creditsCharged; on a FAILED task it reports the task's price in creditsToCharge and 0 in creditsCharged. CITATION_ANALYSIS, GOOGLE_PLACES and GOOGLE_NEWS are charged by usage, up to the hold placed when the task starts.

response
object

The engine-specific result. Absent until the task is terminal. See the Engines guide for per-engine shapes. NAVER_AI_TAB preserves the original text, markdown, sources and cards when Naver returns HTTP success, a valid stream ending in done, and nonempty answer text with unknown_error. It includes upstreamError and returns immediately without retrying or rephrasing, even with retryQuery. COMPLETED means collection finished; the answer may still be incomplete. Empty, cut-off or malformed streams still fail. Policy refusals complete with a policy_declined notice. rawContent is returned only with include.rawResponse. With include.citationAnalysis, answer results also carry citationAnalysis (see Include). CITATION_ANALYSIS returns CitationAnalysisResult; see the Citation Analysis guide. PROMPT_RESEARCH returns PromptResearchResult; see the Prompt Research guide. GEO_SCORE returns GeoScoreResult; see the GEO Score guide. Answer engines with include.analysis add analysis (AnswerAnalysis).

error
string

Present when task.status is FAILED. A plain string, not the {code, message, timestamp} object used by request-level errors.