The simplest API to work with cities, countries and political divisions.

Solve your problems handling geographical places.

Solutions

Send a string with a geographical name and Spott will find the best matches for it. No matter if it's a city, country, administrative division or a combination of them.
  • Figure out locations from user's input, like Twitter's location in bio.
  • Standardize places across other sources (Facebook, Foursquare, Google...).
  • Enrich your existing data for extended analysis.
Input:.
Springfield, MO
Output:
{
  "id": "4409896",
  "geonameId": "4409896",
  "name": "Springfield",
  "population": 166810,
  "type": "CITY",
  "timezoneId": "America/Chicago",
  "coordinates": {
    "latitude": 37.21533,
    "longitude": -93.29824
  },
  "country": {
    "id": "US",
    "geonameId": "6252001",
    "name": "United States"
  },
  "adminDivision1": {
    "id": "US.MO",
    "geonameId": "4398678",
    "name": "Missouri"
  },
  "adminDivision2": {
    "id": "US.MO.077",
    "geonameId": "4388781",
    "name": "Greene County"
  },
  "score": 95.39969
}
Send a string with a prefix of a geographical name and Spott will autocomplete it and find the best matches for it.
  • Simplify your registration process by suggesting places to your users as they type.
  • Create a search engine to match records in your platform.
Input:.
Cali
Output:
[
  {
    "id": "US.CA",
    "geonameId": "5332921",
    "name": "California",
    "population": 37625195,
    "type": "ADMIN_DIVISION_1",
    "country": {
      "id": "US",
      "geonameId": "6252001",
      "name": "United States"
    },
    "score": 91.17167
  },
  {
    "id": "3029162",
    "geonameId": "3029162",
    "name": "Calais",
    "population": 74433,
    "type": "CITY",
    "timezoneId": "Europe/Paris",
    "coordinates": {
      "latitude": 50.95194,
      "longitude": 1.85635
    },
    "country": {
      "id": "FR",
      "geonameId": "3017382",
      "name": "France"
    },
    "adminDivision1": {
      "id": "FR.32",
      "geonameId": "11071624",
      "name": "Hauts-de-France"
    },
    "adminDivision2": {
      "id": "FR.32.62",
      "geonameId": "2988430",
      "name": "Département du Pas-de-Calais"
    },
    "score": 79.257034
  },
  {
    "id": "3687925",
    "geonameId": "3687925",
    "name": "Cali",
    "population": 2392877,
    "type": "CITY",
    "timezoneId": "America/Bogota",
    "coordinates": {
      "latitude": 3.43722,
      "longitude": -76.5225
    },
    "country": {
      "id": "CO",
      "geonameId": "3686110",
      "name": "Colombia"
    },
    "adminDivision1": {
      "id": "CO.29",
      "geonameId": "3666313",
      "name": "Valle del Cauca"
    },
    "adminDivision2": {
      "id": "CO.29.76001",
      "geonameId": "3687926",
      "name": "Cali"
    },
    "score": 74.92633
  },
  ...and much more results
]
Send any IP and receive a response with full information about the city where is located.
  • Find the location of your visitors and customize their experience.
  • Make your register faster by autocompleting their location.
  • Support for IPv4 and IPv6.
Input:.
136.0.16.217
Output:
{
  "id": "5391959",
  "geonameId": "5391959",
  "name": "San Francisco",
  "population": 864816,
  "type": "CITY",
  "timezoneId": "America/Los_Angeles",
  "coordinates": {
    "latitude": 37.77493,
    "longitude": -122.41942
  },
  "country": {
    "id": "US",
    "geonameId": "6252001",
    "name": "United States"
  },
  "adminDivision1": {
    "id": "US.CA",
    "geonameId": "5332921",
    "name": "California"
  },
  "adminDivision2": {
    "id": "US.CA.075",
    "geonameId": "5391997",
    "name": "City and County of San Francisco"
  }
}

Features

+20 supported languages for search places and get their localized name.
Filter places by coordinates, type, country, query string or population.
+240,000 worldwide places in our database. Updated everyday.

Powered by GeoNames.org

The largest open geographical database