Baidu API endpoint
Returns Baidu result cards for a query: title, destination URL, snippet, publisher, and date, with page-based pagination. Each result's `type` is `web` (standard pages), `video` (video cards), or `baike` (Baidu Baike encyclopedia entries); answer widgets such as weather, entity panels, and recommendation lists are not returned. Baidu challenges a portion of requests with a security verification page; the service retries and returns 503 if every attempt is challenged, so callers should retry on 503.
/baidu/searchMCP tool: baidu_search
Query parameters:
q: required. Search query. Example: openai or 天气. Up to 200 characters.page: optional. 1-based result page. Defaults to 1, maximum 10. Any other value returns 400.Notable response behavior:
type is one of web (standard pages), video (video cards), or baike (Baidu Baike encyclopedia entries). Answer widgets such as weather panels, entity panels, Tieba cards without a link, and recommendation lists are not results and are not returned.source and date are the publisher name and date Baidu shows on the card; date is Baidu's own text, such as 2025年10月30日 or 1月19日, and is omitted when Baidu shows none.503, and the call can simply be retried.503 (parser drift), never as an empty success.pagination.next_page is present only when Baidu offers a next page and page is below 10.| Field | Filled in, of 8 checked | Values in the sample |
|---|---|---|
| position | 8 | 1 to 8, median 4 |
| type | 8 | web in all 8 |
| title | 8 | “微软与OpenAI矛盾的根源:AGI” and 7 other values |
| url | 8 | baijiahao.baidu.com and 4 other hosts |
| description | 8 | “根据双方2019年原始协议,OpenAI非营利董事会可以认定:当人工智能进化到超越人类的AGI(通用人工智能)阶段时,…” and 7 other values |
| source | 8 | “华尔街见闻” and 6 other values |
| date | 7 | “2025年6月26日” and 6 other values |
| Parameter | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| q | string | Yes | Search query | openai | |
| page | integer | No | 1 | 1-based result page; defaults to 1, maximum 10 Minimum: 1. Maximum: 10. | 1 |
| x-api-key (header) | string | Yes | API key required |
curl -X GET "https://api.crawlora.net/api/v1/baidu/search?q=openai&page=1" \ -H "x-api-key: $CRAWLORA_API_KEY"
{
"code": 200,
"msg": "OK",
"data": {
"query": "openai",
"results": [
{
"position": 1,
"type": "web",
"title": "OpenAI万亿估值之谜:营收百亿、支出千亿与市值神话的...",
"url": "https://baijiahao.baidu.com/s?id=1847370812297480431",
"description": "据路透社援引知情人士爆料,OpenAI正推进最早于2027年的上市计划",
"source": "新浪财经",
"date": "2025年10月30日"
}
],
"pagination": {
"page": 1,
"next_page": 2
}
}
}Request schema
No body schema
Response schema
#/definitions/baidu.searchResponseDoc
| Field | Type | Required | Enum | Bounds | Example | Description |
|---|---|---|---|---|---|---|
| code | integer | No | 200 | |||
| data | baidu.SearchResponse | No | ||||
| data.pagination | baidu.SearchPagination | No | ||||
| data.pagination.next_page | integer | No | 2 | |||
| data.pagination.page | integer | No | 1 | |||
| data.query | string | No | openai | |||
| data.results | array | No | ||||
| data.results[].date | string | No | 2025年10月30日 | |||
| data.results[].description | string | No | 据路透社援引知情人士爆料,OpenAI 正推进最早于2027年的上市计划 | |||
| data.results[].position | integer | No | 1 | |||
| data.results[].source | string | No | 新浪财经 | |||
| data.results[].title | string | No | OpenAI 万亿估值之谜 | |||
| data.results[].type | string | No | web, video, baike | web | ||
| data.results[].url | string | No | https://baijiahao.baidu.com/s?id=1847370812297480431 | |||
| msg | string | No | OK |
| Status | Description | Schema |
|---|---|---|
| 400 | Missing or invalid parameters | #/definitions/app.Response |
| 429 | Rate limit exceeded | #/definitions/app.Response |
| 500 | Internal server error | #/definitions/app.Response |
| 503 | Baidu upstream request failed or was challenged with a security verification | #/definitions/app.Response |
Use environment variables for secrets and keep Crawlora API keys server-side.
curl -X GET "https://api.crawlora.net/api/v1/baidu/search?q=openai&page=1" \
-H "x-api-key: $CRAWLORA_API_KEY"