Scrapingdog

Baidu Search API

Using the Baidu Search API you can scrape Baidu search results without worrying about proxy rotation and data parsing. Supports advanced Baidu search operators and localization options. Each successful request costs 5 API credits.

Endpoint: https://api.scrapingdog.com/baidu/search/

API Parameters

🔑

Scrapingdog Parameters

  • api_key Required
    Your personal API key. Available on your dashboard.

    Type: String
  • html Optional
    This will return the full HTML of the Google page.

    Default Value - false

    Type: String
🔍

Search Query

  • query Required
    This parameter specifies the search query and supports all Baidu search operators (e.g., inurl:, site:, intitle:, etc.)

    Type: String
🌍

Localization

  • ct Optional
    Language restriction. Values: 1 = All languages, 2 = Simplified Chinese, 3 = Traditional Chinese.

    Type: String
📄

Pagination

  • pn Optional
    Result offset for pagination. 0 = first page, 10 = second page, 20 = third page, etc.

    Type: String
  • rn Optional
    Maximum number of results to return. Maximum value is 50. Default: 10

    Type: String

️ Advanced Filters

  • gpc Optional
    This parameter specifies the time range for the results using Unix timestamps.

    Type: String
  • q5 Optional
    Functions similarly to using inurl: or intitle:. For example, use 1 to search by page title, and 2 to search by URL.

    Type: String
  • q6 Optional
    Similar to using site: (e.g., q6=scrapingdog.com).

    Type: String
  • bs Optional
    Specifies the preceding search query.

    Type: String
  • oq Optional
    Indicates the original search query when the user arrives via a related search.

    Type: String
  • f Optional
    Specifies the source of the search. For example, 8 indicates a standard search, 3 comes from the suggestion list, and 1 originates from a related search.

    Type: String

API Examples

Code to Integrate
curl "https://api.scrapingdog.com/baidu/search/?api_key=APIKEY&query=football"
API Response
{
  "Baidu_data": [
    {
      "title": "football(英语单词) - 百度百科",
      "link": "http://www.baidu.com/link?url=...",
      "snippet": "football,英语单词,名词,作名词时意为"足球;橄榄球"。",
      "rank": 1
    },
    {
      "title": "Football - Wikipedia",
      "link": "http://www.baidu.com/link?url=...",
      "snippet": "Football is a family of team sports that involve kicking a ball to score a goal.",
      "rank": 2
    },
    {
      "title": "中国足球协会官方网站",
      "link": "http://www.baidu.com/link?url=...",
      "snippet": "中国足球协会官方网站,提供最新足球赛事资讯。",
      "rank": 3
    }
  ]
}