List Cities by Country
List cities within a country (ISO 3166-1 alpha-2 country_code). Optionally narrow to a single city by city_id.
Query Parameters
- Type: stringcountry
_code min length:2max length:2enumrequiredvalues- A
D - A
E - A
F - A
G - A
L
- Type: integercity
_id Integer numbers.
Responses
- application/json
Request Example for get/api/cities
curl 'https://api.chartmetric.com/api/cities?country_code=AD&city_id=1' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"obj": [
{
"city_id": 11778,
"city_name": "Culpeper",
"latitude": 38.4705,
"longitude": -78.0001,
"population": 19986,
"province": null,
"locality": "Culpeper",
"country": "United States",
"image_url": null,
"iso3": "USA"
}
]
}