Logo

Database of world cities and countries

7 continents, 247 countries, 231 216 divisions, 4 622 511 cities of the world in 182 languages, including English, German, French, Polish, Dutch, Russian, Spanish, Italian, Chinese, Portuguese, etc.

Get an API keyDocumentation
{
  "id": "5325423",
  "name": "Azusa",
  "latitude": 34.13362,
  "longitude": -117.90756,
  "type": "city",
  "continentCode": "NA",
  "countryCode": "US",
  "division1Code": "CA",
  "division2Code": "037",
  "division3Code": null,
  "division4Code": null,
  "population": "49690",
  "timezone": "America/Los_Angeles",
  "parentRegions": [
    {
      "id": "5368381",
      "name": "Los Angeles"
    },
    {
      "id": "5332921",
      "name": "California"
    },
    {
      "id": "6252001",
      "name": "United States"
    },
    {
      "id": "6255149",
      "name": "North America"
    }
  ]
}
Example of a city from the database

Get a list of cities and countries

The `regions` method returns continents, countries, divisions, and cities. You can request both a list of all cities in the world, and only those cities located within a certain country or division.

See more
{
  "edges": [
    {
      "node": {
        "id": "451747",
        "name": "Zyabrikovo",
        "latitude": 56.84665,
        "longitude": 34.7048,
        "type": "city",
        "continentCode": "EU",
        "countryCode": "RU",
        "division1Code": "77",
        "division2Code": null,
        "division3Code": null,
        "division4Code": null,
        "population": "0",
        "timezone": "Europe/Moscow",
        "parentRegions": [
          {
            "id": "480041",
            "name": "Tver Oblast"
          },
          {
            "id": "2017370",
            "name": "Russia"
          },
          {
            "id": "6255148",
            "name": "Europe"
          }
        ]
      },
      "cursor": "Y29ubjo0NTE3NDc"
    },
    {
      "node": {
        "id": "451748",
        "name": "Znamenka",
        "latitude": 56.74087,
        "longitude": 34.02323,
        "type": "city",
        "continentCode": "EU",
        "countryCode": "RU",
        "division1Code": "77",
        "division2Code": null,
        "division3Code": null,
        "division4Code": null,
        "population": "0",
        "timezone": "Europe/Moscow",
        "parentRegions": [
          {
            "id": "480041",
            "name": "Tver Oblast"
          },
          {
            "id": "2017370",
            "name": "Russia"
          },
          {
            "id": "6255148",
            "name": "Europe"
          }
        ]
      },
      "cursor": "Y29ubjo0NTE3NDg"
    }
  ],
  "pageInfo": {
    "hasNextPage": true,
    "hasPreviousPage": false,
    "startCursor": "Y29ubjo0NTE3NDc",
    "endCursor": "Y29ubjo0NTE3NDg"
  }
}
The first 2 cities in Russia

Get all regions inside a given one

Using the `childRegions` method, implement on your website a convenient choice of the city for the user: at the beginning he will choose his country, then the division, and then the city.

If your site shows search results linked to a region (for example, a list of profiles on a dating site), then you can add a list of child regions at the bottom of your pages so that the user can refine his search.

See more
{
  "edges": [
    {
      "node": {
        "id": "2822542",
        "name": "Free State of Thuringia",
        "latitude": 50.91667,
        "longitude": 11,
        "type": "division1",
        "continentCode": "EU",
        "countryCode": "DE",
        "division1Code": "15",
        "division2Code": null,
        "division3Code": null,
        "division4Code": null,
        "population": "2249882",
        "timezone": "Europe/Berlin",
        "parentRegions": [
          {
            "id": "2921044",
            "name": "Germany"
          },
          {
            "id": "6255148",
            "name": "Europe"
          }
        ]
      },
      "cursor": "Y29ubjoyODIyNTQy"
    },
    {
      "node": {
        "id": "2838632",
        "name": "Schleswig-Holstein",
        "latitude": 54.2,
        "longitude": 9.75,
        "type": "division1",
        "continentCode": "EU",
        "countryCode": "DE",
        "division1Code": "10",
        "division2Code": null,
        "division3Code": null,
        "division4Code": null,
        "population": "2832027",
        "timezone": "Europe/Berlin",
        "parentRegions": [
          {
            "id": "2921044",
            "name": "Germany"
          },
          {
            "id": "6255148",
            "name": "Europe"
          }
        ]
      },
      "cursor": "Y29ubjoyODM4NjMy"
    }
  ],
  "pageInfo": {
    "hasNextPage": false,
    "hasPreviousPage": false,
    "startCursor": "Y29ubjoyODIyNTQy",
    "endCursor": "Y29ubjoyODM4NjMy"
  }
}
The first 2 divisions in Germany

Find regions by a search query

Give the user the opportunity to quickly find their region by a search phrase. The `searchRegions` method finds all kinds of regions (continents, countries, divisions, cities) by their name in one of the 182 languages of the world. If necessary, narrow the search to a specific country or division.

See more
[
  {
    "id": "8878031",
    "name": "La Higuera Caída",
    "latitude": 25.60333,
    "longitude": -107.66139,
    "type": "city",
    "continentCode": "NA",
    "countryCode": "MX",
    "division1Code": "25",
    "division2Code": "013",
    "division3Code": null,
    "division4Code": null,
    "population": "125",
    "timezone": "America/Mazatlan",
    "parentRegions": [
      {
        "id": "8583359",
        "name": "Mocorito"
      },
      {
        "id": "3983035",
        "name": "Sinaloa"
      },
      {
        "id": "3996063",
        "name": "Mexico"
      },
      {
        "id": "6255149",
        "name": "North America"
      }
    ]
  },
  {
    "id": "8561495",
    "name": "Higashiyama",
    "latitude": 40.41918,
    "longitude": 141.37226,
    "type": "city",
    "continentCode": "AS",
    "countryCode": "JP",
    "division1Code": "03",
    "division2Code": "2128302",
    "division3Code": "02445",
    "division4Code": null,
    "population": "0",
    "timezone": "Asia/Tokyo",
    "parentRegions": [
      {
        "id": "2129009",
        "name": "Nambu"
      },
      {
        "id": "2128302",
        "name": "Sannohe Gun"
      },
      {
        "id": "2130656",
        "name": "Aomori"
      },
      {
        "id": "1861060",
        "name": "Japan"
      },
      {
        "id": "6255147",
        "name": "Asia"
      }
    ]
  }
]
The first 2 cities found by the query «hi»

Find the nearest regions

Using the `nearestRegions` method, show the user a list of the cities closest to him so that he can quickly refine or change the search criteria. For example, you can offer the user vacancies, profiles or specialists from neighboring cities.

See more
[
  {
    "id": "321580",
    "name": "Belek",
    "latitude": 36.86278,
    "longitude": 31.05556,
    "type": "city",
    "continentCode": "AS",
    "countryCode": "TR",
    "division1Code": "07",
    "division2Code": null,
    "division3Code": null,
    "division4Code": null,
    "population": "73260",
    "timezone": "Europe/Istanbul",
    "parentRegions": [
      {
        "id": "323776",
        "name": "Antalya"
      },
      {
        "id": "298795",
        "name": "Turkey"
      },
      {
        "id": "6255147",
        "name": "Asia"
      }
    ]
  },
  {
    "id": "8073419",
    "name": "Eminciler",
    "latitude": 36.89228,
    "longitude": 31.05652,
    "type": "city",
    "continentCode": "AS",
    "countryCode": "TR",
    "division1Code": "07",
    "division2Code": null,
    "division3Code": null,
    "division4Code": null,
    "population": "0",
    "timezone": "Europe/Istanbul",
    "parentRegions": [
      {
        "id": "323776",
        "name": "Antalya"
      },
      {
        "id": "298795",
        "name": "Turkey"
      },
      {
        "id": "6255147",
        "name": "Asia"
      }
    ]
  }
]
The first 2 regions near the location: 36.876353, 31.053381

Determine the region by the IP address

Use the `network` method to determine the approximate location of the user and the region in which he is located. If your site has regional pages, you can automatically redirect the user to the desired page.

See more
{
  "id": "TmV0d29yazo5MTEwMw",
  "network": "23.35.212.0/22",
  "latitude": 38.1302,
  "longitude": 13.329,
  "accuracyRadius": 1000,
  "region": {
    "id": "2523920",
    "name": "Palermo",
    "latitude": 38.13205,
    "longitude": 13.33561,
    "type": "city",
    "continentCode": "EU",
    "countryCode": "IT",
    "division1Code": "15",
    "division2Code": "PA",
    "division3Code": "082053",
    "division4Code": null,
    "population": "648260",
    "timezone": "Europe/Rome",
    "parentRegions": [
      {
        "id": "6542127",
        "name": "Palermo"
      },
      {
        "id": "2523918",
        "name": "Province of Palermo"
      },
      {
        "id": "2523119",
        "name": "Sicily"
      },
      {
        "id": "3175395",
        "name": "Italy"
      },
      {
        "id": "6255148",
        "name": "Europe"
      }
    ]
  }
}
The region by the IP address: 23.35.215.162

Show regions in the user's language

The database stores the names of regions in many languages of the world, including English, German, French, Polish, Dutch, Russian, Spanish, Italian, Chinese, Portuguese, etc.

The user's language is detected automatically, which will allow your users to see the names of regions in their native language. If necessary, it can be set manually.

Documentation