Baidu Forum Results API

For some searches, Baidu includes a "Forum" block, containing threads from Baidu Tieba. SerpApi is able to scrape, extract, and make sense of this information. When a Baidu search contains forum results, they are parsed and exist within the forum_results array in the JSON output. SerpApi is able to extract link, title, snippet, total_members, total_threads and threads for each forum result.

API Examples

JSON structure overview

{
  ...
  "forum_results": [
    {
      "link": "String - URL to the forum",
      "title": "String - Title of the forum",
      "snippet": "String - Short description of the forum",
      "total_members": "Integer - Total number of members of the forum, extracted from `snippet`",
      "total_threads": "Integer - Total number of threads of the forum, extracted from `snippet`",
      "threads": [
        {
          "title": "String - Title of the thread",
          "thumbnail": "String - Optional thumbnail of the thread",
          "snippet": "String - Snippet of the thread",
          "avatar": "String - Avatar of the author",
          "nickname": "String - Nickname of the author",
          "date": "String - Date of the thread posted",
          "comments": "Integer - Comment count of the thread"
        },
        ...
      ]
    },
    ...
  ],
  ...
}

Results for: 苹果吧

Results for: 苹果吧

JSON Example

{
  ...
  "forum_results": [
    {
      "link": "https://m.baidu.com/from=0/bd_page_type=1/ssid=0/uid=0/pu=usm%407%2Csz%40320_1001%2Cta%40iphone_2_10.0_24_80.0/baiduid=F54F855400C7F441F85CC2B497C641E1/w=0_10_/t=iphone/l=1/tc?ref=www_iphone&lid=10906498961897865705&order=1&gsflag=0&fm=alop&isAtom=1&clk_info=%7B%22tplname%22%3A%22tieba_forumcommentxml%22%2C%22srcid%22%3A%2210%22%2C%22jumpType%22%3A%22%22%7D&filter=1&is_baidu=0&tj=Wc_1_0_10_l1&wd=&eqid=975bab054f16c1e91000000663564b5e&w_qd=IlPT2AEptyoA_ykxxxcbtRyxD5G&bdver=2&tcplug=1&dict=-1&sec=24944&di=7df98200478783df&bdenc=1&nsrc=vaizNCVYXtc1tid%2FstPnwFP%2BANMJvyQJSBhGzNrpVUSfkOMkca%2F4KV5ESwJTBWUIq66WEbH%2BJpq51Xa2%2BSn4zpVCE1HFLk4KCvghV%2B05B1OgcccbJsw%2FGdHbzh0Zui%2BefTjM6jzpYxESOKgUCYIYuaERpYEaDDJ8fhe21uC4szk6Uzvpe0jgPEeivH1MKIFuUC4Y0c3kAxUzEBlX%2Bb0DhOUQoyWW8qXdv3F66KJyatr2aLkI6RxaiEyBQNxhqaZIz0V3R2S74QNQ%2B6b%2Fz0xCmYSZWGfrjOHRz8c8fxHrzluWbTy%2BSWKPBeHC%2BR%2FPIH0UEwAWRnWXv2tnV1oesKCx2Oa7OLR8OMNegU64zkIjtGk%3D",
      "title": "苹果吧",
      "avatar": "https://gimg3.baidu.com/search/src=https%3A%2F%2Fimgsrc.baidu.com%2Fforum%2Fpic%2Fitem%2Fb2de9c82d158ccbf256dd55512d8bc3eb035418f.jpg&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=w931&n=0&g=0n&er=404&q=75&fmt=auto&maxorilen2heic=2000000?sec=1666717200&t=bc5343c622b733f3642d5283f0d3933a",
      "snippet": "157万吧友 953万篇贴子",
      "total_members": 1570000,
      "total_threads": 9530000,
      "threads": [
        {
          "title": "猜猜我是苹果几",
          "thumbnail": "https://gimg3.baidu.com/search/src=https%3A%2F%2Ftiebapic.baidu.com%2Fforum%2Fw%253D720%253Bq%253D80%2Fsign%3De52099e2262762d0803ea6bd90d779c7%2F0823dd54564e92589dc5a02fd982d158cdbf4e79.jpg%3Ftbpicau%3D2022-10-26-05_c951a90d99fed3ab19a98d0d5d0dc084&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=w931&n=0&g=0n&er=404&q=75&fmt=auto&maxorilen2heic=2000000?sec=1666717200&t=dd0bef6c92874f61935c97deb55c4dc5",
          "snippet": "吧友评论:猜猜我是在哪给你回的信息",
          "avatar": "https://gimg3.baidu.com/search/src=https%3A%2F%2Fhimg.bdimg.com%2Fsys%2Fportrait%2Fitem%2Ftb.1.ebd9f7fb.JUXGZToaIvGkVdKMHJ2VnQ&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=w931&n=0&g=0n&er=404&q=75&fmt=auto&maxorilen2heic=2000000?sec=1666717200&t=1f5c78790439ac6ee001accee9ea1f05",
          "nickname": "Tatsumaki",
          "date": "6小时前",
          "comments": 253
        },
        {
          "title": "华为转苹果的感受",
          "thumbnail": "https://gimg3.baidu.com/search/src=https%3A%2F%2Ftiebapic.baidu.com%2Fforum%2Fw%253D720%253Bq%253D80%2Fsign%3D5c8b973b4f46f21fc9345c51c61f1a5d%2Fd0c8a786c9177f3eec4825cd35cf3bc79e3d56f6.jpg%3Ftbpicau%3D2022-10-26-05_75e5c4dcb738620ade150a72d9da9b9e&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=w931&n=0&g=0n&er=404&q=75&fmt=auto&maxorilen2heic=2000000?sec=1666717200&t=dfc49feec0b36b694ca50741c92c5501",
          "snippet": "吧友评论:其他的我认同,唯独直面不如曲面我不认同,个人认为曲面才是反人类设计",
          "avatar": "https://gimg3.baidu.com/search/src=https%3A%2F%2Fhimg.bdimg.com%2Fsys%2Fportrait%2Fitem%2Ftb.1.5a49e4a6.nlXMpUc8nn7BRACM64Sy3w&refer=http%3A%2F%2Fwww.baidu.com&app=2021&size=w931&n=0&g=0n&er=404&q=75&fmt=auto&maxorilen2heic=2000000?sec=1666717200&t=69d2d893e5cee82ba5fd1a42973dc0af",
          "nickname": "最爱柠檬很酸甜",
          "date": "2小时前",
          "comments": 1485
        }
      ]
    }
  ],
  ...
}