Google Direct Answer Box API

Code examples Build status
Live testing

Google searches that may be answered directly are getting direct answers boxes. SerpApi is able to extract and make sense of several kind of answer boxes. Contact us if the one answer box you are looking for is not supported yet.

SerpApi JSON structure:

{
  ...
  "answer-box": [
    {
      "type": String - Type of answer box (calculator, organic result, converter, etc.)
      "result": String - When the answer box can be inlined, the actual answer.
    },
  ...
}

Calculator Answer Box

Calculator Answer Box
{
  ...
  "answer_box": {
    "type": "calculator_result",
    "result": "3.141592653589793"
  },
  ...
}

Weather Answer Box

Weather Answer Box
{
  ...
 "answer_box": {
    "type": "weather_result",
    "result": "Mostly Cloudy"
  },
  ...
}

Converter Answer Box

Converter Answer Box
{
  ...
  "answer_box": {
    "type": "currency_converter",
    "result": "112.66 United States Dollar"
  },
  ...
}

Google Flights Answer Box

Flight Answer Box
{
  ...
  "answer_box": {
    "type": "google_flights",
    "title": "Flights from New Orleans, LA (MSY) to San Francisco, CA (SFO)",
    "link": "https://www.google.com/flights?gl=us&hl=en&source=flun&lite=0&uitype=cuAA&tfs=CAEQAhoeEgoyMDE5LTAzLTIxagcIARIDTVNZcgcIARIDU0ZPGh4SCjIwMTktMDMtMjdqBwgBEgNTRk9yBwgBEgNNU1k&sa=X&ved=2ahUKEwiL4oHBsLzgAhWhjlQKHWHrC24QuRUwAHoECAAQAw",
    "displayed_link": "www.google.com/flights",
    "flights": [
      {
        "link": "https://www.google.com/flights?gl=us&hl=en&source=flun&lite=0&uitype=cuAA&tfs=CAEQAhoeEgoyMDE5LTAzLTIxagcIARIDTVNZcgcIARIDU0ZPGh4SCjIwMTktMDMtMjdqBwgBEgNTRk9yBwgBEgNNU1k&sa=X&ved=2ahUKEwiL4oHBsLzgAhWhjlQKHWHrC24Q1RUoADAAegQIABAQ",
        "flight_info": [
          "Multiple airlines",
          "4h 45m+",
          "Connecting",
          "from $301"
        ]
      },
      {
        "link": "https://www.google.com/flights?gl=us&hl=en&source=flun&lite=0&uitype=cuAA&tfs=CAEQAhoiEgoyMDE5LTAzLTIxMgJBU2oHCAESA01TWXIHCAESA1NGTxoiEgoyMDE5LTAzLTI3MgJBU2oHCAESA1NGT3IHCAESA01TWQ&sa=X&ved=2ahUKEwiL4oHBsLzgAhWhjlQKHWHrC24Q1RUoATAAegQIABAR",
        "flight_info": [
          "Alaska",
          "4h 55m",
          "Nonstop",
          "from $307"
        ]
      },
    ...
    ],
  }
  ...
}

Google Dictionary Answer Box

Google Dictionary Answer Box
{
  ...
  "answer_box": {
    "type": "dictionary_results",
    "syllables": "trans·par·ent",
    "phonetic": "/transˈperənt/",
    "word_type": "adjective",
    "definitions": [
      "(of a material or article) allowing light to pass through so that objects behind can be distinctly seen.",
      "easy to perceive or detect.",
      "having thoughts, feelings, or motives that are easily perceived.",
      "(of an organization or its activities) open to public scrutiny.",
      "transmitting heat or other electromagnetic rays without distortion.",
      "(of a process or interface) functioning without the user being aware of its presence."
    ],
    "examples": [
      "\"transparent blue water\"",
      "\"a transparent plastic film\"",
      "\"the residents will see through any transparent attempt to buy their votes\"",
      "\"the symbolism of this myth is transparent\"",
      "\"you'd be no good at poker—you're too transparent\"",
      "\"if you had transparent government procurement, corruption would go away\"",
      "\"parliament should render government transparent\""
    ],
    "extras": [
      "synonyms:see-through, clear, translucent, pellucid, crystal clear, crystalline, limpid, glassy, glasslike, liquid; Moreunclouded, uncloudy; raretranspicuous \"a transparent plastic film\"",
      "antonyms:opaque, cloudy",
      "synonyms:obvious, explicit, unambiguous, unequivocal, clear, lucid, straightforward, plain, (as) plain as the nose on your face, apparent, unmistakable, manifest, conspicuous, patent, indisputable, self-evident; raretranspicuous \"the symbolism of this myth is transparent\"",
      "antonyms:obscure, ambiguous",
      "synonyms:frank, open, candid, honest, direct, forthright, unreserved, plain-spoken, straight, straightforward, ingenuous, innocent, guileless, simple, artless; Moreaccountable; informalupfront \"parliament should render government transparent\"",
      "antonyms:cunning, secretive"
    ]
  },
  ...
}

List Answer Box

List Answer Box
{
  ...
  "answer_box": {
    "type": "organic_result",
    "title": "French Toast I Recipe - Allrecipes.com",
    "link": "https://www.allrecipes.com/recipe/7016/french-toast-i/",
    "snippet": "DirectionsBeat together egg, milk, salt, desired spices and vanilla.Heat a lightly oiled griddle or skillet over medium-high heat.Dunk each slice of bread in egg mixture, soaking both sides. Place in pan, and cook on both sides until golden. Serve hot.",
    "list": [
      "Beat together egg, milk, salt, desired spices and vanilla.",
      "Heat a lightly oiled griddle or skillet over medium-high heat.",
      "Dunk each slice of bread in egg mixture, soaking both sides. Place in pan, and cook on both sides until golden. Serve hot."
    ],
    "refinements": [
      "no milk",
      "sweet",
      "with flour",
      "without eggs",
      "bread",
      "texas toast",
      "casserole",
      "cinnamon roll",
      "pumpkin",
      "strata"
    ],
    "thumbnail": "data:image/jpeg;base64,/9j/4AAQSkZJRgAB...XQDlk//9kx3d"
  },
  ...
}

Organic Result Answer Box

Organic Result Answer Box
{
  ...
  "answer_box": {
    "type": "organic_result",
    "title": "What Should I Expect When I Take My Car to be Serviced? - Autobutler",
    "date": "May 8, 2015",
    "link": "https://www.autobutler.co.uk/blog/when-to-be-serviced",
    "snippet": "Firstly, are you taking your car in for an interim service (usually performed every 6 months or 6,000 miles) or a full service (usually carried out every 12 months or 12,000 miles)? An interim service usually takes about an hour and a half and a full service is usually completed within 3 hours.",
    "thumbnail": "data:image/jpeg;base64,/9j/4AAQSkZJRg...lxrNYNH7ZLz2bvULg9//AE2+iei67fyfEKaIf//Z"
  },
  ...
}