GeoNames

App · 3 actions

Find places, look up postal codes and turn coordinates into local time zones.

Actions

ActionWhat it does
Look up a postal codeFind places matching a postal code in a specific country.
Look up a time zoneGet the IANA time zone and local time for a latitude and longitude.
Search placesFind places by name, with their coordinates, country and GeoNames ID.

Look up a postal code

Find places matching a postal code in a specific country.

Inputs

Postal codepostal_codetextRequired
The postal code to look up.
CountrycountrytextRequired
The two-letter country code, such as US or DE.
Limitlimitnumber
How many matches to return.From 1 to 100.

Outputs

dataobject
The response from GeoNames.
Example output
{
  "data": {
    "postalCodes": [
      {
        "adminName1": "example",
        "countryCode": "example",
        "lat": 1,
        "lng": 1,
        "placeName": "example",
        "postalCode": "example"
      }
    ]
  }
}

Look up a time zone

Get the IANA time zone and local time for a latitude and longitude.

Inputs

LatitudelatitudenumberRequired
Latitude in decimal degrees.From -90 to 90.
LongitudelongitudenumberRequired
Longitude in decimal degrees.From -180 to 180.

Outputs

dataobject
The response from GeoNames.
Example output
{
  "data": {
    "countryCode": "example",
    "countryName": "example",
    "dstOffset": 1,
    "gmtOffset": 1,
    "lat": 1,
    "lng": 1,
    "time": "example",
    "timezoneId": "example"
  }
}

Search places

Find places by name, with their coordinates, country and GeoNames ID.

Inputs

QueryquerytextRequired
A place name or other words to look for.
Countrycountrytext
The two-letter country code, such as US or DE.
Limitlimitnumber
How many matches to return.From 1 to 100.

Outputs

dataobject
The response from GeoNames.
Example output
{
  "data": {
    "geonames": [
      {
        "adminName1": "example",
        "countryCode": "example",
        "countryName": "example",
        "geonameId": 1,
        "lat": "example",
        "lng": "example",
        "name": "example"
      }
    ],
    "totalResultsCount": 1
  }
}

On this page