https://www.google.com/maps/search/hotels+new+york
boolean
默认值:"false"
在请求 URL 中设置
async=true 以启用异步请求。https://api.brightdata.com/request?async=true
参数
string
必填
搜索路径参数。指定您要在 Google 地图上搜索的关键字或短语。
https://www.google.com/maps/search/hotels+new+york
curl -X POST https://api.brightdata.com/request?async=true \
--header "Content-Type: application/json" \
--header "Authorization: Bearer API_KEY" \
--data '{
"zone": "serp_api1",
"url": "https://www.google.com/maps/search/hotels+new+york",
"format": "raw"
}'
curl -i --silent --compressed \
-H "Content-Type: application/json"
-H "Authorization: Bearer API_KEY" \
-d $'{"country":"us","query":{"q":"pizza"}}'
"https://api.brightdata.com/serp/req?customer=CUSTOMER_USERNAME&zone=ZONE_NAME"
(async () => {
const response = await fetch('https://api.brightdata.com/request?async=true', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY'
},
body: JSON.stringify({
zone: 'serp_api1',
url: 'https://www.google.com/maps/search/hotels+new+york',
format: 'raw'
})
});
const data = await response.text();
console.log(data);
})();
import requests
# API Configuration
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer API_KEY',
}
payload = {
'zone': 'serp_api1',
'url': 'https://www.google.com/maps/search/hotels+new+york',
'format': 'raw'
}
# Make the request
response = requests.post(
'https://api.brightdata.com/request?async=true',
json=payload,
headers=headers
)
print(response.text)