Baidu API

Get Baidu search results with the real URLs, as JSON

median response
2.8s
endpoints
6
credits per call
1–3
Measured on live customer calls,

The Baidu Search API returns Baidu (百度) results as JSON.

This page covers what the Baidu API returns, who uses it, a real response and pricing. Every parameter and response field is in Baidu API parameters and responses →

POST/baidu/v1/search
Real result, captured Nov 6, 20261 of 6
current_page1
results_per_page
10
page_offset
0
next_page_offset
10
total_pages
76
6 active endpoints, on 1, 2 and 3 credit tiers.search · news · images · videos · suggest · resolve_linkDetails ↓OpenAPI 3.0 spec ↗

3 credits per call≈ $3/1,000 calls1,000 free credits, no card

Get a free API key
Try it live

Run the call yourself, on the real endpoint

Change a parameter and press Try it. The response on the right is what your code will receive.

Baidu API

3 of 6 endpoints, ready to run

View docs ↗

Ranked Baidu results with title, the real destination URL, Baidu's redirect link, snippet, source and date — plus ads, related searches, top stories, shopping cards, the Baike knowledge panel and Baidu Hot Search on the same call.

3 credits1 required · 4 optional
POST/baidu/v1/search
idle
// Press "Try it" and this pane shows exactly what the
// live site returned this second — including an empty
// result, if that is the truth. No key, no account.

Try every endpoint in the playground

Endpoints

What Baidu endpoints does ReefAPI ship?

6 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.

  • search

    3 cr

    Baidu web search results for a query.

    required
    q
    optional
    page, num, offset, time_period, date_from, date_to, gpc, site, file_type, scope, resolve_links
  • news

    3 cr

    Baidu News (百度资讯) results.

    required
    q
    optional
    page, sort
  • images

    2 cr

    Baidu Images (百度图片) results.

    required
    q
    optional
    page
  • videos

    2 cr

    Baidu Video search (百度视频) results.

    required
    q
    optional
    page
  • suggest

    1 cr

    Baidu search autocomplete.

    required
    q
    optional
    —
  • resolve_link

    1 cr

    Turn a Baidu redirect link (https://www.baidu.com/link?url=…) into the destination URL it poi…

    required
    url
    optional
    —

Every parameter, every allowed value →

Missing a Baidu endpoint, or need a source we don't have yet?Contact us real people · same-day reply.
How it works

How the Baidu API works

Baidu is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.

Authenticate01
x-api-key header

No OAuth app, no request signing, no per-site account. One key covers all 632 engines.

Call02
POST /baidu/v1/…

Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.

Pay03
1 or 2 or 3 credits per call

Credits, not seats. Failed and blocked calls are never charged, and nothing is cached: every call reads the source live.

Read04
{ ok, data, meta, error }

One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.

Recipe

Store url, keep link only as provenance

Every link on a Baidu results page goes through baidu.com/link?url=…. The engine returns the destination in url on the same call, so you do not need to follow anything yourself.

01search
POST/baidu/v1/search
{"q": "python", "site": "zhihu.com", "num": 20}

Read organic_results[].url and domain. link is Baidu's redirect for the same result; it expires, url does not.

02search
POST/baidu/v1/search
{"q": "笔记本电脑"}

Ads are in ads[], never mixed into organic_results. Each ad carries landing_url, the advertiser's page, and placement: top, middle or bottom.

03resolve_link
POST/baidu/v1/resolve_link
{"url": "http://www.baidu.com/link?url=…"}

Only for a link you got somewhere else. Ad click links are refused on purpose — following one would register a click.

Rows keyed on the real URL, a type field that says which Baidu card each row came from (www_index is an ordinary web result), and Baidu's own position number.

request
curl -X POST https://api.reefapi.com/baidu/v1/search \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"q":"笔记本电脑"}'
response envelope
{
  "ok": true,
  "data": { … },
  "meta": {
    "api": "baidu",
    "endpoint": "search",
    "mode": "live",
    "latency_ms": …,
    "record_count": …
  },
  "error": null
}
Fields

What each action returns

Measured on 2026-11-06 with live calls. Every action returns the standard envelope; rows below are inside data.

ActionRowsFilters and paging
searchorganic_results[], ads[], related_searches[], top_stories[], shopping_results[], knowledge_graph, ai_overview, hot_searches[], paginationnum 10-50, page 1-76 or offset, time_period or date_from/date_to, site, file_type, scope (title or url), resolve_links
newsnews_results[] with url, source, snippet, date, thumbnail; total_resultssort relevance or date, page (10 per page)
imagesimage_results[] with original, thumbnail, width, height, format, source_page; total_resultspage (30 per page)
videosvideo_results[] with the real video page URL, duration, platform name, date, thumbnailpage (about 10 per page)
suggestsuggestions[], Baidu's autocomplete in order—
resolve_linkurl: where a baidu.com/link?url=… redirect pointsad click links are refused

A query Baidu marks as having no results returns NOT_FOUND, within a couple of seconds and without retrying; on images this also covers a page past the last one Baidu serves. ai_overview is Baidu's AI answer as plain text per section, with its cited sources listed once. A layout change on Baidu's side returns SCHEMA_DRIFT rather than an empty success.

Coverage

What Baidu actually returns, measured

Measured on 2026-11-06 with more than 150 live calls — Chinese and English queries, every filter, every action — through the same gateway path customers use.

Real URLs without extra requests

Baidu prints the destination of an ordinary web result inside the page, next to its own redirect link. The engine reads it there, so url is filled on the same call for web results, news articles and videos. resolve_links=true only matters for Baidu's own cards that carry no destination.

Not every row is a web page

A Baidu results page mixes ten ordinary results with Baidu's own cards: Baike, Tieba, Zhidao, maps, Baijiahao. They are returned as rows with a type field. Pure widgets — related searches, top stories, image and video strips, shopping cards, the AI answer — go to their own arrays, so organic_results can hold fewer than ten rows on a page that shows ten blocks.

No China exit needed

Baidu answers from outside mainland China. Results are Baidu's Chinese index either way; there is no country or language parameter, because Baidu does not offer one.

Against us: site: is broader than the domain

Baidu's own site: operator also matches the same name under a country suffix: site:apple.com returned apple.com.cn pages alongside apple.com ones. The rows are what Baidu returned; filter on domain if you need an exact match.

Against us: a nonsense query is still answered

Baidu fills a query it cannot match with loosely related pages instead of saying nothing. A page Baidu itself marks as empty comes back as NOT_FOUND; a filled page comes back as results, exactly as Baidu shows it, so check relevance for machine-generated queries.

Dates are Baidu's display dates

Baidu shows relative dates such as 5天前 or 20分钟前. date is that converted to YYYY-MM-DD in China time at the moment of the call; date_text keeps Baidu's original wording. Rows Baidu does not date have date null.

Use cases

What people build with Baidu

The jobs this data is most often used for.

01

SEO teams track where a site ranks on Baidu for Chinese keywords, page by page up to 50 results per call.

02

Market researchers read what Chinese searchers see for a brand: results, ads and the advertisers behind them, top stories.

03

Keyword research tools pull Baidu autocomplete and related searches to collect the phrasing Chinese users actually type.

04

AI and RAG pipelines use search and news as a Chinese-language retrieval source with real URLs and dates.

6

endpoints

1/2/3

credits per call

Pricing

What Baidu data costs

The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.

$0.67–$1.50 / 1,000 credits
Full pricing →
  • 1,000 free credits on signup, no card
  • One key, all 632 APIs, one credit pool
  • Failed and blocked calls are never charged
  • Credits roll over and never expire
no credit card1,000 free credits · instant API key · pay by card or crypto
Quickstart

Call it in two lines

Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.

curl
curl -X POST https://api.reefapi.com/baidu/v1/search \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"q":"笔记本电脑"}'
python
import os
import requests

REEF_KEY = os.environ["REEF_KEY"]

r = requests.post(
    "https://api.reefapi.com/baidu/v1/search",
    headers={"x-api-key": REEF_KEY},
    json={
        "q": "笔记本电脑"
    },
    timeout=90,
)
print(r.json()["data"])
FAQ

Have a question? We got answers.

The questions people actually ask before wiring up Baidu.

Is this an official Baidu API?▾

No. Baidu has no public web-search API for developers outside China. ReefAPI is an independent service that returns what Baidu's public results page shows, as JSON.

Do I get the real URL or Baidu's redirect?▾

Both. url is the destination, read from the page itself, and link is Baidu's baidu.com/link?url=… redirect for the same result. Store url; the redirect tokens change between calls.

Are ads separated from organic results?▾

Yes. Sponsored results are only in ads[], with title, description, landing_url (the advertiser's page) and placement (top, middle or bottom). The engine never follows an ad click link.

How many results can I get per query?▾

Up to 50 per call with num=50, and Baidu itself lists at most 76 pages. Use page or offset to go deeper. Positions are Baidu's own rank numbers, so they can skip the slots taken by Baidu's widgets.

Can I search one site or a date range?▾

Yes. site=zhihu.com restricts to a domain (Baidu also matches the same name under a country suffix, such as apple.com.cn). time_period=day|week|month|year or date_from/date_to set Baidu's time filter. Operators typed into q work too.

Does it work for English queries?▾

Yes, but the index is Baidu's: English queries return the English pages Baidu has, mixed with Chinese pages about the topic. Baidu News may hold very few English articles; total_results tells you how many it has.

What is the Baidu API?▾

Baidu API is a ReefAPI endpoint group for baidu (百度) search results as json: web results with the real url, ads, related searches, news, images, videos and autocomplete. It returns live JSON through POST requests under /baidu/v1.

Is the Baidu API free to try?▾

Yes. ReefAPI starts with 1,000 free credits, no card required. Baidu calls use the same shared credit balance as every other ReefAPI engine.

Do I need a Baidu login or account?▾

No login to Baidu is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.

How fresh is the Baidu data?▾

The page example is captured from a live search call, and production requests fetch live data through ReefAPI rather than a static sample.

How many credits does the Baidu API use?▾

Baidu actions currently cost 1-3 credits per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.

Can I call Baidu from an AI assistant or MCP client?▾

Yes. Connect ReefAPI once through MCP and your assistant can call baidu actions with the same key, credit pool and JSON envelope used by normal REST requests.

Is the Baidu API a Baidu scraper?▾

It is the managed alternative to a DIY Baidu scraper. Instead of building and maintaining your own scraper — proxies, headless browsers, captcha and constant breakage — you call one ReefAPI endpoint and get the same baidu (百度) search results as json: web results with the real url, ads, related searches, news, images, videos and autocomplete back as clean JSON.

Why does my Baidu scraper keep getting blocked?▾

Most Baidu scrapers break on anti-bot defenses, rate limits and IP bans that need rotating residential proxies and browser fingerprinting to clear. ReefAPI handles all of that for you — no proxies, no captchas, no maintenance — and returns live JSON. Blocked calls are free.

Same key

11 Search & SEO APIs on the same key

One key, one credit pool, one response envelope. If you are pulling Baidu, you are one call away from the rest of the category — no second contract, no second integration.

Already paying for something else?Baidu vs FirecrawlBaidu vs OxylabsBaidu vs ParseHub
Contact

Need something this API does not do?

Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.

0/4000

No account needed · we reply from [email protected]

Try it on your own data before you pay anything

The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 631 APIs, and the same envelope everywhere.

Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-11-06.