Baidu · integration
Baidu SERP API
Baidu organic in your pipeline.
A REST endpoint for Baidu organic results: POST /v1/serp/baidu/organic with q and country, Bearer auth and idempotent retries. This page covers auth, UTF-8 Chinese queries and how to back off on 429 and 502.
Baidu endpoints opening soon.
import requests, time
for attempt in range(3):
r = requests.post("https://kieapi.com/v1/serp/baidu/organic",
headers={"Authorization": f"Bearer {KEY}", "Idempotency-Key": "bd-001"},
json={"q": "新能源汽车 销量", "country": "CN"})
if r.status_code not in (429, 502): break
time.sleep(2 ** attempt)
rows = r.json()["organic"]Integration checklist
- Store the API key server-side and send Authorization: Bearer <key>.
- Send q as UTF-8 text, 1–512 characters; Chinese queries need no extra encoding inside JSON.
- Set country (2–8 characters; default US). For mainland results use CN.
- Send an Idempotency-Key (1–128 characters) per logical search so retries bill once.
- On 502 FetchFailed or 429 RateLimited, back off exponentially and retry with the same key.
- Read organic[] and organic_count; treat rank, display_url and snippet as nullable.
Self-hosted library vs managed endpoint
Parser breaks when Baidu changes markup
Self-hosted Python library: You patch it
Managed endpoint: We patch it
Network and sessions
Self-hosted Python library: You run them
Managed endpoint: Server-side, not exposed
Cost model
Self-hosted Python library: Your servers and time
Managed endpoint: 2 Credits per completed search (display rate)
Control over raw page
Self-hosted Python library: Full
Managed endpoint: None; parsed rows only
Launch status for this page
Check engine availability before choosing an endpoint. Google also supports News, Images and asynchronous tasks.
- BaiduBaidu endpoints opening soon: until they open, requests return 503 service_unavailable and are not charged.
SERP searches are charged per successful search at a display rate of 2 Credits per search; failed searches are not charged. Polling task status is free. The current rate is on Pricing.
What this is not
- No published Baidu QPS or quota.
- Organic only.
- No task queue.
- No raw HTML.
Frequently asked questions
Max query length?
q is 1–512 characters.
Do retries double-charge?
No. The same Idempotency-Key bills once.
What if the upstream fetch fails?
You get 502 FetchFailed, and failed searches are not charged.
Async for Baidu?
No. Baidu is synchronous only.
Wire Baidu into your pipeline
Get an API key and run the checklist above.
Baidu endpoints opening soon.