Available Cities
Retrieve the list of cities for a given country. Used to get canonical_name for Google geo-targeting and yandex_lr codes for Yandex geo-targeting.
Endpoint
GET /api/parsing/geo/countries/{countryCode}
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| countryCode | string | yes | ISO country code (e.g. US, GB) |
Example Request
curl https://app.scrapering.com/api/parsing/geo/countries/US \
--header 'Authorization: Bearer YOUR_API_KEY'
Example Response
{
"country_code": "US",
"cities": [
{
"name": "New York",
"canonical_name": "New York,New York,United States",
"yandex_lr": 202,
"name_ru": "Нью-Йорк"
},
{
"name": "Los Angeles",
"canonical_name": "Los Angeles,California,United States",
"yandex_lr": 20047,
"name_ru": "Лос-Анджелес"
},
{
"name": "Aaronsburg",
"canonical_name": "Aaronsburg,Pennsylvania,United States",
"yandex_lr": null,
"name_ru": null
}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
| country_code | string | ISO country code |
| cities[].name | string | City name in English |
| cities[].canonical_name | string | Full location string for Google geo-targeting |
| cities[].yandex_lr | number | null | Yandex region code for geo-targeting. null if not supported |
| cities[].name_ru | string | null | City name in Russian. null if not available |
Using Location Data
Google SERP — pass canonical_name as canonicalLocationName and country_code.toLowerCase() as gl:
{
"q": "pizza delivery",
"count": 10,
"gl": "us",
"canonicalLocationName": "New York,New York,United States"
}
Yandex SERP — pass yandex_lr as region. Note: not all cities have a yandex_lr value.
{
"q": "pizza delivery",
"count": 10,
"region": 202
}
Next steps
- Available countries — list all supported countries first
- Google SERP Scraper — use
glandcanonicalLocationNamefor geo-targeting - Yandex SERP Scraper — use
regionfor geo-targeting