GET /v1/search/locations
SERP locations API: market codes for the Google and Bing search APIs
Call it with no parameters and get every market the search endpoints accept, as { location_code, location_name, country_iso_code }. location_code is a Google Ads geo-target id, and the field names match DataForSEO's locations list.
- Price
- Free
- Batch
- No
- Failed calls
- Not charged
Example request
curl
curl 'https://api.virev.ai/v1/search/locations' \
-H "Authorization: Bearer $VIREV_API_KEY"python
import os
import requests
response = requests.request(
"GET",
"https://api.virev.ai/v1/search/locations",
headers={"Authorization": f"Bearer {os.environ['VIREV_API_KEY']}"},
timeout=60,
)
response.raise_for_status()
print(response.json())Example response
The example response of the API reference.
json
{
"data": [
{
"location_code": 2840,
"location_name": "United States",
"country_iso_code": "us"
},
{
"location_code": 2410,
"location_name": "South Korea",
"country_iso_code": "kr"
},
{
"location_code": 2392,
"location_name": "Japan",
"country_iso_code": "jp"
}
],
"meta": {
"cost": "$0.00",
"balance": "$24.85",
"request_id": "req_5c1d90ab72e34f16b8d0e4a7c9315f28"
}
}How it works
Every market /v1/search/* accepts, as { location_code, location_name, country_iso_code }. Google searches the market you name; Bing searches in the country it sees the request come from. Free and unbilled — you should never pay to discover which values the API accepts. location_code is a Google Ads geo-target criterion id, so this is the only way to map a country to one; the field names mirror DataForSEO, whose reference endpoint this matches.
Errors
| Status | When |
|---|---|
400 | The request parameters are invalid. |
401 | Missing, malformed, or revoked API key. |
402 | Balance is too low for this request. |
429 | Over the per-minute limit. The limit belongs to your organization and all its API keys share it: 100 requests per minute unless an increase was granted. Wait for the Retry-After seconds, then retry. On a live read, code rate_limited means the platform itself rate-limited this read; retry after the Retry-After seconds. You are not charged. |
502 | The upstream fetch failed. You are not charged. |
503 | Billing could not be confirmed, so no upstream data was returned. |
504 | The upstream request timed out. You are not charged. |