Baidu

There are two approaches to retrieving data from Baidu using our SERP Scraper API. You can give us a full URL or pass parameters via the specifically built data source - Search.

Overview

Below is a quick overview of all the available data source values we support with Baidu.

SourceDescriptionStructured data

baidu

Submit any Baidu URL you like.

No.

baidu_search

Baidu SERPs.

No.

Although we do not have dedicated parsers for Baidu, you can write your own parsing instructions with Custom Parser feature and get structured data.

URL

The baidu source is designed to retrieve the content from direct URLs of various Baidu pages. Instead of sending multiple parameters, you can provide us with a direct URL required for Baidu page. We do not strip any parameters or alter your URLs in any other way.

Query parameters

ParameterDescriptionDefault Value

source

Data source. More info.

baidu

url

Direct URL (link) to Baidu page

-

user_agent_type

Device type and browser. The full list can be found here.

desktop

callback_url

UURL to your callback endpoint. More info.

-

- required parameter

Code examples

In the example below, we make a request to retrieve a result for the provided URL.

{
    "source": "baidu", 
    "url": "http://www.baidu.com/s?ie=utf-8&f=8&rsv_bp=1&rsv_idx=1&ch=&tn=baidu&bar=&wd=adidas"
}

The example above uses the Realtime integration method. If you would like to use some other integration method in your query (e.g. Push-Pull or Proxy Endpoint), refer to the integration methods section.

The baidu_search source is designed to retrieve Baidu Search results (SERPs) in HTML format.

Query parameters

ParameterDescriptionDefault Value

source

Data source. More info.

baidu_search

domain

Localize results for a certain country. Valid values: com ,cn.

com

query

UTF-encoded keyword

-

start_page

Starting page number

1

pages

Number of pages to retrieve

1

limit

Number of results to retrieve in each page

10

user_agent_type

Device type and browser. The full list can be found here.

desktop

callback_url

URL to your callback endpoint. More info.

-

- required parameter

Code examples

In the example below, we make a request to retrieve 10 Baidu SERPs, starting with the 11th page, for the search term adidas.

{
    "source": "baidu_search", 
    "domain": "com", 
    "query": "adidas", 
    "start_page": 11, 
    "pages": 10
}

The example above uses the Realtime integration method. If you would like to use some other integration method in your query (e.g. Push-Pull or Proxy Endpoint), refer to the integration methods section.

Last updated