WebScrapingAPI Docs

Answer Box Results

Understand the `answer_box` section returned by Google Search API responses.

Google may return an instant answer for calculations, conversions, definitions, weather, and similar queries. When present, Google Search API returns it in answer_box.

Request

curl --get "https://serpapi.webscrapingapi.com/v2" \
  --data-urlencode "api_key=YOUR_API_KEY" \
  --data-urlencode "engine=google" \
  --data-urlencode "q=pi"

Fields

FieldTypeDescription
typestringAnswer box type, such as calculator_result, converter, or organic_result.
resultstringInline answer when Google exposes one.

Example

{
  "answer_box": {
    "type": "calculator_result",
    "result": "3.14159265359"
  }
}

The shape of answer_box depends heavily on the query type. Check for the key before reading nested fields.

On this page