# Baidu Search API — web, news, image & video results and suggestions (百度搜索 SERP)

> Baidu web search results for a query: ranked organic results with the REAL destination URL (not Baidu's redirect), snippet, source and date; sponsored results with the advertiser's landing page; related searches; top stories; shopping cards; Baidu Baike knowledge panel; Baidu's AI answer; Baidu Hot Search (百度热搜). Filters: results per page (10-50), page/offset, time window or custom date range, site and file type, plus Baidu's own query operators.
> ReefAPI engine `baidu` · 6 endpoints · clean JSON, no scraping or browsers to manage.

## How to call
- **Endpoint:** `POST https://api.reefapi.com/baidu/v1/<action>` with a JSON body.
- **Auth:** header `x-api-key: <YOUR_REEFAPI_KEY>` — create one free (1,000 credits, no card): https://reefapi.com/signup
- **Response (every call):** `{ ok: boolean, data: ..., meta: { record_count, credits, ... }, error: { code, message } }` — branch on `ok`. Failed calls are free.
- **One key + one shared credit pool** across every ReefAPI API. Per-call credits are listed on each endpoint below.
- **Use it from an AI agent (MCP):** connect `https://api.reefapi.com/mcp` (remote streamable-http). Clients that add connectors by URL, such as ChatGPT and the Claude app, connect with OAuth 2.1 (the user pastes their key once on a ReefAPI page; discovery at `/.well-known/oauth-protected-resource/mcp`). Config files send the key as `Authorization: Bearer <key>`. `?key=<key>` in the URL also works as a last-resort fallback.

## Endpoints

### POST https://api.reefapi.com/baidu/v1/search — 3 credits
Baidu web search results for a query: ranked organic results with the REAL destination URL (not Baidu's redirect), snippet, source and date; sponsored results with the advertiser's landing page; related searches; top stories; shopping cards; Baidu Baike knowledge panel; Baidu's AI answer; Baidu Hot Search (百度热搜). Filters: results per page (10-50), page/offset, time window or custom date range, site and file type, plus Baidu's own query operators.

**Parameters:**
- `q` (string, required) — Search query, in any language (Chinese, English…). Baidu's own operators work inside it: site:zhihu.com, intitle:word, filetype:pdf, "exact phrase", -word.
- `page` (integer, optional, default 1) — 1-based result page (num results per page), up to 76.
- `num` (integer, optional, default 10) — Results per page, 10-50 (Baidu's `rn`). Values outside the range are clamped.
- `offset` (integer, optional) — Absolute result offset (Baidu's `pn`), an alternative to page. offset=10 with num=10 is page 2.
- `time_period` (enum, optional) — Only pages Baidu dates inside this window (Baidu's time filter). [one of: day, week, month, year]
- `date_from` (string, optional) — Custom date range start (YYYY-MM-DD, China time). Use with date_to.
- `date_to` (string, optional) — Custom date range end (YYYY-MM-DD, inclusive).
- `gpc` (string, optional) — Raw Baidu time filter (stf=<from_epoch>,<to_epoch>|stftype=1 or 2), for callers who already build it. time_period and date_from/date_to are the simpler forms.
- `site` (string, optional) — Restrict results to one site or domain (adds site:<domain> to the query).
- `file_type` (enum, optional) — Only documents of this type (adds filetype:<type> to the query). [one of: pdf, doc, xls, ppt, rtf, txt]
- `scope` (enum, optional, default "all") — Where the query words must appear. [one of: all, title, url]
- `resolve_links` (boolean, optional, default false) — Also follow Baidu's redirect for results whose real URL Baidu did not print (widget cards, top stories). Web results already carry the real URL in `url`. Adds up to a second; ad click links are never followed.

**Returns:** search_parameters, organic_results[] (position, type, title, url = real destination, link = Baidu redirect, domain, snippet, source, date, date_text, baidu_property), ads[] (position, placement top|middle|bottom, title, landing_url, domain, description), related_searches[] (query, link), top_stories[] (title, url, source, date, snippet, thumbnail), shopping_results[] (title, price, currency, store, sales, url), knowledge_graph{title, type, description, image, link}, ai_overview{title, sections[]{heading, text}, sources[]{title, source, link}}, hot_searches[] (rank, query, pinned), pagination{current_page, results_per_page, page_offset, next_page_offset, total_pages}

**Example request body:**
```json
{
  "q": "笔记本电脑"
}
```

### POST https://api.reefapi.com/baidu/v1/news — 3 credits
Baidu News (百度资讯) results: headline, real article URL, publisher, snippet, publish time and thumbnail, 10 per page, by relevance or newest first. Includes Baidu's own count of matching articles.

**Parameters:**
- `q` (string, required) — Search query, in any language (Chinese, English…). Baidu's own operators work inside it: site:zhihu.com, intitle:word, filetype:pdf, "exact phrase", -word.
- `page` (integer, optional, default 1) — 1-based result page (10 articles per page), up to 76.
- `sort` (enum, optional, default "relevance") — Order of news results. [one of: relevance, date]

**Returns:** search_parameters, total_results, news_results[] (position, title, url, domain, source, snippet, date, date_text, thumbnail), pagination{current_page, next_page_offset}

**Example request body:**
```json
{
  "q": "比亚迪"
}
```

### POST https://api.reefapi.com/baidu/v1/images — 2 credits
Baidu Images (百度图片) results: original image URL, thumbnail, size, format, title and the page the image was found on, 30 per page, plus Baidu's total image count.

**Parameters:**
- `q` (string, required) — Search query, in any language (Chinese, English…). Baidu's own operators work inside it: site:zhihu.com, intitle:word, filetype:pdf, "exact phrase", -word.
- `page` (integer, optional, default 1) — 1-based result page (30 images per page), up to 76.

**Returns:** search_parameters, total_results, has_more, image_results[] (position, title, original, thumbnail, source_page, domain, width, height, format, is_gif)

**Example request body:**
```json
{
  "q": "熊猫"
}
```

### POST https://api.reefapi.com/baidu/v1/videos — 2 credits
Baidu Video search (百度视频) results: video title, the real video page URL (Bilibili, Haokan, iQIYI, Xigua…), duration, platform, publish date and thumbnail, about 10 per page.

**Parameters:**
- `q` (string, required) — Search query, in any language (Chinese, English…). Baidu's own operators work inside it: site:zhihu.com, intitle:word, filetype:pdf, "exact phrase", -word.
- `page` (integer, optional, default 1) — 1-based result page (about 10 videos per page), up to 30.

**Returns:** search_parameters, video_results[] (position, title, url, domain, link, duration, source, date, thumbnail)

**Example request body:**
```json
{
  "q": "iphone 17"
}
```

### POST https://api.reefapi.com/baidu/v1/suggest — 1 credit
Baidu search autocomplete: the query completions Baidu offers as you type. Fast and cheap — useful for Chinese keyword research.

**Parameters:**
- `q` (string, required) — Search query, in any language (Chinese, English…). Baidu's own operators work inside it: site:zhihu.com, intitle:word, filetype:pdf, "exact phrase", -word.

**Returns:** search_parameters, suggestions[] (ordered list of completions)

**Example request body:**
```json
{
  "q": "笔记本"
}
```

### POST https://api.reefapi.com/baidu/v1/resolve_link — 1 credit
Turn a Baidu redirect link (https://www.baidu.com/link?url=…) into the destination URL it points to. Ad click links (baidu.php) are not followed.

**Parameters:**
- `url` (string, required) — A Baidu redirect link (https://www.baidu.com/link?url=…), as returned in `link`.

**Returns:** link, url, domain

**Example request body:**
```json
{
  "url": "https://www.baidu.com/link?url=…"
}
```

## At scale
- **Volume:** 5M+ requests a day, measured at 60 requests a second across the fleet with no
  central bottleneck. Per-key limits are raised for high-volume accounts; volume pricing on request.
- **Missing a source:** tell us a site we do not cover and it becomes an engine. A customer asked
  for bestprice.gr on 21 Sep 2026 and it was in the catalog on 22 Sep.
- **Support:** 2 minute median time from a question in the live chat to the first answer. Setup
  help included, no support tier to buy.
- **One key, one credit pool** across every API. No per-site plans, no separate subscriptions.

## More
- Try it live, no code: https://reefapi.com/playground?engine=baidu
- Human docs page: https://reefapi.com/docs/baidu
- Overview page: https://reefapi.com/baidu-api
- Every ReefAPI API in one file (for your AI): https://reefapi.com/llms-full.txt
