Baidu Search Engine Results API
/search?engine=baidu
API endpoint allows you to scrape the results from Baidu search engine via our SerpApi service. Head to the playground for a live and interactive demo.
API Parameters
Pagination
Advanced Filters
gpc
Optional
Parameter defines the time period for results. (e.g., stf=1733414864,1734019664|stftype=1
only returns results from the past 7 days. First integer within the parameter,1733414864
is Unix Timestamp for 7 days ago. Second integer,1734019664
is Unix Timestamp for now.).
Serpapi Parameters
device
Optional
Parameter defines the device to use to get the results. It can be set to desktop
(default) to use a regular browser, tablet
to use a tablet browser (currently using iPads), or mobile
to use a mobile browser (currently using iPhones).
no_cache
Optional
Parameter will force SerpApi to fetch the Baidu results even if a cached version is already present. A cache is served only if the query and all parameters are exactly the same. Cache expires after 1h. Cached searches are free, and are not counted towards your searches per month. It can be set to false
(default) to allow results from the cache, or true
to disallow results from the cache. no_cache and async parameters should not be used together.
async
Optional
Parameter defines the way you want to submit your search to SerpApi. It can be set to false
(default) to open an HTTP connection and keep it open until you got your search results, or true
to just submit your search to SerpApi and retrieve them later. In this case, you'll need to use our Searches Archive API to retrieve your results. async and no_cache parameters should not be used together. async should not be used on accounts with Ludicrous Speed enabled.
zero_trace
Optional
Enterprise only. Parameter enables ZeroTrace mode. It can be set to false
(default) or true
. Enable this mode to skip storing search parameters, search files, and search metadata on our servers. This may make debugging more difficult.
API Results
JSON Results
JSON output includes structured data for Organic Results, Ads Results, Answer Box, Related Searches, and more.
A search status is accessible through search_metadata.status
. It flows this way: Processing
-> Success
|| Error
. If a search has failed, error
will contain an error message. search_metadata.id
is the search ID inside SerpApi.
HTML Results
HTML output is useful to debug JSON results or support features not supported yet by SerpApi.
HTML output gives you the raw HTML results from Baidu.
API Examples
Example with q: Coffee
{
"search_metadata": {
"id": "5cfc676056794c051f463d6d",
"status": "Success",
"created_at": "2019-06-09 01:56:48 UTC",
"processed_at": "2019-06-09 01:56:48 UTC",
"baidu_url": "https://www.baidu.com/s?wd=coffee&oq=coffee&tn=baidu&ie=UTF-8",
"total_time_taken": 5.45
},
"search_parameters": {
"q": "coffee"
},
"search_information": {
"query_displayed": "coffee",
"total_results": 34600000,
},
"organic_results": [
{
"position": 1,
"title": "coffee_百度百科",
"link": "http://www.baidu.com/link?url=DNWHTn_p1BapENFtevzgFns-9NaodAnMIxW0GXLuaFhvCD8iVYMd6eHchdrqN7SBZ-7g8S4ZssZuBAHNtxc9vRNyJ-N-BknB7FmFRMSVSTek8Jacfhn6PjJeMXpi103VEHZnAH2RjHQIiB3-SLg6zq",
"thumbnail": "https://ss2.baidu.com/6ONYsjip0QIZ8tyhnq/it/u=4230941942,666991723&fm=58",
"displayed_brand": "baike.baidu.com/",
"rich_snippet": [
{
"extensions": [
"简介:咖啡是用经过烘焙的咖啡豆制作出来的饮料,与可可、茶同为流行于世界的主要饮品。咖啡树是属茜草科常乔木,日常饮用的咖啡是用咖啡豆配合各种不同的烹煮器具制作出来的,而咖啡..."
],
"detected_extensions": {
"简介": "咖啡是用经过烘焙的咖啡豆制作出来的饮料,与可可、茶同为流行于世界的主要饮品。咖啡树是属茜草科常乔木,日常饮用的咖啡是用咖啡豆配合各种不同的烹煮器具制作出来的,而咖啡..."
}
}
],
"sitelinks": [
{
"title": "历史",
"link": "http://www.baidu.com/link?url=8HBCpVbhsb-HJMJ6tAzcWAmAwPJk0V8ueLLDHLui4dduEEwOgLXqCUZRbMyQH2Ak5CEdLnnM40VZsueeVQwUtp7ROwZETPI9x1Z5Ohb9Yse9i_k30KY-rtTTfu5k9aswL8Yf_jnBNiPJcBKE9n_V3q"
},
{
"title": "成分功效",
"link": "http://www.baidu.com/link?url=8HBCpVbhsb-HJMJ6tAzcWAmAwPJk0V8ueLLDHLui4dduEEwOgLXqCUZRbMyQH2Ak5CEdLnnM40VZsueeVQwUtp7ROwZETPI9x1Z5Ohb9Yse9i_k30KY-rtTTfu5k9aswCldIkiLoY02hJVxbLDYm1K"
},
{
"title": "分类",
"link": "http://www.baidu.com/link?url=8HBCpVbhsb-HJMJ6tAzcWAmAwPJk0V8ueLLDHLui4dduEEwOgLXqCUZRbMyQH2Ak5CEdLnnM40VZsueeVQwUtp7ROwZETPI9x1Z5Ohb9Yse9i_k30KY-rtTTfu5k9aswqZNwwmDuQjh3WvqqEuosR_"
},
{
"title": "选购指南",
"link": "http://www.baidu.com/link?url=8HBCpVbhsb-HJMJ6tAzcWAmAwPJk0V8ueLLDHLui4dduEEwOgLXqCUZRbMyQH2Ak5CEdLnnM40VZsueeVQwUtp7ROwZETPI9x1Z5Ohb9Yse9i_k30KY-rtTTfu5k9aswtnidWD-tUAxNeujcDiqT2K"
},
{
"title": "中国发展",
"link": "http://www.baidu.com/link?url=8HBCpVbhsb-HJMJ6tAzcWAmAwPJk0V8ueLLDHLui4dduEEwOgLXqCUZRbMyQH2Ak5CEdLnnM40VZsueeVQwUtp7ROwZETPI9x1Z5Ohb9Yse9i_k30KY-rtTTfu5k9asw8yZE0mz9fP69tU87Xa8ajK"
},
{
"title": "更多>>",
"link": "http://www.baidu.com/link?url=DNWHTn_p1BapENFtevzgFns-9NaodAnMIxW0GXLuaFhvCD8iVYMd6eHchdrqN7SBZ-7g8S4ZssZuBAHNtxc9vRNyJ-N-BknB7FmFRMSVSTek8Jacfhn6PjJeMXpi103VEHZnAH2RjHQIiB3-SLg6zq"
}
],
"snippet": "简介:咖啡是用经过烘焙的咖啡豆制作出来的饮料,与可可、茶同为流行于世界的主要饮品。咖啡树是属茜草科常乔木,日常饮用的咖啡是用咖啡豆配合各种不同的烹煮器具制作出来的,而咖啡..."
},
{
"position": 2,
"title": "The Best Coffee from Starbucks Coffee",
"link": "http://www.baidu.com/link?url=CpzBvhCO9_vRSW-Snvbm6jMj6oml26g_GhHZFTcGM0Jae70N_5GNK4Pk_98GFwzS",
"displayed_link": "https://www.starbucks.com/coffee",
"snippet": "Starbucks Coffee Finder. Our coffee masters have distilled their years of tasting knowledge down to three simple questions to help you find a Starbucks ...",
"cached_page_link": "http://cache.baiducontent.com/c?m=9d78d513d9921cfb0cbac36a4a5689694312c6217dc0d16662c9d60dd6735b360620b0fb7765415d92d27c1050f21641bbad62266054&p=803fc315d9c040af11aeca2d0214c9&newp=ce738916d9c152ff57ee957e5b0098231610db2151d7db1f6b82c825d7331b001c3bbfb423261b01d0ce796105ae4b58eaf53478370327a3dda5c91d9fb4c574799b&user=baidu&fm=sc&query=coffee&qid=bb5511920107fffc&p1=3"
},
{
"position": 3,
"title": "CoffeeScript 中文",
"link": "http://www.baidu.com/link?url=n3ctIYCx730SW05S2936382-l3kjC9Ead-MsB9BveYCKPjcyuc_Qbagp91eo8dPX",
"displayed_brand": "coffee-script.org/",
"snippet": "CoffeeScript 中文, Unfancy JavaScript, 翻译... CoffeeScript仅提供了一种底层循环,即while循环。与JavaScript中的while 循环的主要区别是,在CoffeeScript中while可以...",
"cached_page_link": "http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece76310478a324d03d7743ca191443f8fd10e84642c1c0733feaf627f5052dc94213355f81e&p=8b2a9704c8d91ee508e2977f0d5ebb&newp=9c759a46d7c30efc57efd335534d97231610db2151d7d4166b82c825d7331b001c3bbfb423261b00d9c6766706ac435fe8f03479320821a3dda5c91d9fb4c57479c7&user=baidu&fm=sc&query=coffee&qid=bb5511920107fffc&p1=4"
},
{
"position": 4,
"title": "咖啡之家_咖啡行业门户网站_中国咖啡网_Coffee.CN",
"link": "http://www.baidu.com/link?url=8z9ub3Qox_8lIDHrrpVqeO3LFGZE6AyJ9mHTYQJLMV3",
"thumbnail": "https://ss0.baidu.com/73x1bjeh1BF3odCf/it/u=3729886114,650771747&fm=85&s=BC604C872AEA2C929F2465B70300D043",
"displayed_brand": "www.coffee.cn/",
"snippet": "咖啡之家(Coffee.CN)是中国领先的公益咖啡交流知识平台,致力于咖啡店管理经验分享,coffee咖啡师论坛共享咖啡机咖啡豆等技术的咖啡知识,免费发布咖啡师与西餐厨师招聘...",
"cached_page_link": "http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece763105392230e54f7326183844228c3933fc2384655023ba3ed28734d5087922b&p=8b2a9704c8d91ee508e2977f0f5ebb&newp=9c759a46d7c10efc57efd335534d97231610db2151d7d7166b82c825d7331b001c3bbfb423261b00d9c6766706ac435fe8f03479320821a3dda5c91d9fb4c57479c7&user=baidu&fm=sc&query=coffee&qid=bb5511920107fffc&p1=5"
},
{
"position": 5,
"title": "咖啡树_百度百科",
"link": "http://www.baidu.com/link?url=Pq-m745bN5vYCdfHRYWL4LKc89xKDu5ETm0CRRCSQMf83VowQvgI8JpHtYgEdSz47g1RCi4RTc5kAyBZZPgnfWLu240kQLxPE-J7gT1RnaL0mbr8-jCRgZ0q1ALcAAfY",
"thumbnail": "https://ss1.baidu.com/6ONXsjip0QIZ8tyhnq/it/u=2387447050,3102841189&fm=58&bpow=1200&bpoh=900",
"displayed_brand": "baike.baidu.com/",
"rich_snippet": [
{
"extensions": [
"咖啡树,为茜草科多年生常绿灌木或小乔木,是一种园艺性多年生的经济作物,具有速生、高产、价值高、销路广的特点。野生的咖啡树可以长到5至10公尺高,但庄园里种植的咖啡树,..."
]
}
],
"sitelinks": [
{
"title": "形态特征",
"link": "http://www.baidu.com/link?url=xSK8ABm9bEBf5V7URAYArnVEuwUUJOAjrkZCc9WedIa5cFMVmvoBIIJ13t6aceTbtgGS5OfEGsBZQJ72SQWlrQfhrshROUfOKqPCCJcreyIIHFCrY7r3N6pZvVfzDhVz"
},
{
"title": "生长环境",
"link": "http://www.baidu.com/link?url=xSK8ABm9bEBf5V7URAYArnVEuwUUJOAjrkZCc9WedIa5cFMVmvoBIIJ13t6aceTbtgGS5OfEGsBZQJ72SQWlrQfhrshROUfOKqPCCJcreyGRadCZ4Tmok-xVb_vXlL5F"
},
{
"title": "分布范围",
"link": "http://www.baidu.com/link?url=xSK8ABm9bEBf5V7URAYArnVEuwUUJOAjrkZCc9WedIa5cFMVmvoBIIJ13t6aceTbtgGS5OfEGsBZQJ72SQWlrQfhrshROUfOKqPCCJcreyIHO5gyv0TfzuUBaLIkfcbx"
},
{
"title": "主要价值",
"link": "http://www.baidu.com/link?url=xSK8ABm9bEBf5V7URAYArnVEuwUUJOAjrkZCc9WedIa5cFMVmvoBIIJ13t6aceTbtgGS5OfEGsBZQJ72SQWlrQfhrshROUfOKqPCCJcreyIOS22GMG2jGN8YVzLqVeqI"
},
{
"title": "栽培技术",
"link": "http://www.baidu.com/link?url=xSK8ABm9bEBf5V7URAYArnVEuwUUJOAjrkZCc9WedIa5cFMVmvoBIIJ13t6aceTbtgGS5OfEGsBZQJ72SQWlrQfhrshROUfOKqPCCJcreyHIx4MXpznrt7QeLf0n2B4J"
},
{
"title": "更多>>",
"link": "http://www.baidu.com/link?url=Pq-m745bN5vYCdfHRYWL4LKc89xKDu5ETm0CRRCSQMf83VowQvgI8JpHtYgEdSz47g1RCi4RTc5kAyBZZPgnfWLu240kQLxPE-J7gT1RnaL0mbr8-jCRgZ0q1ALcAAfY"
}
],
"snippet": "咖啡树,为茜草科多年生常绿灌木或小乔木,是一种园艺性多年生的经济作物,具有速生、高产、价值高、销路广的特点。野生的咖啡树可以长到5至10公尺高,但庄园里种植的咖啡树,..."
},
{
"position": 6,
"title": "Specialty Coffee Association",
"link": "http://www.baidu.com/link?url=aKdGD0f4HeIaIRibWiVwDQIq0qx4APIDrngJqLlgJCG",
"thumbnail": "https://ss0.baidu.com/73F1bjeh1BF3odCf/it/u=1261588650,3951064872&fm=85&s=0591AC704A5644D813202F47020050FD",
"displayed_link": "https://sca.coffee/",
"snippet": "The Specialty Coffee Association is a nonprofit, membership-based organization that represents thousands of coffee professionals, from producers to baristas all ...",
"cached_page_link": "http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed19fa950d100b96374a4380146d8a844128838e5cd6391b174837beef737547&p=99769a47819e15ff57ed923b4c53&newp=c47dce15d9c347fb1baec7710f4d92695c16ed633ac3864e1290c408d23f061d4866e0be23281605d6c0797347c2080ba8ff612e615763f4&user=baidu&fm=sc&query=coffee&qid=bb5511920107fffc&p1=7"
},
{
"position": 7,
"title": "咖啡加盟店_连锁费用_十大品牌排行榜-全球加盟网",
"link": "http://www.baidu.com/link?url=F8xo_T1MUsMj2EHXA6jEB5rdEd6MMm9N-8qqvFMfgvVFIZ7GA_JKK5zy_apohKdZ",
"displayed_brand": "kafei.jiameng.com/",
"snippet": "咖啡店排行榜 1 谁的咖啡 咖啡西餐 2 塞纳左岸咖啡 咖啡 3 啡域咖啡 咖啡 4 爱琴海咖啡 5 巴里岛咖啡 6 研磨时光 7 咖啡洞 8 易衡草本饮品 ...",
"cached_page_link": "http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece763104f84324e0f97634b8f8b462083cf1d84642c101a39feaf627f5052dc94213355f81e&p=99769a47819e15ff57ead13f48&newp=c47dce15d9c415ec1bbe9b7c5653d8234f08d30e3fd3c44324b9d71fd325001c1b69e3b82127160ed2c17a6c15e9241dbdb239256b5574f4d8&user=baidu&fm=sc&query=coffee&qid=bb5511920107fffc&p1=8"
},
{
"position": 8,
"title": "T-Coffee Home Page",
"link": "http://www.baidu.com/link?url=0HxysAsL9eKMFARHEyTAxx1OYVw-3tTlehLO1eRYwKGiihgJ2pTF2coUl0HL-By7BCt0PgWCsFvyT3s547Lk4K",
"displayed_brand": "www.tcoffee.org/Projec...",
"snippet": "What is T-Coffee? T-Coffee is a multiple sequence alignment package. You can use T-Coffee to align sequences or to combine the output of your ...",
"cached_page_link": "http://cache.baiducontent.com/c?m=9d78d513d9921cfb0cbac36a4a5689694312c6212bd6a3086291d60d84642c07163bb7ef70750704a4983c321ccd0901b2a76734761e66e6c69cdc1d8aa6&p=80769a479c9a11a05bed90655b55c1&newp=937ac54ad5c345b3039fdb2d0214cc231610db2151d2d401298ffe0cc4241a1a1a3aecbf23291404d8ce7f6700a94b56e9f23d75330834f1f689df08d2ecce7e33d3557b&user=baidu&fm=sc&query=coffee&qid=bb5511920107fffc&p1=9"
},
{
"position": 9,
"title": "在昆明市搜索coffee_百度地图",
"link": "http://www.baidu.com/link?url=PCpXwCsRzIdqoS0rrNN8Y_2EAyTkMbi-hdCWyFf4BPDg42CF9qcG16xwa35gUmGMVlNyZmg3LjlHI5jlurtHOZTYKqYWgikvzimrKq70wt5Y1sfRXCNxJUUDs8SKy9fr",
"displayed_brand": "map.baidu.com"
}
],
"answer_box": [
{
"position": 1,
"title": "coffee_百度翻译",
"link": "http://www.baidu.com/link?url=yzXU32pxTteKv4ytwca-acWFA8Ui4k_8s3kpQTMqMHRMPtpf6uBqOkblI9vAlnmEwKPfg2TrE2UgoiATqe0O0_",
"displayed_brand": "fanyi.baidu.com",
"type": "dictionary_results",
"english_word": "coffee",
"british": {
"phonetic": "[ˈkɒfi]",
"chinese_character": "英",
"audio_link": "https://sp0.baidu.com/-rM1hT4a2gU2pMbgoY3K/gettts?lan=uk&text=coffee&spd=2&source=alading"
},
"american": {
"phonetic": "[ˈkɔːfi]",
"chinese_character": "美",
"audio_link": "https://sp0.baidu.com/-rM1hT4a2gU2pMbgoY3K/gettts?lan=en&text=coffee&spd=2&source=alading"
},
"definitions": [
[
"n. (烘烤过的) 咖啡豆; 咖啡粉; 咖啡(热饮料); 一杯咖啡;"
],
[
"[其他] 复数:coffees"
]
]
}
],
"pagination": {
"current": 1,
"next": "https://www.baidu.com/s?wd=coffee&pn=10&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY&rsv_page=1",
"other_pages": {
"2": "https://www.baidu.com/s?wd=coffee&pn=10&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"3": "https://www.baidu.com/s?wd=coffee&pn=20&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"4": "https://www.baidu.com/s?wd=coffee&pn=30&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"5": "https://www.baidu.com/s?wd=coffee&pn=40&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"6": "https://www.baidu.com/s?wd=coffee&pn=50&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"7": "https://www.baidu.com/s?wd=coffee&pn=60&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"8": "https://www.baidu.com/s?wd=coffee&pn=70&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"9": "https://www.baidu.com/s?wd=coffee&pn=80&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY",
"10": "https://www.baidu.com/s?wd=coffee&pn=90&oq=coffee&ie=utf-8&usm=3&rsv_pq=bb5511920107fffc&rsv_t=418bvgyIbahFPS%2F9KM9kbu6MIXRhc5g%2F5Lc2D9bHesB8yNb%2FgS68aJYbmrY"
}
},
"serpapi_pagination": {
"current": 1,
"next": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=10&q=coffee",
"other_pages": {
"2": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=10&q=coffee",
"3": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=20&q=coffee",
"4": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=30&q=coffee",
"5": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=40&q=coffee",
"6": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=50&q=coffee",
"7": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=60&q=coffee",
"8": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=70&q=coffee",
"9": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=80&q=coffee",
"10": "https://serpapi.com/search.json?device=desktop&engine=baidu&f=8&oq=coffee&pn=90&q=coffee"
}
}
}