# GeoNames

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

App · 3 actions. Web page: https://docs.lodol.com/docs/integrations/geonames

## Actions

### Look up a postal code

Find places matching a postal code in a specific country.

**Inputs**

- Postal code (`postal_code`, text, required): The postal code to look up.
- Country (`country`, text, required): The two-letter country code, such as US or DE.
- Limit (`limit`, number): How many matches to return. From 1 to 100.

**Outputs**

- `data` (object): The response from GeoNames.

**Example output**

```json
{
  "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**

- Latitude (`latitude`, number, required): Latitude in decimal degrees. From -90 to 90.
- Longitude (`longitude`, number, required): Longitude in decimal degrees. From -180 to 180.

**Outputs**

- `data` (object): The response from GeoNames.

**Example output**

```json
{
  "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**

- Query (`query`, text, required): A place name or other words to look for.
- Country (`country`, text): The two-letter country code, such as US or DE.
- Limit (`limit`, number): How many matches to return. From 1 to 100.

**Outputs**

- `data` (object): The response from GeoNames.

**Example output**

```json
{
  "data": {
    "geonames": [
      {
        "adminName1": "example",
        "countryCode": "example",
        "countryName": "example",
        "geonameId": 1,
        "lat": "example",
        "lng": "example",
        "name": "example"
      }
    ],
    "totalResultsCount": 1
  }
}
```
