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

  • ISO 3166-1 alpha-2 country code (2 letters, e.g. 'US', 'BR', 'GB').

    values
    • AD
    • AE
    • AF
    • AG
    • AL
    • AM
    • AO
    • AQ
  • Chartmetric city ID; narrows the result set to a single city.

Responses

  • application/json
Request Example for get/api/cities
curl 'https://api.chartmetric.com/api/cities?country_code=AD' \
  --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"
    }
  ]
}