https://www.google.com/maps/search/hotels+new+york
Set
async=true in the request URL to enable asynchronous requests.https://api.brightdata.com/request?async=true
Parameters
The search path parameter. Specifies the keyword or phrase you want to search for on Google Maps.
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)