Baidu Search API: Chinese SERP Results as JSON
A Baidu search API without an official API key, a Chinese phone number, or a local account. One query returns the Baidu SERP as structured JSON: organic results with positions, plus related searches, people also search for, and top searches, filtered by device, language, and time period.
When to use this skill
- The user wants a "Baidu API" or "Baidu search API" without a Chinese account or phone number.
- They want Baidu search results as JSON or CSV for a query.
- They want to see what ranks on baidu.com for a keyword.
- They need structured Baidu data for market research, content research, or an AI agent.
Not for: rank tracking over time (use the apify-baidu-rank-tracker skill), Google or Yandex SERPs, or Baidu Maps and other Baidu verticals.
What you get (one dataset item per SERP page)
Each dataset item is one page of results with nested arrays. organic_results holds rows with position, title, and link on every row, plus displayed_link, rich_snippet, and sitelinks when Baidu shows them. The item also carries related_searches (query, link), people_also_search_for (text, link), top_searches (position, tag, text, link), and answer_box and related_videos arrays that populate only when Baidu shows those SERP features. Page metadata rides along: query, device, localization, page, num_results, total_results_found, pages_processed, search_timestamp, search_metadata (includes pagination_limit_reached), and pagination_info (total_pages, current_page).
Prerequisites
The Actor
Run it with the Apify CLI
One page of Baidu results for a Chinese query:
apify actors call "johnvc/Baidu-Search-Scraper" -i '{"query":"机器学习","max_pagination":1}' \
--json \
--user-agent apify-awesome-skills/apify-baidu-search-api \
2>/dev/null
A deeper read: Simplified Chinese results only, 20 per page, up to 3 pages:
apify actors call "johnvc/Baidu-Search-Scraper" -i '{"query":"crm software","localization":2,"num_results":20,"max_pagination":3}' \
--json \
--user-agent apify-awesome-skills/apify-baidu-search-api \
2>/dev/null
Every call carries the three flags this repo expects: --json, --user-agent apify-awesome-skills/apify-baidu-search-api, and 2>/dev/null.
Run it from Claude or another AI agent (MCP)
The Actor is MCP-ready. Add the hosted server URL:
https://mcp.apify.com/?tools=actors,docs,johnvc/Baidu-Search-Scraper
Then ask, for example: "Search Baidu for 机器学习 and list the organic results with positions and links." MCP setup docs: https://docs.apify.com/platform/integrations/mcp
Workflow
- Build the query.
query is the only required field. Chinese queries return the most natural Baidu results; English queries work too.
- Localize. Set
localization to 2 for Simplified Chinese only or 3 for Traditional Chinese only (1, the default, is all languages). Pick device (desktop, mobile, tablet) for the SERP variant you care about.
- Bound the volume.
max_pagination (default 3) is the cost driver; num_results (default 10, max 50) sets rows per page. For a quick look, max_pagination 1 is enough.
- Narrow by date if needed.
time_period takes stf=START_UNIX,END_UNIX|stftype=1 with Unix timestamps; leave it blank for all dates.
- Estimate cost, then confirm with the user if the run is large. See
references/gotchas.md.
- Run the Actor and read the dataset. Each item is one page; read the nested
organic_results array and flatten client-side if the user wants CSV or one row per result.
Inputs
query (string, required): the search term
device (enum: desktop, mobile, tablet; default desktop)
localization (integer: 1 all languages, 2 Simplified Chinese, 3 Traditional Chinese; default 1)
page (integer, default 1): starting page number
num_results (integer, default 10, max 50): results per page
max_pagination (integer, default 3): page cap, the cost driver
time_period (string): stf=START_UNIX,END_UNIX|stftype=1 date window
Cost
Billing is a small one-time start fee per run plus a per-page fee, and pages are charged up front from max_pagination, so set it to what you actually need. A default 3-page run costs well under a dollar; live prices and thresholds are in references/gotchas.md.
Honest limits
- Organic rows always carry
position, title, and link; displayed_link, rich_snippet, and sitelinks appear only on rows where Baidu shows them. There is no flat snippet field on every row.
answer_box and related_videos populate only when Baidu shows those features for the query.
- Baidu can return fewer rows than
num_results on a page; total_results_found reflects what actually came back.
- Result links can be Baidu redirect URLs (baidu.com/link?url=...) rather than final destination URLs.
Troubleshooting
- Empty
organic_results: the query has no results on Baidu; try a broader term or a Chinese-language query.
- Results in the wrong script: set
localization to 2 (Simplified) or 3 (Traditional) instead of the default 1.
- Fewer pages than
max_pagination: Baidu ran out of results; check pagination_limit_reached in search_metadata.
- Run exits early with a budget warning: the run hit its spending limit; raise it or lower
max_pagination.
See references/gotchas.md for cost guardrails and error recovery, and references/actor-index.md for the Actor routing table.
Related international SERP Actors
1---2name: apify-baidu-search-api3description: Get structured Baidu search results without an official API key or Chinese account using the Apify Baidu Search Scraper Actor (johnvc/Baidu-Search-Scraper). One query returns one dataset item per SERP page with nested organic_results (position, title, link, plus displayed_link, rich_snippet, and sitelinks when Baidu shows them), related_searches, people_also_search_for, and top_searches, filtered by device, Simplified or Traditional Chinese, and time period. Use when the user wants a baidu api, a baidu search api or baidu serp api, Baidu search results as JSON or CSV, to scrape Baidu, structured baidu data for research or AI agents, or to see what ranks on baidu.com for a query. Pay-per-page billing, MCP-ready for Claude and other AI agents.4license: MIT5---67# Baidu Search API: Chinese SERP Results as JSON89A Baidu search API without an official API key, a Chinese phone number, or a local account. One query returns the Baidu SERP as structured JSON: organic results with positions, plus related searches, people also search for, and top searches, filtered by device, language, and time period.1011## When to use this skill1213- The user wants a "Baidu API" or "Baidu search API" without a Chinese account or phone number.14- They want Baidu search results as JSON or CSV for a query.15- They want to see what ranks on baidu.com for a keyword.16- They need structured Baidu data for market research, content research, or an AI agent.1718Not for: rank tracking over time (use the apify-baidu-rank-tracker skill), Google or Yandex SERPs, or Baidu Maps and other Baidu verticals.1920## What you get (one dataset item per SERP page)2122Each dataset item is one page of results with nested arrays. `organic_results` holds rows with `position`, `title`, and `link` on every row, plus `displayed_link`, `rich_snippet`, and `sitelinks` when Baidu shows them. The item also carries `related_searches` (`query`, `link`), `people_also_search_for` (`text`, `link`), `top_searches` (`position`, `tag`, `text`, `link`), and `answer_box` and `related_videos` arrays that populate only when Baidu shows those SERP features. Page metadata rides along: `query`, `device`, `localization`, `page`, `num_results`, `total_results_found`, `pages_processed`, `search_timestamp`, `search_metadata` (includes `pagination_limit_reached`), and `pagination_info` (`total_pages`, `current_page`).2324## Prerequisites2526- Apify account (sign up at https://apify.com?fpr=9n7kx3&fp_sid=skillrepo).27- Authentication via `apify login`, or an `APIFY_TOKEN` environment variable (Apify Console, Settings, Integrations).2829## The Actor3031- Store page: https://apify.com/johnvc/Baidu-Search-Scraper?fpr=9n7kx3&fp_sid=skillrepo32- Actor ID: `johnvc/Baidu-Search-Scraper`33- Pricing: a small per-run start fee plus a per-page fee (see `references/gotchas.md`).3435## Run it with the Apify CLI3637One page of Baidu results for a Chinese query:3839```bash40apify actors call "johnvc/Baidu-Search-Scraper" -i '{"query":"机器学习","max_pagination":1}' \41 --json \42 --user-agent apify-awesome-skills/apify-baidu-search-api \43 2>/dev/null44```4546A deeper read: Simplified Chinese results only, 20 per page, up to 3 pages:4748```bash49apify actors call "johnvc/Baidu-Search-Scraper" -i '{"query":"crm software","localization":2,"num_results":20,"max_pagination":3}' \50 --json \51 --user-agent apify-awesome-skills/apify-baidu-search-api \52 2>/dev/null53```5455Every call carries the three flags this repo expects: `--json`, `--user-agent apify-awesome-skills/apify-baidu-search-api`, and `2>/dev/null`.5657## Run it from Claude or another AI agent (MCP)5859The Actor is MCP-ready. Add the hosted server URL:6061`https://mcp.apify.com/?tools=actors,docs,johnvc/Baidu-Search-Scraper`6263Then ask, for example: "Search Baidu for 机器学习 and list the organic results with positions and links." MCP setup docs: https://docs.apify.com/platform/integrations/mcp6465## Workflow66671. Build the query. `query` is the only required field. Chinese queries return the most natural Baidu results; English queries work too.682. Localize. Set `localization` to 2 for Simplified Chinese only or 3 for Traditional Chinese only (1, the default, is all languages). Pick `device` (`desktop`, `mobile`, `tablet`) for the SERP variant you care about.693. Bound the volume. `max_pagination` (default 3) is the cost driver; `num_results` (default 10, max 50) sets rows per page. For a quick look, `max_pagination` 1 is enough.704. Narrow by date if needed. `time_period` takes `stf=START_UNIX,END_UNIX|stftype=1` with Unix timestamps; leave it blank for all dates.715. Estimate cost, then confirm with the user if the run is large. See `references/gotchas.md`.726. Run the Actor and read the dataset. Each item is one page; read the nested `organic_results` array and flatten client-side if the user wants CSV or one row per result.7374## Inputs7576- `query` (string, required): the search term77- `device` (enum: `desktop`, `mobile`, `tablet`; default `desktop`)78- `localization` (integer: 1 all languages, 2 Simplified Chinese, 3 Traditional Chinese; default 1)79- `page` (integer, default 1): starting page number80- `num_results` (integer, default 10, max 50): results per page81- `max_pagination` (integer, default 3): page cap, the cost driver82- `time_period` (string): `stf=START_UNIX,END_UNIX|stftype=1` date window8384## Cost8586Billing is a small one-time start fee per run plus a per-page fee, and pages are charged up front from `max_pagination`, so set it to what you actually need. A default 3-page run costs well under a dollar; live prices and thresholds are in `references/gotchas.md`.8788## Honest limits8990- Organic rows always carry `position`, `title`, and `link`; `displayed_link`, `rich_snippet`, and `sitelinks` appear only on rows where Baidu shows them. There is no flat snippet field on every row.91- `answer_box` and `related_videos` populate only when Baidu shows those features for the query.92- Baidu can return fewer rows than `num_results` on a page; `total_results_found` reflects what actually came back.93- Result links can be Baidu redirect URLs (baidu.com/link?url=...) rather than final destination URLs.9495## Troubleshooting9697- Empty `organic_results`: the query has no results on Baidu; try a broader term or a Chinese-language query.98- Results in the wrong script: set `localization` to 2 (Simplified) or 3 (Traditional) instead of the default 1.99- Fewer pages than `max_pagination`: Baidu ran out of results; check `pagination_limit_reached` in `search_metadata`.100- Run exits early with a budget warning: the run hit its spending limit; raise it or lower `max_pagination`.101102See `references/gotchas.md` for cost guardrails and error recovery, and `references/actor-index.md` for the Actor routing table.103104## Related international SERP Actors105106- Yandex Search Scraper (Russia and the CIS): https://apify.com/johnvc/Scrape-Yandex?fpr=9n7kx3&fp_sid=skillrepo107- Naver Search API (Korea): https://apify.com/johnvc/naver-search-api?fpr=9n7kx3&fp_sid=skillrepo108- DuckDuckGo Scraper (privacy-focused Western markets): https://apify.com/johnvc/DuckDuckGo-Scraper-for-serp-rankings?fpr=9n7kx3&fp_sid=skillrepo