Skip to main content
All responses are JSON objects. The format=context option returns markdown text instead — see query parameters for details.
The results_type field tells you the shape of the response. Use it to determine which arrays and objects are present — for example, results_type: "weather" means a weather object is included.

Top-level fields

FieldTypeAlways presentDescription
results_typestringYesCategory of results (e.g., search, news, images)
answerstringYesGenerated answer for the query (may be empty)
typestringYesSame as results_type
titlestringYesTitle summarizing the search results
resultsarrayYesSearch results
metricsobjectYesSearch performance metrics
correctedQuerystringNoSpell-corrected query (deep search only, when a correction is made)
related_searchesarrayNoRelated search suggestions
topicsarrayNoRelated topics

Type-specific arrays

Depending on the query intent, the response may include additional arrays alongside results:
FieldPresent when
videosVideo intent queries
imagesImage intent queries
newsNews intent queries
placesLocation/business queries
profilesPeople-related queries
socialsSocial media queries
academicsScholarly queries

Search results

Each result in the results array has this structure:
FieldTypeAlways presentDescription
titlestringYesPage title
linkstringYesPage URL (returned as url when linkFormat=url)
descstringYesPage description or summary
sourcestringYesDomain name
typestringYesResult type (see result types)
datestringNoPublication date
imagestringNoPreview image URL
snippetstringNoQuery-relevant text excerpt (distinct from desc)
answerstringNoInline answer for instant answer results
extractsarrayNoText extracts from the page, when available (when extracts=true)
contentTypestringNoContent type (when metadata=full)
readerobjectNoExtracted page content (when metadata=full)

Accessing key fields

data = response.json()

for result in data["results"]:
    # Always present
    print(result["title"], result["link"], result["source"])

    # Optional fields — check before accessing
    if result.get("snippet"):
        print(f"Snippet: {result['snippet']}")
    if result.get("extracts"):
        print(f"Extract: {result['extracts'][0][:200]}")
    if result.get("date"):
        print(f"Published: {result['date']}")

Result types

The type field indicates the kind of result:
TypeDescription
websiteStandard web page
newsNews article
videoVideo content
imageImage content
placeBusiness or place
profilePerson or entity profile
socialSocial media content
academicScholarly or research content
calculationMath computation result
weatherWeather data
computationComputed answer
instant answerDirect answer to a factual query

Instant answers

Some queries trigger instant answers alongside regular results.

Weather

Queries about weather return a weather object:
{
  "results_type": "weather",
  "answer": "",
  "type": "weather",
  "title": "Weather in San Francisco",
  "results": [],
  "weather": {
    "location": {
      "name": "San Francisco",
      "country": "US",
      "coordinates": {
        "latitude": 37.7749,
        "longitude": -122.4194
      }
    },
    "temperature": 62,
    "feelsLike": 59,
    "units": "imperial",
    "description": "Partly Cloudy",
    "humidity": 72,
    "windSpeed": 12,
    "windDirection": 270,
    "pressure": 1013,
    "icon": "partly-cloudy",
    "cloudiness": 40,
    "visibility": 10000,
    "timestamp": "2025-03-15T14:00:00Z"
  },
  "metrics": {
    "query": "weather san francisco",
    "intent": "WeatherIntent",
    "timestamp": "2025-03-15T14:00:01Z",
    "duration": 850,
    "queries_executed": 1,
    "api_requests_count": 2,
    "results_returned": 0,
    "total_results_found": 0
  }
}
Use the units parameter to get results in metric or imperial. The default is auto-detected from the country parameter.

Calculation

Mathematical queries return a calculation object:
{
  "results_type": "computation",
  "answer": "",
  "type": "computation",
  "title": "150 * 1.08",
  "results": [],
  "calculation": {
    "expression": "150 * 1.08",
    "result": "162"
  },
  "metrics": { ... }
}
Image queries return an images array with thumbnail and dimension data:
{
  "results_type": "images",
  "answer": "",
  "type": "images",
  "title": "Mountain landscape images",
  "results": [],
  "images": [
    {
      "title": "Mountain landscape",
      "link": "https://example.com/photo",
      "image": "https://example.com/photo.jpg",
      "source": "example.com",
      "type": "image",
      "thumbnail": "https://example.com/photo_thumb.jpg",
      "width": "1920",
      "height": "1080"
    }
  ],
  "metrics": { ... }
}
Image results include thumbnail (thumbnail URL), width, and height as string values.

Parsing tips

  • Check results_type first to know the response shape before accessing type-specific fields
  • results is always an array but may be empty for instant answers (weather, calculations)
  • desc vs snippet: desc is the page’s general description; snippet is a query-relevant excerpt (when available)
  • answer at top level is a generated answer string (may be empty); answer on 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

The results_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:
AliasIntentExtra fields
searchGeneral web search
newsNews articlesnews
videoVideo contentvideos
imagesImage searchimages
weatherWeather queriesweather
calculateMath expressionscalculation
wikiWikipedia/knowledge
codeProgramming queries
recipeRecipe search
placeBusiness searchplaces
timeTime queries
See query parameters for the full list of intent aliases.

Metrics

The response always includes a metrics object with search performance data:
{
  "results": [...],
  "metrics": {
    "query": "machine learning",
    "intent": "FallbackSearchIntent",
    "timestamp": "2025-03-15T14:00:01Z",
    "duration": 234,
    "queries_executed": 1,
    "api_requests_count": 3,
    "results_returned": 10,
    "total_results_found": 42
  }
}
FieldTypeDescription
querystringThe query as processed
intentstringDetected or forced search intent
timestampstringTimestamp of the request
durationnumberTotal request time in milliseconds
queries_executedintegerNumber of queries executed
api_requests_countintegerNumber of API requests made
results_returnedintegerResults returned in this response
total_results_foundintegerTotal results found across sources
cachedbooleanWhether response was from cache (only present on cache hits)

Next steps

Query parameters

Full parameter reference.

RAG pipeline

Use search results as LLM context.