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
  • country_code
    Type: string
    min length:  
    2
    max length:  
    2
    enum
    required
    values
    • AD
    • AE
    • AF
    • AG
    • AL
  • city_id
    Type: integer

    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"
    }
  ]
}