Baidu AI Mode API
Send a question to the baidu_ai_mode engine to receive a structured answer. Text answers include Markdown and text blocks. Additional result collections depend on the source answer.
To continue an eligible answer, pass pagination.conversation_token with the next question. Continuation is available for the default model without deep_search. Deep search is supported only by the default model.
API Parameters
Search Query
-
- Name
-
q - Required
- Required
- Description
-
The question to send to Baidu AI Mode, up to 20000 characters. The limit counts UTF-16 code units; a supplementary character such as an emoji counts as two.
Answer Options
-
- Name
-
model - Required
- Optional
- Description
-
The model to use. The default parameter is
smartMode. A follow-up keeps its conversation model. Supported values:smartMode,ERINE-5.1.
-
- Name
-
deep_search - Required
- Optional
- Description
-
Enable deep search with the default model. Omit for conversation continuation.
Conversation
-
- Name
-
conversation_token - Required
- Optional
- Description
-
Use pagination.conversation_token from a fresh response to continue the conversation. Omit model and deep_search on follow-up requests. Up to 4096 characters.
API key
-
- Name
-
api_key - Required
- Required
- Description
-
Your SearchAPI API key. You can also use the Authorization: Bearer header.
Zero Data Retention
-
- Name
-
zero_retention - Enterprise Only
- Enterprise Only
- Required
- Optional
- Description
-
Set to true to disable persistent storage and request logging.
Response
https://www.searchapi.io/api/v1/search?engine=baidu_ai_mode&q=%E5%B0%8F%E7%B1%B3SU7%E5%92%8C%E7%89%B9%E6%96%AF%E6%8B%89Model+3%E5%93%AA%E4%B8%AA%E5%A5%BD
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "baidu_ai_mode",
"q": "小米SU7和特斯拉Model 3哪个好"
}
response = requests.get(url, params=params)
print(response.text)
{
"search_metadata": {
"id": "search_V6QeGdKRg9qesO0wg8mBExyv",
"status": "Success",
"created_at": "2026-11-05T17:08:28Z",
"request_time_taken": 32.73,
"parsing_time_taken": 0.13,
"total_time_taken": 32.86,
"request_url": "https://chat.baidu.com/search?word=%E5%B0%8F%E7%B1%B3SU7%E5%92%8C%E7%89%B9%E6%96%AF%E6%8B%89Model+3%...",
"html_url": "https://www.searchapi.io/api/v1/searches/search_V6QeGdKRg9qesO0wg8mBExyv.html",
"json_url": "https://www.searchapi.io/api/v1/searches/search_V6QeGdKRg9qesO0wg8mBExyv"
},
"search_parameters": {
"engine": "baidu_ai_mode",
"q": "小米SU7和特斯拉Model 3哪个好",
"model": "smartMode"
},
"text_blocks": [
{
"type": "paragraph",
"answer": "小米SU7在空间、性价比和智能配置上优势更突出,更适合家庭用户和小米生态用户;特斯拉Model 3在操控、三电效率和品牌成熟度上表现更好,更适合追求驾驶乐趣的单人用户。"
},
...
],
"markdown": "**小米SU7**在空间、性价比和智能配置上优势更突出,更适合家庭用户和小米生态用户;**特斯拉Model 3**在操控、三电效率和品牌成熟度上表现更好,更适合追求驾驶乐趣的单人用户。\n\n### 💰 价格与基础参数对比\n\n- **小米SU7**:起售价21.99万,定位中大型车,CLTC续航720-902km,零百加速5.28秒,轴距3000mm。\n- **特斯拉Model 3**:起售价23.55万,定位中型车,CLTC续航634-830km,零百加速6.1秒,轴距2875mm。\n- SU7起售价低约1.56万,基础版续航多出86km,车身尺寸和空间优势明显。\n\n### 🚗 驾驶与续航表现...",
"inline_images": [
{
"title": "小米su7 ultra最全选装指南来啦🤩 雷总这波操作真是绝了👏 预售",
"link": "http://m.yoojia.com/pages/dongtai/index?id=4056646002&from_src=biji_tab",
"original": "http://pics5.baidu.com/feed/b64543a98226cffcc4402ad24b66de9ff703eae4.jpeg?token=31ae1e66201637e169d3...",
"thumbnail": "https://img2.baidu.com/it/u=1627117557,3550565842&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=666"
},
...
],
"inline_videos": [
{
"position": 1,
"title": "特斯拉model3对比小米SU7,你喜欢哪辆?",
"link": "https://quanmin.baidu.com/sv?source=share-h5&pd=qm_share_search&vid=2260294490835179336",
"video_id": "2260294490835179336",
"channel": "优视汽车",
"duration": "1:42",
"thumbnail": "https://t13.baidu.com/it/u=3999218514,1656639834&fm=225&app=113&f=JPEG?w=2158&h=3840&s=A327DB00185FD..."
},
...
],
"web_results": [
{
"position": 1,
"title": "Xiaomi SU7 vs. Tesla Model 3: Which Tech Ecosystem Wins?",
"link": "https://www.xiaomicarsforsale.com/xiaomi-su7-vs-tesla-model-3-which-tech-ecosystem-wins-for-new-ev-b...",
"source": "www.xiaomicarsforsale.com",
"snippet": "For many EV shoppers, the choice between the Xiaomi SU7 and the Tesla Model 3 often comes down to one fundamental question: do you prefer a dedicated, closed-lo..."
},
...
],
"related_questions": [
{
"question": "需要我帮你整理一份两款车的落地价明细对比吗?帮你看清不同配置的实际购车总花费。"
},
...
],
"search_queries": [
"特斯拉Model 3产品参数及用户口碑",
...
],
"tools": [
{
"id": "GlobalSearch",
"name": "全球搜",
"type": "info",
"logo": "https://gips0.baidu.com/it/u=201678991,2283805978&fm=3028&app=3028&f=PNG&fmt=auto&q=100&size=f64_64"
}
],
"response_metadata": {
"model": "SEARCH_LIGHTNING",
"conversation_id": "8094652579025879245",
"message_id": "8d264a8f-c236-461b-b21d-c33739f140a0",
"is_web_search_performed": true
},
"pagination": {
"conversation_token": "eyJjb252ZXJzYXRpb25faWQiOiI4MDk0NjUyNTc5MDI1ODc5MjQ1Iiwic2Vzc2lvbiI6IlU1bWNZSTBxSWtIN2dZU2Rxd2NvbHBZNm5Qd1pqRmhTVjRNSituWVhzU1kzRi9zUDJPczByQ00vcm9TUFcyMHU2aURmSi9SbFhYck9aR2VkT2VyVG9TR21EV0NaVzJQd1ZHTHpjZDZVbGNNaERnTjduZGZjb3FzY3RMVGZSRFZ3NWxhWW5SanN1UW9NUlhtaXhURUd5Nk03M2N2L0M4eUxadWl6eStZQWpIV0c0ZFNGbXZFT1JkbG9ZQW9najBoS2RTYUZHWlBJM2JjcG9sOC9OR2xQRDR5UnQ5cTc3dHhSVVJJRi9ZdW16NUNCVlp3c0RDZHBHSVhINTJ1UytNelhyYmdMaEJiWVI1V2xOdE5sT1U0TldLTGx1aDcwN043aS9WQ2w4cC95ZWhidVdaRkZrSVdaTHJ5VktiaWgwUHJDdkFiTGJ2ckpHeFd2RVVISExQZ2h0alljTXlNUmwxMlhLY3QrcnkranI5QW04dk1Gd3ZqUGNtdE1lMXlDK0xXNzVGZ000NTRnRGtOZzJDVXlHTi9iMy9sK1FaRktoM1RaRUNUa3phQVpqd3ZPd1ZaZkV2OTdHajJCOENaZ1BmZWlPajlDRjJyQ3RQQjNpVWMreTFZcCt1Y292MnZ4ZVZKRnRDdmEvZjhQQTF6M2xoQnk0OWhsaVk0eEZBcTBRNVhpM2FROE5ZazUxRjBmWTRzSmhoUjlKOTcvU0t3cU04U1YwVHh2SVF4M1ZHcVZMWXJ3YlFTZndCZHRyL0c1TjlzWGFQTmlNeVU9LS12bG5RQjFocjdoQVVhN05ZLS1EVTV0SXZlUWd0V2I5eDNPdVVIMm9BPT0ifQ"
}
}
Weather cards include current and daily atmospheric pressure, with pressure_unit set to hPa (hectopascals).
Cards
https://www.searchapi.io/api/v1/search?engine=baidu_ai_mode&q=%E5%8C%97%E4%BA%AC%E4%BB%8A%E5%A4%A9%E5%A4%A9%E6%B0%94%E6%80%8E%E4%B9%88%E6%A0%B7
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "baidu_ai_mode",
"q": "北京今天天气怎么样"
}
response = requests.get(url, params=params)
print(response.text)
{
"cards": [
{
"type": "weather",
"source": {
"name": "百度天气"
},
"location": "北京",
"current": {
"temperature": 17,
"unit": "C",
"condition": "晴",
"feels_like": 15,
"humidity": 28,
"pressure": 1017.0,
"pressure_unit": "hPa",
"uv_index": 3,
"wind_direction": "东南风",
"air_quality": {
"aqi": 77,
"description": "良"
}
},
"forecast": [
{
"date": "2026-11-03",
"day_of_week": "Tuesday",
"high": 18,
"low": 5,
"condition": "晴",
"night_condition": "阴",
"condition_icon": "qing",
"humidity": 28,
"pressure": 1017,
"pressure_unit": "hPa",
"precipitation_chance": 0,
"wind_direction": "北风",
"air_quality": {
"aqi": 77,
"description": "良"
},
"sunrise": "06:45",
"sunset": "17:11",
"moon_phase": "残月",
"hourly": [
{
"time": "2026-11-03 14:00",
"temperature": 17,
"wind_direction": "东南风",
"wind_force": "2级",
"uv_index": 3,
"uv_level": "弱"
},
...
]
},
...
]
}
]
}
Video results can include key_moments with each chapter’s title and start_seconds.
Inline Videos
https://www.searchapi.io/api/v1/search?engine=baidu_ai_mode&q=%E7%94%A8%E7%BC%96%E5%8F%B7%E7%9A%84%E6%AD%A5%E9%AA%A4%E5%88%97%E5%87%BA%E6%9B%B4%E6%8D%A2%E6%B1%BD%E8%BD%A6%E5%A4%87%E8%83%8E%E7%9A%84%E6%96%B9%E6%B3%95
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "baidu_ai_mode",
"q": "用编号的步骤列出更换汽车备胎的方法"
}
response = requests.get(url, params=params)
print(response.text)
{
"inline_videos": [
{
"position": 1,
"title": "新手司机收好这份教程,爆胎之后自己就能换备胎#新手司机##汽车知识#",
"link": "https://quanmin.baidu.com/sv?source=share-h5&pd=qm_share_search&vid=4911542575866565466",
"video_id": "4911542575866565466",
"channel": "苏先生说车",
"duration": "5:47",
"thumbnail": "https://t14.baidu.com/it/u=1916147965,1127384714&fm=225&app=113&f=JPEG?w=535&h=713&s=4E50638F489381E..."
},
...
]
}
Inline Shopping
https://www.searchapi.io/api/v1/search?engine=baidu_ai_mode&q=%E6%8E%A8%E8%8D%90%E5%87%A0%E6%AC%BE2000%E5%85%83%E4%BB%A5%E5%86%85%E7%9A%84%E9%99%8D%E5%99%AA%E8%93%9D%E7%89%99%E8%80%B3%E6%9C%BA%EF%BC%8C%E7%BB%99%E5%87%BA%E4%BB%B7%E6%A0%BC%E5%92%8C%E8%B4%AD%E4%B9%B0%E9%93%BE%E6%8E%A5
- Python
- Node
- Ruby
- Java
- Go
- PHP
- Bash
- R
- Kotlin
- Swift
- C#
- C
- C++
- requests
import requests
url = "https://www.searchapi.io/api/v1/search"
params = {
"engine": "baidu_ai_mode",
"q": "推荐几款2000元以内的降噪蓝牙耳机,给出价格和购买链接"
}
response = requests.get(url, params=params)
print(response.text)
{
"inline_shopping": [
{
"position": 1,
"title": "华为FreeBuds 6i 降噪蓝牙耳机 旗舰级降噪深度 音乐游戏 安卓/苹果手机通用 流光紫",
"link": "https://item.jd.com/100130785640.html",
"tracking_link": "https://union-click.jd.com/jdc?e=0_2_ALgRfjhnvPZ_NONE|AISW&p=JF8BAQgJK1olXDYCVV9dCkoRCmsPHlolGVlaCgF...",
"product_id": "70295288732",
"thumbnail": "http://t13.baidu.com/it/u=3577770057,2445459105&fm=224&app=112&f=JPEG?w=500&h=500",
"price": "¥200起",
"extracted_price": 200,
"seller": "华为京东自营旗舰店",
"source": "京东",
"description": "破损包退换、7天价保、一年质保、支持7天无理由退货、90天只换不修"
},
...
]
}