# OpenWeatherMap

> Look up the weather and air quality anywhere in the world: current conditions, a five-day forecast in three-hour steps or day by day, the air quality now, forecast and history, and the coordinates of any city or postal code, or the place at a point.

App · Weather & Space · 8 actions. Web page: https://docs.lodol.com/docs/integrations/openweathermap

## Actions

### Find location coordinates

Turn a city name or postal code into coordinates, with up to five matches for an ambiguous name. The weather and air actions do this for you, so use this when a workflow needs the coordinates themselves.

**Inputs**

- Location (`location`, text, required): City name or postal code, optionally with a state and country, such as London,GB, Austin,TX or 94103,US. A postal code on its own is read as a US ZIP code.
- Language (`language`, text): Language code for the place's local name, such as de for München. Leave empty for the English name.

**Outputs**

- `country` (text): Country code of the place (e.g. 'GB')
- `latitude` (number): Latitude of the place
- `local_name` (text): Its name in the language asked for
- `location` (text): Name of the place that was matched
- `longitude` (number): Longitude of the place
- `matches` (list): Every place the name matched, best first (up to five)
- `state` (text): State or region, when the geocoder reports one

**Example output**

```json
{
  "country": "US",
  "latitude": 39.7990175,
  "local_name": "Springfield",
  "location": "Springfield",
  "longitude": -89.6439575,
  "matches": [
    {
      "country": "US",
      "latitude": 39.7990175,
      "local_name": "Springfield",
      "location": "Springfield",
      "longitude": -89.6439575,
      "state": "Illinois"
    },
    {
      "country": "US",
      "latitude": 42.1018764,
      "local_name": "Springfield",
      "location": "Springfield",
      "longitude": -72.5886727,
      "state": "Massachusetts"
    },
    {
      "country": "US",
      "latitude": 37.2081729,
      "local_name": "Springfield",
      "location": "Springfield",
      "longitude": -93.2922715,
      "state": "Missouri"
    },
    {
      "country": "US",
      "latitude": 39.9234046,
      "local_name": "Springfield",
      "location": "Springfield",
      "longitude": -83.810138,
      "state": "Ohio"
    },
    {
      "country": "US",
      "latitude": 44.0462362,
      "local_name": "Springfield",
      "location": "Springfield",
      "longitude": -123.0220289,
      "state": "Oregon"
    }
  ],
  "state": "Illinois"
}
```

### Find place at coordinates

Name the place at a latitude and longitude: its city, state and country. A point with no place near it, such as one at sea, is not an error: found comes back false.

**Inputs**

- Latitude (`latitude`, number, required): Latitude of the point, from -90 to 90. From -90 to 90.
- Longitude (`longitude`, number, required): Longitude of the point, from -180 to 180. From -180 to 180.
- Language (`language`, text): Language code for the place's local name, such as de for München. Leave empty for the English name.

**Outputs**

- `country` (text): Country code
- `found` (true/false): Whether a place was found near the point
- `latitude` (number): Latitude of the point asked about
- `local_name` (text): Its name in the language asked for
- `location` (text): Name of the place, empty when none
- `longitude` (number): Longitude of the point asked about
- `matches` (list): The places found near the point, nearest first, with their own coordinates
- `state` (text): State or region, when known

**Example output**

```json
{
  "country": "US",
  "found": true,
  "latitude": 40.7484,
  "local_name": "Nueva York",
  "location": "New York",
  "longitude": -73.9857,
  "matches": [
    {
      "country": "US",
      "latitude": 40.7127281,
      "local_name": "Nueva York",
      "location": "New York",
      "longitude": -74.0060152,
      "state": "New York"
    }
  ],
  "state": "New York"
}
```

### Get 5-day forecast

Get the five-day forecast in three-hour steps, with temperature, dew point, wind, cloud cover, and the chance of precipitation for each step.

**Inputs**

- Location (`location`, text): City name or postal code, optionally with a state and country, such as London,GB, Austin,TX or 94103,US. A postal code on its own is read as a US ZIP code. Leave empty when giving latitude and longitude instead.
- Latitude (`latitude`, number): Latitude of the place, from -90 to 90. Use with longitude instead of a location for an exact point. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the place, from -180 to 180. Use with latitude instead of a location for an exact point. From -180 to 180.
- Units (`units`, text): Units for temperature and wind speed. Defaults to metric (Celsius and metres a second). One of: `metric` (Metric (°C, m/s)), `imperial` (Imperial (°F, mph)), `standard` (Standard (Kelvin, m/s)). Default: `metric`.
- Language (`language`, text): Language code for the place name and weather description, such as en, es, fr, de, ja or pt_br. Defaults to English.
- Max results (`max_results`, number): How many three-hour steps to return, from 1 to 40. Defaults to 40, the full five days; 8 covers the next 24 hours. From 1 to 40. Default: `40`.

**Outputs**

- `count` (number): Number of forecast steps returned
- `country` (text): Country code of the place (e.g. 'GB')
- `entries` (list): One record per three-hour step, soonest first
- `latitude` (number): Latitude of the location
- `location` (text): Name of the place the reading is for
- `longitude` (number): Longitude of the location
- `sunrise` (text): Today's sunrise time (ISO 8601, UTC)
- `sunset` (text): Today's sunset time (ISO 8601, UTC)
- `timezone_offset` (number): The location's offset from UTC, in seconds
- `units` (text): Units the readings are in: standard, metric, or imperial

**Example output**

```json
{
  "count": 2,
  "country": "GB",
  "entries": [
    {
      "clouds": 99.0,
      "condition_group": "Clouds",
      "condition_id": 804,
      "conditions": "overcast clouds",
      "dew_point": 10.94,
      "feels_like": 12.85,
      "ground_level_pressure": 1026.0,
      "humidity": 86.0,
      "icon": "04n",
      "icon_url": "https://openweathermap.org/img/wn/04n@2x.png",
      "part_of_day": "night",
      "precipitation_probability": 0.0,
      "pressure": 1030.0,
      "rain_3h": 0.0,
      "sea_level_pressure": 1030.0,
      "snow_3h": 0.0,
      "temperature": 13.23,
      "temperature_max": 13.23,
      "temperature_min": 12.36,
      "time": "2026-10-03T03:00:00Z",
      "visibility": 10000.0,
      "wind_deg": 215.0,
      "wind_gust": 3.8,
      "wind_speed": 1.99
    },
    {
      "clouds": 100.0,
      "condition_group": "Clouds",
      "condition_id": 804,
      "conditions": "overcast clouds",
      "dew_point": 10.66,
      "feels_like": 12.04,
      "ground_level_pressure": 1027.0,
      "humidity": 89.0,
      "icon": "04n",
      "icon_url": "https://openweathermap.org/img/wn/04n@2x.png",
      "part_of_day": "night",
      "precipitation_probability": 0.0,
      "pressure": 1029.0,
      "rain_3h": 0.0,
      "sea_level_pressure": 1029.0,
      "snow_3h": 0.0,
      "temperature": 12.42,
      "temperature_max": 12.42,
      "temperature_min": 11.8,
      "time": "2026-10-03T06:00:00Z",
      "visibility": 10000.0,
      "wind_deg": 228.0,
      "wind_gust": 2.84,
      "wind_speed": 1.55
    }
  ],
  "latitude": 51.5074,
  "location": "London",
  "longitude": -0.1278,
  "sunrise": "2026-10-03T06:03:57Z",
  "sunset": "2026-10-03T17:35:03Z",
  "timezone_offset": 3600,
  "units": "metric"
}
```

### Get air quality

Get the air quality now: the Air Quality Index from 1 (Good) to 5 (Very Poor) and the levels of carbon monoxide, nitrogen oxides, ozone, sulphur dioxide, ammonia and fine and coarse particles (PM2.5, PM10).

**Inputs**

- Location (`location`, text): City name or postal code, optionally with a state and country, such as Delhi,IN or Austin,TX. Leave empty when giving latitude and longitude instead.
- Latitude (`latitude`, number): Latitude of the place, from -90 to 90. Use with longitude instead of a location for an exact point. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the place, from -180 to 180. Use with latitude instead of a location for an exact point. From -180 to 180.

**Outputs**

- `aqi` (number): Air Quality Index from 1 (Good) to 5 (Very Poor), on OpenWeatherMap's scale
- `aqi_label` (text): Good, Fair, Moderate, Poor or Very Poor
- `co` (number): Carbon monoxide, μg/m3
- `country` (text): Country code, when the place was given by name
- `latitude` (number): Latitude of the reading
- `location` (text): Name of the place, when it was given by name
- `longitude` (number): Longitude of the reading
- `nh3` (number): Ammonia, μg/m3
- `no` (number): Nitrogen monoxide, μg/m3
- `no2` (number): Nitrogen dioxide, μg/m3
- `o3` (number): Ozone, μg/m3
- `pm10` (number): Coarse particles (PM10), μg/m3
- `pm2_5` (number): Fine particles (PM2.5), μg/m3
- `so2` (number): Sulphur dioxide, μg/m3
- `time` (text): Hour of the reading (ISO 8601, UTC)

**Example output**

```json
{
  "aqi": 3,
  "aqi_label": "Moderate",
  "co": 364.48,
  "country": "IN",
  "latitude": 28.614,
  "location": "New Delhi",
  "longitude": 77.209,
  "nh3": 6.54,
  "no": 0.0,
  "no2": 9.14,
  "o3": 44.13,
  "pm10": 89.3,
  "pm2_5": 38.91,
  "so2": 2.39,
  "time": "2026-10-02T23:55:36Z"
}
```

### Get air quality forecast

Get the air quality forecast hour by hour for the next four days, with the worst hour picked out, for example to warn people before the air turns Poor.

**Inputs**

- Location (`location`, text): City name or postal code, optionally with a state and country, such as Delhi,IN or Austin,TX. Leave empty when giving latitude and longitude instead.
- Latitude (`latitude`, number): Latitude of the place, from -90 to 90. Use with longitude instead of a location for an exact point. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the place, from -180 to 180. Use with latitude instead of a location for an exact point. From -180 to 180.
- Hours (`max_results`, number): How many hours to return, from 1 to 96, starting with the current hour (default 96, four days). 24 covers the next day. From 1 to 96. Default: `96`.

**Outputs**

- `count` (number): Hours returned
- `country` (text): Country code, when the place was given by name
- `hours` (list): One reading an hour, soonest first
- `latitude` (number): Latitude of the reading
- `location` (text): Name of the place, when it was given by name
- `longitude` (number): Longitude of the reading
- `max_aqi` (number): Worst Air Quality Index among the hours
- `max_aqi_label` (text): Its label, such as Poor
- `max_aqi_time` (text): The first hour it was reached (ISO 8601, UTC)

**Example output**

```json
{
  "count": 3,
  "country": "GB",
  "hours": [
    {
      "aqi": 2,
      "aqi_label": "Fair",
      "co": 168.96,
      "nh3": 0.75,
      "no": 0.0,
      "no2": 4.36,
      "o3": 79.87,
      "pm10": 3.58,
      "pm2_5": 2.0,
      "so2": 2.87,
      "time": "2026-10-02T23:00:00Z"
    },
    {
      "aqi": 2,
      "aqi_label": "Fair",
      "co": 168.2,
      "nh3": 0.73,
      "no": 0.0,
      "no2": 4.51,
      "o3": 79.54,
      "pm10": 3.71,
      "pm2_5": 2.05,
      "so2": 3.01,
      "time": "2026-10-03T00:00:00Z"
    },
    {
      "aqi": 2,
      "aqi_label": "Fair",
      "co": 167.82,
      "nh3": 0.69,
      "no": 0.0,
      "no2": 4.65,
      "o3": 79.46,
      "pm10": 3.89,
      "pm2_5": 2.11,
      "so2": 3.15,
      "time": "2026-10-03T01:00:00Z"
    }
  ],
  "latitude": 51.5073,
  "location": "London",
  "longitude": -0.1277,
  "max_aqi": 2,
  "max_aqi_label": "Fair",
  "max_aqi_time": "2026-10-02T23:00:00Z"
}
```

### Get air quality history

Get the air quality hour by hour over a past period of up to 31 days, from 27 November 2020 on, with the worst hour and the average Air Quality Index.

**Inputs**

- From (`start`, date and time, required): The first hour to read, from 27 November 2020 on.
- To (`end`, date and time): The last hour to read, at most 31 days after the first. Leave empty for now.
- Location (`location`, text): City name or postal code, optionally with a state and country, such as Delhi,IN or Austin,TX. Leave empty when giving latitude and longitude instead.
- Latitude (`latitude`, number): Latitude of the place, from -90 to 90. Use with longitude instead of a location for an exact point. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the place, from -180 to 180. Use with latitude instead of a location for an exact point. From -180 to 180.

**Outputs**

- `average_aqi` (number): Average Air Quality Index over the readings
- `count` (number): Hourly readings returned
- `country` (text): Country code, when the place was given by name
- `end` (text): Last hour asked for (ISO 8601, UTC)
- `hours` (list): One reading an hour, oldest first
- `latitude` (number): Latitude of the reading
- `location` (text): Name of the place, when it was given by name
- `longitude` (number): Longitude of the reading
- `max_aqi` (number): Worst Air Quality Index among the hours
- `max_aqi_label` (text): Its label, such as Poor
- `max_aqi_time` (text): The first hour it was reached (ISO 8601, UTC)
- `start` (text): First hour asked for (ISO 8601, UTC)

**Example output**

```json
{
  "average_aqi": 2.0,
  "count": 3,
  "country": "GB",
  "end": "2026-09-30T02:00:00Z",
  "hours": [
    {
      "aqi": 2,
      "aqi_label": "Fair",
      "co": 121.63,
      "nh3": 0.91,
      "no": 0.0,
      "no2": 5.69,
      "o3": 74.95,
      "pm10": 3.88,
      "pm2_5": 1.5,
      "so2": 2.78,
      "time": "2026-09-30T00:00:00Z"
    },
    {
      "aqi": 2,
      "aqi_label": "Fair",
      "co": 120.47,
      "nh3": 0.92,
      "no": 0.0,
      "no2": 5.37,
      "o3": 75.95,
      "pm10": 3.48,
      "pm2_5": 1.39,
      "so2": 2.53,
      "time": "2026-09-30T01:00:00Z"
    },
    {
      "aqi": 2,
      "aqi_label": "Fair",
      "co": 119.8,
      "nh3": 0.87,
      "no": 0.0,
      "no2": 5.52,
      "o3": 75.44,
      "pm10": 3.27,
      "pm2_5": 1.4,
      "so2": 2.48,
      "time": "2026-09-30T02:00:00Z"
    }
  ],
  "latitude": 51.5074,
  "location": "London",
  "longitude": -0.1278,
  "max_aqi": 2,
  "max_aqi_label": "Fair",
  "max_aqi_time": "2026-09-30T00:00:00Z",
  "start": "2026-09-30T00:00:00Z"
}
```

### Get current weather

Get current conditions for a place: temperature, feels-like, humidity, pressure, wind, cloud cover, visibility, rain and snow, and sunrise and sunset times.

**Inputs**

- Location (`location`, text): City name or postal code, optionally with a state and country, such as London,GB, Austin,TX or 94103,US. A postal code on its own is read as a US ZIP code. Leave empty when giving latitude and longitude instead.
- Latitude (`latitude`, number): Latitude of the place, from -90 to 90. Use with longitude instead of a location for an exact point. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the place, from -180 to 180. Use with latitude instead of a location for an exact point. From -180 to 180.
- Units (`units`, text): Units for temperature and wind speed. Defaults to metric (Celsius and metres a second). One of: `metric` (Metric (°C, m/s)), `imperial` (Imperial (°F, mph)), `standard` (Standard (Kelvin, m/s)). Default: `metric`.
- Language (`language`, text): Language code for the place name and weather description, such as en, es, fr, de, ja or pt_br. Defaults to English.

**Outputs**

- `clouds` (number): Cloud cover, %
- `condition_group` (text): Weather group, e.g. 'Clear', 'Rain', 'Snow'
- `condition_id` (number): OpenWeatherMap weather condition code
- `conditions` (text): Weather description, e.g. 'moderate rain'
- `country` (text): Country code of the place (e.g. 'GB')
- `feels_like` (number): What the temperature feels like, in the chosen units
- `ground_level_pressure` (number): Atmospheric pressure at ground level, hPa, when reported
- `humidity` (number): Humidity, %
- `icon` (text): Weather icon code, e.g. '10d'
- `icon_url` (text): URL of the weather icon image
- `latitude` (number): Latitude of the location
- `location` (text): Name of the place the reading is for
- `longitude` (number): Longitude of the location
- `pressure` (number): Atmospheric pressure at sea level, hPa
- `rain_1h` (number): Rain over the last hour, mm (0 when none)
- `sea_level_pressure` (number): Atmospheric pressure at sea level, hPa, when reported
- `snow_1h` (number): Snow over the last hour, mm (0 when none)
- `sunrise` (text): Sunrise time (ISO 8601, UTC)
- `sunset` (text): Sunset time (ISO 8601, UTC)
- `temperature` (number): Temperature, in the chosen units
- `temperature_max` (number): Highest temperature across the area (differs from the temperature only in large cities)
- `temperature_min` (number): Lowest temperature across the area (differs from the temperature only in large cities)
- `time` (text): Time the data was calculated (ISO 8601, UTC)
- `timezone_offset` (number): The location's offset from UTC, in seconds
- `units` (text): Units the readings are in: standard, metric, or imperial
- `visibility` (number): Visibility, metres (max 10000)
- `wind_deg` (number): Wind direction, degrees
- `wind_gust` (number): Wind gust, in the chosen units, when reported
- `wind_speed` (number): Wind speed, in the chosen units

**Example output**

```json
{
  "clouds": 100.0,
  "condition_group": "Clouds",
  "condition_id": 804,
  "conditions": "overcast clouds",
  "country": "GB",
  "feels_like": 13.3,
  "ground_level_pressure": 1027.0,
  "humidity": 85.0,
  "icon": "04n",
  "icon_url": "https://openweathermap.org/img/wn/04n@2x.png",
  "latitude": 51.5073,
  "location": "London",
  "longitude": -0.1277,
  "pressure": 1030.0,
  "rain_1h": 0.0,
  "sea_level_pressure": 1030.0,
  "snow_1h": 0.0,
  "sunrise": "2026-10-03T06:03:57Z",
  "sunset": "2026-10-03T17:35:03Z",
  "temperature": 13.66,
  "temperature_max": 14.76,
  "temperature_min": 11.72,
  "time": "2026-10-03T00:00:59Z",
  "timezone_offset": 3600,
  "units": "metric",
  "visibility": 10000.0,
  "wind_deg": 263.0,
  "wind_gust": 4.02,
  "wind_speed": 1.34
}
```

### Get daily forecast

Get a day-by-day forecast for up to six days, today first: each day's low and high, chance of precipitation, rain and snow totals, strongest wind and gusts, and its most notable weather. Days are the place's own calendar days, summed up from the 5-day forecast.

**Inputs**

- Location (`location`, text): City name or postal code, optionally with a state and country, such as London,GB, Austin,TX or 94103,US. A postal code on its own is read as a US ZIP code. Leave empty when giving latitude and longitude instead.
- Latitude (`latitude`, number): Latitude of the place, from -90 to 90. Use with longitude instead of a location for an exact point. From -90 to 90.
- Longitude (`longitude`, number): Longitude of the place, from -180 to 180. Use with latitude instead of a location for an exact point. From -180 to 180.
- Units (`units`, text): Units for temperature and wind speed. Defaults to metric (Celsius and metres a second). One of: `metric` (Metric (°C, m/s)), `imperial` (Imperial (°F, mph)), `standard` (Standard (Kelvin, m/s)). Default: `metric`.
- Language (`language`, text): Language code for the place name and weather description, such as en, es, fr, de, ja or pt_br. Defaults to English.
- Days (`days`, number): How many days to return, today first, from 1 to 6 (default 5). The forecast reaches five days ahead, so the sixth is partial, and so is today once part of it has passed. From 1 to 6. Default: `5`.

**Outputs**

- `count` (number): Number of days returned
- `country` (text): Country code of the place (e.g. 'GB')
- `days` (list): One record per day, today first
- `latitude` (number): Latitude of the location
- `location` (text): Name of the place the reading is for
- `longitude` (number): Longitude of the location
- `timezone_offset` (number): The location's offset from UTC, in seconds
- `units` (text): Units the readings are in: standard, metric, or imperial

**Example output**

```json
{
  "count": 3,
  "country": "US",
  "days": [
    {
      "clouds": 100,
      "complete": false,
      "condition_group": "Rain",
      "condition_id": 500,
      "conditions": "light rain",
      "date": "2026-10-02",
      "humidity": 94,
      "icon": "10d",
      "icon_url": "https://openweathermap.org/img/wn/10d@2x.png",
      "most_common_group": "Rain",
      "precipitation_probability": 0.91,
      "rain": 0.89,
      "snow": 0.0,
      "steps": 1,
      "temperature_max": 75.65,
      "temperature_min": 75.65,
      "weekday": "Friday",
      "wind_gust_max": 10.85,
      "wind_speed_max": 5.79
    },
    {
      "clouds": 83,
      "complete": true,
      "condition_group": "Rain",
      "condition_id": 500,
      "conditions": "light rain",
      "date": "2026-10-03",
      "humidity": 89,
      "icon": "10d",
      "icon_url": "https://openweathermap.org/img/wn/10d@2x.png",
      "most_common_group": "Rain",
      "precipitation_probability": 0.73,
      "rain": 2.19,
      "snow": 0.0,
      "steps": 8,
      "temperature_max": 78.87,
      "temperature_min": 72.66,
      "weekday": "Saturday",
      "wind_gust_max": 19.44,
      "wind_speed_max": 8.46
    },
    {
      "clouds": 77,
      "complete": true,
      "condition_group": "Rain",
      "condition_id": 500,
      "conditions": "light rain",
      "date": "2026-10-04",
      "humidity": 79,
      "icon": "10d",
      "icon_url": "https://openweathermap.org/img/wn/10d@2x.png",
      "most_common_group": "Rain",
      "precipitation_probability": 0.88,
      "rain": 1.02,
      "snow": 0.0,
      "steps": 8,
      "temperature_max": 81.03,
      "temperature_min": 71.82,
      "weekday": "Sunday",
      "wind_gust_max": 26.69,
      "wind_speed_max": 12.3
    }
  ],
  "latitude": 30.2711,
  "location": "Austin",
  "longitude": -97.7437,
  "timezone_offset": -18000,
  "units": "imperial"
}
```
