If your product, client, or research touches China, Baidu is the search engine that matters, and it is remarkably hard to get data out of if you are not in China. I hit this on a market-research job: the developer signup flows want a mainland phone number, and the site itself fights foreign automation. This post walks the manual route and its failure points, then the shortcut: the Baidu Search API on Apify, which returns Baidu SERPs as structured JSON with per-page billing.
Disclosure: the Apify links in this post are affiliate links. If you run the Actor, I may earn a referral commission at no extra cost to you.
Does Baidu have an API?
Sort of, but not for you, probably. Baidu runs a large developer platform, and registration generally expects a mainland Chinese phone number, which stops most non-Chinese teams at the first form field. Even past that gate, none of the official products hand you the organic search results page as JSON. So for SERP data, a Baidu API in practice means a scraper consumed like an API: query in, ranked results out, no Chinese number required.
What the Baidu API returns
The Baidu API returns one dataset item per SERP page as structured JSON: organic results with position, title, and link, plus the SERP features Baidu shows around them.
| Field | Example | Notes |
|---|---|---|
organic_results |
[{"position": 1, "title": "...", "link": "..."}] |
One row per result |
displayed_link |
www.example.cn |
When Baidu shows it |
related_searches |
[{"query": "...", "link": "..."}] |
Query expansion material |
top_searches |
trending entries with text and link
|
What China is searching now |
answer_box, related_videos
|
populated when the SERP shows them | Feature tracking |
total_results_found |
100000000 |
With pages_processed and pagination info |
Page metadata rides along on every item: query, device, localization, page, search_timestamp, and pagination_info.
Who this is for
SEO teams tracking rankings in the Chinese market, brand and market researchers checking how a company shows up in China, and builders giving an AI agent the ability to search the Chinese web.
The manual way, and where it breaks
Scraping baidu.com yourself is a genuinely bad time. From a non-China IP you get aggressive anti-bot responses, so you are immediately shopping for proxies. The interface and markup are Chinese-only, so debugging selectors means translating as you go. Organic links are wrapped in redirects, pagination shifts between device types, and the layout changes without notice. Each problem is solvable; the stack of them is a maintenance contract you did not mean to sign.
The faster way: run the Baidu scraper
Apify Console
- Open the Baidu Search API and click Try for free.
- Enter a
query, optionally setdevice,localization, andmax_pagination. - Run it and download the dataset as JSON, CSV, or Excel.
REST
curl -X POST "https://api.apify.com/v2/acts/johnvc~Baidu-Search-Scraper/runs?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "query": "项目管理软件", "localization": 2, "max_pagination": 1 }'
Run endpoint reference: the Apify API docs.
Get Baidu search results in Python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("johnvc/Baidu-Search-Scraper").call(
run_input={
"query": "crm 软件",
"localization": 2,
"num_results": 10,
"max_pagination": 3,
}
)
for page in client.dataset(run["defaultDatasetId"]).iterate_items():
for result in page.get("organic_results", []):
print(result["position"], result["title"], result["link"])
localization: 2 pins results to Simplified Chinese, which keeps runs comparable; max_pagination is the cost control.
Search Baidu without a Chinese phone number
The task that names the whole problem: Search Baidu by API without a Chinese number, with a Chinese-language version of the same recipe.
Check how your brand ranks on Baidu
Check how your brand ranks on Baidu (also in Chinese) runs a keyword and reads your domain's position, the atomic unit of China SEO reporting.
Export Baidu results to CSV
Export Baidu search results to CSV (and the Chinese variant) drops the same rows into a spreadsheet for whoever asked for "the China numbers".
Use it from Claude and other MCP clients
Connect the Apify MCP server (https://mcp.apify.com/?tools=actors,docs,johnvc/Baidu-Search-Scraper) and Claude, Claude Code, or Cursor can run a live Baidu search mid-conversation, which is the only sane way I know to give an English-speaking agent eyes on the Chinese web. The task Get Baidu search results in Claude via MCP has the config (Chinese version here), and you can read more about Claude at claude.ai.
FAQ about scraping Baidu
How much does the Baidu scraper cost to run?
A small one-time start fee per run plus a per-page fee, pre-charged from max_pagination, so you know the ceiling before the run starts. A one-page search costs a few cents, and there is no monthly rental; you pay only for what you run. New Apify accounts include free platform credit.
Do I need a Chinese phone number to use this Baidu scraper?
No, and that is most of the pitch. You run it with a regular Apify account, no Baidu registration, no mainland verification, no VPN.
Can Claude search Baidu through this scraper?
Yes. Over MCP the scraper becomes a callable tool, so an agent can check the Chinese SERP for a brand, product, or topic and reason over the results in the same conversation.
Can I schedule the Baidu scraper to track keywords?
Yes. Save one task per keyword, keep device and localization constant, attach an Apify Schedule, and compare position across runs. Depth is bounded by max_pagination, so a site outside that depth reads as unranked. Start from the Baidu Search API.
Why do some of the scraper's result links look like Baidu redirects?
Because they are. Baidu wraps many organic links in redirect URLs; when displayed_link is present you get the readable domain, and otherwise you resolve redirects client-side or match your domain inside title. Positions also fluctuate run to run, so trends across checks beat any single reading.
More from Truffle Pig Data
Same Actor, other angles: Baidu Search API for AI agents on Medium, the Baidu Search API write-up on LinkedIn, and how to search Baidu without a Chinese phone number on Peerlist.
Wrapping up
The Chinese SERP does not have to be a black box. Point the Baidu Search API at a query and read the results as JSON, no phone number involved.
Top comments (0)