Query with Localization
Baidu results can be localized by setting the interface language used during the query.
Parameter for Language
The SERP API provides an optional parameter to control the UI language for your Baidu search:
ct
(Optional):
0
= All languages (no language restriction; default behavior)1
= Simplified Chinese (简体中文)2
= Traditional Chinese (繁體中文)
Notes
ct
affects the Baidu UI/interface we simulate and tends to bias snippets/results toward that script. It does not translate content.Avoid combining strict localization with domain scoping: if you use
q6
(site filter)Some verticals/pages may partially ignore
ct
.
Example
To customize your SERP API request with a specific interface language, include the ct
parameter in your GET request.
curl --location 'https://serp-api.netnut.io/search/get-html?siteType=baidu&wd=%E6%B6%88%E6%81%AF&ct=1&rawHtml=1' \
--header 'Authorization: Basic base64(username:password)'
Expected Result:
Interface/script preference: Simplified Chinese.
Results/snippets favor 简体中文 content where available.
Baidu simulates a user searching with a Chinese (Simplified) UI.
API Response Example
{
"url": "https://www.baidu.com/s?wd=%E6%B6%88%E6%81%AF&ct=1",
"engine": "baidu",
"general": {
"id": "string",
"timestamp": "2025-08-20 14:16:24 UTC",
"baidu_url": "https://www.baidu.com/s?wd=%E6%B6%88%E6%81%AF&ct=1",
"resultscount": 0
},
"input": {
"wd": "消息",
"ct": "1",
"device": "desktop",
"engine": "baidu"
},
"organic_results": [
{
"position": 1,
"title": "string",
"snippet": "string",
"link": "string",
"displayed_link": "string",
"tracking_link": "string",
"thumbnail": "string"
}
],
"pagination": {
"current": 1,
"next": "string",
"other_pages": {
"2": "string",
"3": "string"
}
},
"html": "string"
}
Last updated