Baidu Answer Box API

Baidu searches that may be answered directly are getting direct answers boxes. SerpApi is able to scrape, 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.

API Examples

Dictionary Answer Box

Dictionary Answer Box

JSON Example

{
  ...
  "answer_box": [
    {
      "position": 1,
      "title": "coffee - 百度翻译",
      "link": "http://www.baidu.com/link?url=mdIN8bFD8ls3kZp2XEdoHlDOtVESPctEoej0QJadbUWwalf4iD8HzOM3NFU0PL35Ts04hQdFLUxLHs4zy2hawa",
      "displayed_link": "fanyi.baidu.com",
      "type": "dictionary_results",
      "english_word": "coffee",
      "british": {
        "phonetic": "[ˈkɒfi]",
        "chinese_character": "英",
        "audio_link": "https://sp1.baidu.com/-rM1hT4a2gU2pMbgoY3K/gettts?lan=uk&text=coffee&spd=2&source=alading"
      },
      "american": {
        "phonetic": "[ˈkɔːfi]",
        "chinese_character": "美",
        "audio_link": "https://sp1.baidu.com/-rM1hT4a2gU2pMbgoY3K/gettts?lan=en&text=coffee&spd=2&source=alading"
      },
      "definitions": [
        [
          "n. 咖啡(热饮料); (烘烤过的)咖啡豆; 咖啡粉; 咖啡色;"
        ],
        [
          "[其他] 复数:coffees"
        ]
      ]
    }
  ],
  ...
}

Organic Result Answer Box

Organic Result Answer Box

JSON Example

{
  ...
  "answer_box": [
    {
      "position": 1,
      "type": "organic_result",
      "answer": "巴黎",
      "snippet": "巴黎(Paris),是法兰西共和国的首都和最大城市,也是法国的政治、经济、文化和商业中心,世界五个国际大都市之一(其余四个分别为纽约、伦敦、东京、香港),并被GaWC评为Alpha+级世界一线...",
      "source": "来自百度百科",
      "link": "http://baike.baidu.com/item/%E5%B7%B4%E9%BB%8E/858?from=kg_qa",
      "thumbnail": "http://t12.baidu.com/it/u=2724988549,1596493136&fm=58&app=83&f=JPEG?w=200&h=200"
    }
  ],
  ...
}

Organic Result Answer Box (List)

Organic Result Answer Box (List)

JSON Example

{
  ...
  "answer_box": [
    {
      "position": 1,
      "type": "organic_result",
      "answer": "3775.51米",
      "list": [
        "3775.51米。",
        "富士山高3775.63米,山底周长125千米,占地面积约1200平方千米。"
      ],
      "link": "http://www.baidu.com/link?url=dwjpD3dW2ewEFIzkHh2fV-hy64_O5bUZEDUn0aMWLy0jeFJO3eAKREaveoOVDnFAHJMMGGF1pppX9ntRmnlWFA9fx0wy_PQOg3mHmhWTGd3",
      "source": "富士山高度是多少?_百度知道",
      "displayed_link": "zhidao.baidu.com"
    }
  ],
  ...
}

Calculator Answer Box

Calculator Answer Box

JSON Example

{
  ...
  "answer_box": [
    {
      "position": 1,
      "link": "http://www.baidu.com/link?url=KdcQuFEStudmxwvVV9JDfgfaZjRF9o8_Kyk82d8xk2zWW5QACvgAVlOappe2LxogA_vNFe1Lm1eIVirkLRVe2hY1OyFmYs4AL4lCOqSKc3q",
      "type": "calculator_result",
      "displayed_equation": "1.5*pi",
      "answer": "4.7123889803847"
    }
  ],
  ...
}

Line Chart Answer Box

Line Chart Answer Box

JSON Example

{
  ...
  "answer_box": [
    {
      "position": 1,
      "type": "line_chart_result",
      "title": "全国GDP",
      "selected_tab": "年度数据",
      "answer": "114.37万亿元(2021年)",
      "source": {
        "text": "中经数据",
        "link": "https://wap.ceidata.cei.cn/detail?id=xgiaRd3yf2I%3D",
        "icon": "https://pc-index-static.cdn.bcebos.com/top1/sunmao_zhongjin/zhongjing_favicon.png",
        "displayed_link": "https://ceidata.cei.cn/jsps/Default"
      },
      "charts": {
        "全国": [
          {
            "label": "1952年",
            "text": "0.07万亿元"
          },
          {
            "label": "1953年",
            "text": "0.08万亿元"
          },
          {
            "label": "1954年",
            "text": "0.09万亿元"
          },
          ...
        ],
        "多哥": [
          {
            "label": "1961年",
            "text": "12.2%"
          },
          {
            "label": "1962年",
            "text": "3.8%"
          },
          {
            "label": "1963年",
            "text": "5%"
          },
          ...
        ],
        "泰国": [
          {
            "label": "1961年",
            "text": "5.4%"
          },
          {
            "label": "1962年",
            "text": "7.6%"
          },
          {
            "label": "1963年",
            "text": "8%"
          },
          ...
        ]
      },
      "other_tabs": [
        {
          "tab_name": "季度数据",
          "chart": {
            "全国": [
              {
                "text": "0.53万亿元",
                "label": "1992年Q1"
              },
              {
                "text": "0.65万亿元",
                "label": "1992年Q2"
              },
              {
                "text": "0.72万亿元",
                "label": "1992年Q3"
              },
              ...
            ]
          }
        }
      ],
      "related_searches": [
        {
          "title": "塞舌尔GDP增速:1.8%(2021年)",
          "link": "https://www.baidu.com/s?wd=%E5%A1%9E%E8%88%8C%E5%B0%94GDP%E5%A2%9E%E9%80%9F&usm=4&ie=utf-8&rsv_pq=eb6bb62a00080646&oq=%E5%85%A8%E5%9B%BDGDP&rsv_t=46b38LeppL7X8VegUnZyroIA0%2FKnjst%2B1t8ynni7pWVtfVW6xpHXZeaXpxM",
          "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=%E5%85%A8%E5%9B%BDGDP&q=%E5%85%A8%E5%9B%BDGDP"
        },
        {
          "title": "乍得GDP增速:-1.2%(2021年)",
          "link": "https://www.baidu.com/s?wd=%E4%B9%8D%E5%BE%97GDP%E5%A2%9E%E9%80%9F&usm=4&ie=utf-8&rsv_pq=eb6bb62a00080646&oq=%E5%85%A8%E5%9B%BDGDP&rsv_t=46b38LeppL7X8VegUnZyroIA0%2FKnjst%2B1t8ynni7pWVtfVW6xpHXZeaXpxM",
          "serpapi_link": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=%E5%85%A8%E5%9B%BDGDP&q=%E5%85%A8%E5%9B%BDGDP"
        }
      ]
    }
  ]
  ...
}