Baidu organic search results for a keyword (async task)
dataforseo.x.serp-baidu-organic-task-postBaidu SERP API provides top 10 search engine results.
- Price
- $0.0012/callZum Listenpreis
- Success rate
- 100 %Last 30 days · 38 calls
- Latency p50
- 575 msp95 1.2 s
- Last verified
- 28.07.2026Verified working
POSThttps://toolswitch.dev/v1/tools/dataforseo.x.serp-baidu-organic-task-postBeta- Uses platform quota
- Asynchronous response
- Reads public data
Parameter
the POST body is a JSON array of up to 100 task objects with these fields, one per task; read each task's result (tasks[].id) with dataforseo.x.serp-baidu-organic-task-get-advanced, which only the submitting team can read
| Parameter | Typ | Erforderlich | Beschreibung | Beispiel |
|---|---|---|---|---|
| Anfragetext (JSON) | ||||
os | Zeichenkette | Optional | device operating system optional field if you specify desktop in the device field, choose from the following values: windows, macos default value: windows if you specify mobile in the device field, choose from the following values: android, ios default value: android if you specify tablet in the dev | |
tag | Zeichenkette | Optional | user-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response | some_string_123 |
depth | Ganzzahl | Optional | parsing depth optional field number of results in SERP default value: 10 max value: 700 Your account will be billed per each SERP containing up to 10 results; Setting depth above 10 may result in additional charges if the search engine returns more than 10 results; The cost can be calculated on the | |
device | Zeichenkette | Optional | device type optional field return results for a specific device type can take the values: desktop, mobile, tablet default value: desktop | |
keyword | Zeichenkette | Optional | keyword required field you can specify up to 700 characters in the keyword field all %## will be decoded (plus character ‘+’ will be decoded to a space character) if you need to use the “%” character for your keyword, please specify it as “%25”; if you need to use the “+” character for your keyword, | best iphone ever |
priority | Ganzzahl | Optional | task priority optional field can take the following values: 1 – normal execution priority (set by default) 2 – high execution priority You will be additionally charged for the tasks with high execution priority. The cost can be calculated on the Pricing page. | 2 |
match_type | Zeichenkette | Optional | target match type required field if stop_crawl_on_match is specified type of match for the match_value possible values: domain – specific domain or subdomain with_subdomains – main domain and subdomains wildcard – wildcard pattern | |
match_value | Zeichenkette | Optional | target domain, subdomain, or wildcard value required field if stop_crawl_on_match is specified specify a target domain, subdomain, or wildcard value; Note: domain or subdomain must be specified without a request protocol; example: "match_value": "dataforseo.com", "match_value": "/blog/post-*" | |
pingback_url | Zeichenkette | Optional | notification URL of a completed task optional field when a task is completed we will notify you by GET request sent to the URL you have specified you can use the ‘$id’ string as a $id variable and ‘$tag’ as urlencoded $tag variable. We will set the necessary values before sending the request. exampl | |
postback_url | Zeichenkette | Optional | URL for sending task results optional field once the task is completed, we will send a POST request with its results compressed in the gzip format to the postback_url you specified you can use the ‘$id’ string as a $id variable and ‘$tag’ as urlencoded $tag variable. We will set the necessary values | |
language_code | Zeichenkette | Optional | search engine language code required field if you don’t specify language_name you can receive the list of available languages of the search engine with their language_code by making a separate request to the https://api.dataforseo.com/v3/serp/baidu/languagesnote that the only language supported in B | |
language_name | Zeichenkette | Optional | full name of search engine language required field if you don’t specify language_code you can receive the list of available languages of the search engine with their language_name by making a separate request to the https://api.dataforseo.com/v3/serp/baidu/languagesnote that the only language suppor | |
location_code | Ganzzahl | Optional | search engine location code required field if you don’t specify location_name or location_coordinate if you use this field, you don’t need to specify location_name or location_coordinate you can receive the list of available locations of the search engines with their location_code by making a separa | 2156 |
location_name | Zeichenkette | Optional | full name of search engine location required field if you don’t specify location_code or location_coordinate if you use this field, you don’t need to specify location_code or location_coordinate you can receive the list of available locations of the search engine with their location_name by making a | |
postback_data | Zeichenkette | Optional | postback_url datatype required field if you specify postback_url corresponds to the datatype that will be sent to your server possible values: regular, html | |
get_website_url | Boolean | Optional | include direct URL for each ranked result optional field if set to true, the returned results will contain direct URLs of the ranked websites by default, the URLs in Baidu results are encoded by the search engine, for example: http://www.baidu.com/link?url=KQt6LSwU5OHnPtB8210R8flBP40grY6lTPxH_0UO7S2 | |
max_crawl_pages | Ganzzahl | Optional | page crawl limit optional field number of search results pages to crawl default value: 1 max value: 100 Note: the max_crawl_pages and depth parameters complement each other; learn more at our help center | |
location_coordinate | Zeichenkette | Optional | GPS coordinates of a location required field if you don’t specify location_name or location_code if you use this field, you don’t need to specify location_name or location_code location_coordinate parameter should be specified in the “latitude,longitude,radius” format the maximum number of decimal d | |
stop_crawl_on_match | Array | Optional | array of targets to stop crawling optional field if specified, the response will contain SERP results up to and including the specified match_value; you can specify up to 10 target values in this array example: "stop_crawl_on_match":[{"match_value":"dataforseo.com","match_type":"with_subdomains"}] l | |
- Anfragetext (JSON)
osZeichenketteOptionaldevice operating system optional field if you specify desktop in the device field, choose from the following values: windows, macos default value: windows if you specify mobile in the device field, choose from the following values: android, ios default value: android if you specify tablet in the dev
tagZeichenketteOptionaluser-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response
Beispiel:
some_string_123depthGanzzahlOptionalparsing depth optional field number of results in SERP default value: 10 max value: 700 Your account will be billed per each SERP containing up to 10 results; Setting depth above 10 may result in additional charges if the search engine returns more than 10 results; The cost can be calculated on the
deviceZeichenketteOptionaldevice type optional field return results for a specific device type can take the values: desktop, mobile, tablet default value: desktop
keywordZeichenketteOptionalkeyword required field you can specify up to 700 characters in the keyword field all %## will be decoded (plus character ‘+’ will be decoded to a space character) if you need to use the “%” character for your keyword, please specify it as “%25”; if you need to use the “+” character for your keyword,
Beispiel:
best iphone everpriorityGanzzahlOptionaltask priority optional field can take the following values: 1 – normal execution priority (set by default) 2 – high execution priority You will be additionally charged for the tasks with high execution priority. The cost can be calculated on the Pricing page.
Beispiel:
2match_typeZeichenketteOptionaltarget match type required field if stop_crawl_on_match is specified type of match for the match_value possible values: domain – specific domain or subdomain with_subdomains – main domain and subdomains wildcard – wildcard pattern
match_valueZeichenketteOptionaltarget domain, subdomain, or wildcard value required field if stop_crawl_on_match is specified specify a target domain, subdomain, or wildcard value; Note: domain or subdomain must be specified without a request protocol; example: "match_value": "dataforseo.com", "match_value": "/blog/post-*"
pingback_urlZeichenketteOptionalnotification URL of a completed task optional field when a task is completed we will notify you by GET request sent to the URL you have specified you can use the ‘$id’ string as a $id variable and ‘$tag’ as urlencoded $tag variable. We will set the necessary values before sending the request. exampl
postback_urlZeichenketteOptionalURL for sending task results optional field once the task is completed, we will send a POST request with its results compressed in the gzip format to the postback_url you specified you can use the ‘$id’ string as a $id variable and ‘$tag’ as urlencoded $tag variable. We will set the necessary values
language_codeZeichenketteOptionalsearch engine language code required field if you don’t specify language_name you can receive the list of available languages of the search engine with their language_code by making a separate request to the https://api.dataforseo.com/v3/serp/baidu/languagesnote that the only language supported in B
language_nameZeichenketteOptionalfull name of search engine language required field if you don’t specify language_code you can receive the list of available languages of the search engine with their language_name by making a separate request to the https://api.dataforseo.com/v3/serp/baidu/languagesnote that the only language suppor
location_codeGanzzahlOptionalsearch engine location code required field if you don’t specify location_name or location_coordinate if you use this field, you don’t need to specify location_name or location_coordinate you can receive the list of available locations of the search engines with their location_code by making a separa
Beispiel:
2156location_nameZeichenketteOptionalfull name of search engine location required field if you don’t specify location_code or location_coordinate if you use this field, you don’t need to specify location_code or location_coordinate you can receive the list of available locations of the search engine with their location_name by making a
postback_dataZeichenketteOptionalpostback_url datatype required field if you specify postback_url corresponds to the datatype that will be sent to your server possible values: regular, html
get_website_urlBooleanOptionalinclude direct URL for each ranked result optional field if set to true, the returned results will contain direct URLs of the ranked websites by default, the URLs in Baidu results are encoded by the search engine, for example: http://www.baidu.com/link?url=KQt6LSwU5OHnPtB8210R8flBP40grY6lTPxH_0UO7S2
max_crawl_pagesGanzzahlOptionalpage crawl limit optional field number of search results pages to crawl default value: 1 max value: 100 Note: the max_crawl_pages and depth parameters complement each other; learn more at our help center
location_coordinateZeichenketteOptionalGPS coordinates of a location required field if you don’t specify location_name or location_code if you use this field, you don’t need to specify location_name or location_code location_coordinate parameter should be specified in the “latitude,longitude,radius” format the maximum number of decimal d
stop_crawl_on_matchArrayOptionalarray of targets to stop crawling optional field if specified, the response will contain SERP results up to and including the specified match_value; you can specify up to 10 target values in this array example: "stop_crawl_on_match":[{"match_value":"dataforseo.com","match_type":"with_subdomains"}] l
Codebeispiele
Ersetze $TOOLSWITCH_KEY durch den in der Konsole erstellten Schlüssel.
curl -X POST 'https://toolswitch.dev/v1/tools/dataforseo.x.serp-baidu-organic-task-post' \
-H "X-Toolswitch-Key: $TOOLSWITCH_KEY" \
-H "Content-Type: application/json" \
--data-raw '[{"tag":"some_string_123","keyword":"best iphone ever","priority":2,"location_code":2156}]'import os
import json
import requests
response = requests.request(
"POST",
"https://toolswitch.dev/v1/tools/dataforseo.x.serp-baidu-organic-task-post",
headers={"X-Toolswitch-Key": os.environ["TOOLSWITCH_KEY"]},
json=json.loads("[{\"tag\":\"some_string_123\",\"keyword\":\"best iphone ever\",\"priority\":2,\"location_code\":2156}]"),
)
response.raise_for_status()
print(response.text)const response = await fetch("https://toolswitch.dev/v1/tools/dataforseo.x.serp-baidu-organic-task-post", {
method: "POST",
headers: {
"X-Toolswitch-Key": process.env.TOOLSWITCH_KEY ?? "",
"Content-Type": "application/json",
},
body: JSON.stringify(JSON.parse("[{\"tag\":\"some_string_123\",\"keyword\":\"best iphone ever\",\"priority\":2,\"location_code\":2156}]")),
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
console.log(await response.text());Diese Gateway-API ist in der Beta; URL und Authentifizierung können sich ändern. Die Beispielparameter sind Musterdaten. Aufrufe werden mit $0.0012/call einschließlich Servicegebühr abgerechnet.