# Baidu Search Results — China SERP & Rank Tracker (`nexgendata/baidu-search-results`) Actor

Scrape live Baidu (China) organic search results for any keyword: rank, URL, domain, title and snippet. Built for rank tracking, SERP monitoring and SEO research in the Chinese market. No login required.

- **URL**: https://apify.com/nexgendata/baidu-search-results.md
- **Developed by:** [NexGenData](https://apify.com/nexgendata) (community)
- **Categories:** Developer tools, Automation
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $20.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Baidu Search Results — China SERP & Rank Tracker

Get **live organic search results from Baidu** — China's dominant search engine — for any keyword, returned as clean, ranked rows you can drop straight into a spreadsheet, dashboard or database. For every keyword you get the **rank position, destination URL, domain, title and snippet**.

If you do SEO, brand monitoring, or competitive research in the Chinese market, this is the Baidu equivalent of a Google SERP scraper: track where you and your competitors rank, monitor keyword visibility over time, and pull the actual URLs Baidu is sending Chinese users to. **No login, no account, no API key** — just keywords in, ranked results out.

### Why Baidu

Baidu handles the majority of search in mainland China, where Google is not available. If your customers, distributors or competitors are in China, Baidu rankings are where visibility is won or lost — and there is almost no clean, structured way to pull that data. This Actor fills that gap.

### What you get

| Field | Description |
|---|---|
| `query` | The keyword that produced this result |
| `rank` | Organic rank position on the Baidu SERP |
| `url` | The destination URL Baidu links to |
| `domain` | Host/domain of the result (great for site-level rank tracking) |
| `title` | The real result headline (from Baidu's desktop SERP) |
| `officialSite` | `true` when Baidu marks the result an official/verified site |
| `snippet` | The result's abstract / description text |
| `matchesTargetDomain` | `true` when the result matches your tracked domain |
| `searchEngine` / `dataSource` | Provenance of the row |

> **Note on data quality:** `rank`, `url`, `domain`, `title` and `snippet` are all pulled from Baidu's server-rendered desktop results — so titles are the real result headlines (not just the source name) and snippets are the real result abstracts. If the desktop SERP is ever blocked, the Actor automatically falls back to the mobile SERP, which still returns rank + URL + domain.

### Input

- **Search keywords** (`queries`) — a list of keywords; each returns its own ranked set. Supports Chinese and English terms.
- **Single keyword** (`query`) — convenience field for one-off searches.
- **Max results per keyword** (`maxResults`) — default 20.
- **Track a target domain** (`targetDomain`) — flags every result whose domain matches, so you can instantly see where your site (or a competitor's) ranks.
- **Proxy** (optional) — Baidu's mobile SERP is reachable without a proxy; enable one only for high-volume runs.

#### Example input

```json
{
  "queries": ["跨境电商", "cross-border ecommerce", "your brand"],
  "maxResults": 20,
  "targetDomain": "yourbrand.com"
}
````

#### Example output row

```json
{
  "query": "跨境电商",
  "rank": 3,
  "title": "知乎",
  "url": "https://zhuanlan.zhihu.com/p/1947624102371",
  "domain": "zhuanlan.zhihu.com",
  "snippet": "...",
  "matchesTargetDomain": false,
  "searchEngine": "baidu",
  "dataSource": "baidu.com mobile SERP (live)"
}
```

### Use cases

- **Rank tracking** — monitor where your domain ranks for a basket of keywords on Baidu, day over day. Set `targetDomain` and filter on `matchesTargetDomain`.
- **Competitor visibility** — see which domains own the first page for your category keywords in China.
- **Brand monitoring** — track which pages surface for your brand name on Baidu (forums, news, marketplaces, review sites).
- **Keyword & content research** — discover the URLs and sources Baidu rewards for a topic before you build content.
- **Share of voice** — aggregate rankings across a keyword set to measure your slice of the Chinese SERP.

### Track rankings over time (recommended)

Rank tracking is most valuable as a time series. Put this Actor on a **Schedule** in Apify Console (e.g. daily at 08:00) with your keyword list and `targetDomain` set, and point it at the **same named dataset** each run (or use the default and export periodically). Each run appends a dated snapshot, so over weeks you build a rank-history table you can chart:

1. Apify Console → your Actor → **Schedules** → *Create schedule* → set frequency (daily/weekly).
2. Use input like:

```json
{
  "queries": ["your brand", "category keyword", "competitor brand"],
  "maxResults": 20,
  "targetDomain": "yourbrand.com"
}
```

3. Filter the combined dataset on `matchesTargetDomain = true` to see exactly where you ranked each day.

### Tips

- Run it on a **schedule** (e.g. daily) and append to a dataset to build a rank-history time series.
- Batch many keywords in one run via the `queries` list — it is far cheaper than one run per keyword.
- Mix Chinese and English keywords freely; Baidu indexes both.

### Reliability

Baidu gates its SERP behind a session cookie and is sensitive to the requesting IP. This Actor warms a cookie per session, routes through **Apify Proxy (rotating IPs) by default**, detects verification blocks and automatically retries on a fresh IP. If Baidu blocks every attempt, the run **fails loudly** with a clear message instead of reporting an empty success — so you can trust that a successful run means real data. For high-volume runs, select **RESIDENTIAL** proxy groups.

### FAQ

**Do I need a Baidu account or API key?** No. The Actor handles the session automatically.

**Does it need a proxy?** No for normal use. A proxy option is available for high-volume runs.

**Desktop or mobile results?** It reads Baidu's mobile SERP, which is the most reliably accessible surface; rankings closely mirror what Chinese mobile users see (the majority of Baidu traffic).

**Are paid ads included?** No — ad and Baidu-internal slots are filtered out so you get organic results only.

**Can it track a specific page's rank?** Yes — set `targetDomain` and filter the output on `matchesTargetDomain`.

### Related Actors by NexGenData

Building a China market-intelligence stack? Pair this with:

- **Eastmoney Financial News** — live Chinese financial news headlines.
- **Eastmoney China Stock Screener** — fundamental + market screening for A-shares.
- **Bilibili** and other China social/data Actors for audience and trend signals.

Browse all NexGenData Actors for the full China & APAC data suite.

# Actor input Schema

## `queries` (type: `array`):

One or more keywords/phrases to search on Baidu. Each keyword returns its own ranked result set.

## `query` (type: `string`):

Convenience field for a single keyword. Use 'Search keywords' for batches.

## `maxResults` (type: `integer`):

Maximum organic results to return per keyword (Baidu serves ~10 per page).

## `targetDomain` (type: `string`):

If set, each result is flagged with matchesTargetDomain=true when its domain matches — handy for rank tracking your own or a competitor's site.

## `proxyConfiguration` (type: `object`):

Baidu's desktop SERP (which carries real titles + snippets) requires a residential IP to clear its verification gate, so RESIDENTIAL Apify Proxy is the default. If desktop is blocked the Actor auto-falls back to the mobile SERP (rank + URL). You may change groups, but expect weaker data without residential.

## Actor input object example

```json
{
  "queries": [
    "品牌名",
    "competitor brand"
  ],
  "maxResults": 20,
  "targetDomain": "example.com",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "queries": [
        "apify",
        "网络爬虫"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/baidu-search-results").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "queries": [
        "apify",
        "网络爬虫",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/baidu-search-results").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "queries": [
    "apify",
    "网络爬虫"
  ]
}' |
apify call nexgendata/baidu-search-results --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/baidu-search-results",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Baidu Search Results — China SERP & Rank Tracker",
        "description": "Scrape live Baidu (China) organic search results for any keyword: rank, URL, domain, title and snippet. Built for rank tracking, SERP monitoring and SEO research in the Chinese market. No login required.",
        "version": "0.0",
        "x-build-id": "d40buiy66NS3DaEdl"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~baidu-search-results/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-baidu-search-results",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/nexgendata~baidu-search-results/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-baidu-search-results",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/nexgendata~baidu-search-results/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-baidu-search-results",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "queries": {
                        "title": "Search keywords",
                        "type": "array",
                        "description": "One or more keywords/phrases to search on Baidu. Each keyword returns its own ranked result set.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "query": {
                        "title": "Single keyword (alternative)",
                        "type": "string",
                        "description": "Convenience field for a single keyword. Use 'Search keywords' for batches."
                    },
                    "maxResults": {
                        "title": "Max results per keyword",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum organic results to return per keyword (Baidu serves ~10 per page).",
                        "default": 20
                    },
                    "targetDomain": {
                        "title": "Track a target domain (optional)",
                        "type": "string",
                        "description": "If set, each result is flagged with matchesTargetDomain=true when its domain matches — handy for rank tracking your own or a competitor's site."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Baidu's desktop SERP (which carries real titles + snippets) requires a residential IP to clear its verification gate, so RESIDENTIAL Apify Proxy is the default. If desktop is blocked the Actor auto-falls back to the mobile SERP (rank + URL). You may change groups, but expect weaker data without residential.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
