format=context option returns markdown text instead — see query parameters for details.
Top-level fields
Type-specific arrays
Depending on the query intent, the response may include additional arrays alongsideresults:
Search results
Each result in theresults array has this structure:
Accessing key fields
Result types
Thetype field indicates the kind of result:
Instant answers
Some queries trigger instant answers alongside regular results.Weather
Queries about weather return aweather object:
units parameter to get results in metric or imperial. The default is auto-detected from the country parameter.
Calculation
Mathematical queries return acalculation object:
Image results
Image results
Image queries return an Image results include
images array with thumbnail and dimension data:thumbnail (thumbnail URL), width, and height as string values.Parsing tips
- Check
results_typefirst to know the response shape before accessing type-specific fields resultsis always an array but may be empty for instant answers (weather, calculations)descvssnippet:descis the page’s general description;snippetis a query-relevant excerpt (when available)answerat top level is a generated answer string (may be empty);answeron individual results is an inline answer for instant answer result types- Optional fields (
date,image,snippet,extracts) may not be present on every result — always check before accessing
Search intents
Theresults_type and type fields reflect what kind of search was performed. You can force an intent with the intent parameter, or let the API auto-detect it.
Common intent aliases:
See query parameters for the full list of intent aliases.
Metrics
The response always includes ametrics object with search performance data:
Next steps
Query parameters
Full parameter reference.
RAG pipeline
Use search results as LLM context.

