<!-- BusyBot node reference — https://busybot.net/tools/open-weather-map/ -->

> Node: OpenWeatherMap (`open_weather_map`) · Action · v1
> Category: Utility · Credentials: OpenWeatherMap API (`openWeatherMapApi`)
> Updated: 2026-08-16

# OpenWeatherMap

> Get current weather data and 5-day forecasts from OpenWeatherMap.

## Overview

OpenWeatherMap provides weather data for any location worldwide. This tool retrieves current weather conditions or 5-day/3-hour forecasts via the OpenWeatherMap API v2.5 (https://api.openweathermap.org/data/2.5). It supports four location selection methods: city name (e.g., "berlin,de"), city ID (from the OpenWeatherMap bulk data), geographic coordinates (latitude/longitude), or zip/postal code (e.g., "10115,de"). Results can be returned in metric (Celsius, m/s), imperial (Fahrenheit, mph), or scientific (Kelvin, m/s) units. An optional language parameter controls the output language for weather descriptions. Authentication is via an API key.

**Category:** Utility  
**Tool Name:** `open_weather_map`  
**Version:** 1

**Appearance:** Icon: `lucide-CloudSun` | Color: `#E96E4B`

## Node Type

**Action** — processes input items and produces output

## Input / Output

| Direction | Port(s) |
|-----------|--------|
| Input | `Input` |
| Output | `Output`, `Error` |

## Credentials

This tool requires **OpenWeatherMap API** credentials.
See the [Credentials Guide](https://busybot.net/credentials/open-weather-map-api/) for setup instructions.

### Operations

| Operation | Value | Description |
|-----------|-------|-------------|
| Current Weather | `currentWeather` | Returns the current weather data |
| 5 Day Forecast | `5DayForecast` | Returns the weather data for the next 5 days (3-hour intervals) |

### Parameters

Both operations take the same parameters — the operation only selects which OpenWeatherMap endpoint is queried. Which location field you fill in is decided by **Location Selection**, not by the operation.

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| Format | `options` | No | `metric` | The unit format for the returned data. |
| | | | | Options: `imperial` (Fahrenheit \| miles/hour), `metric` (Celsius \| meter/sec), `standard` (Kelvin \| meter/sec — shown as "Scientific") |
| Location Selection | `options` | No | `cityName` | How to define the location for which to return the weather. |
| | | | | Options: `cityName`, `cityId`, `coordinates`, `zipCode` |
| City | `string` | Yes | — | The name of the city to return the weather of. Optionally include country code (e.g., "london,uk"). Supports expressions. _(shown when Location Selection is `cityName`)_ |
| City ID | `number` | Yes | `160001123` | The ID of the city to return the weather of. City ID list can be downloaded from http://bulk.openweathermap.org/sample/. _(shown when Location Selection is `cityId`)_ |
| Latitude | `string` | Yes | — | The latitude of the location to return the weather of. Supports expressions. _(shown when Location Selection is `coordinates`)_ |
| Longitude | `string` | Yes | — | The longitude of the location to return the weather of. Supports expressions. _(shown when Location Selection is `coordinates`)_ |
| Zip Code | `string` | Yes | — | The zip/postal code to return the weather of. Optionally include country code (e.g., "10115,de"). Supports expressions. _(shown when Location Selection is `zipCode`)_ |
| Language | `string` | No | — | The two-letter language code to get your output in (e.g., en, de, fr, es, it, pt, ru, ja, zh_cn). |
| Max Concurrency | `number` | No | `10` | Maximum number of items to process concurrently. |

## Output Data

The OpenWeatherMap API response is **merged onto the input item JSON** — the incoming fields pass through unchanged, and binary data is forwarded. Weather values (temperature, humidity, wind, and so on) are reported in the units selected by **Format**.

How many output items you get depends on the operation:

| Operation | Output |
|-----------|--------|
| `currentWeather` | One output item per input item — the current-conditions response merged onto the item. |
| `5DayForecast` | **Fans out**: one output item per forecast entry in the response's `list` (3-hour steps over 5 days). Each entry carries a `city` property holding the response's city block, so the location details are available on every item. |

Because a forecast turns one input item into many, index-based pairing with the upstream node no longer holds downstream — put any field you need to match on onto the input item and it will still be present on every forecast entry.

## Usage Examples

- Get current weather for London
- Get 5-day forecast for New York by coordinates
- Get weather in Berlin using zip code in metric units
- Get current temperature in Tokyo in Fahrenheit
- Get 5-day weather forecast for a city ID

## Example Configuration

Current weather by city name, in Celsius:

```json
{
  "type": "open_weather_map",
  "parameters": {
    "operation": "currentWeather",
    "locationSelection": "cityName",
    "cityName": "London,UK",
    "format": "metric",
    "language": "en"
  }
}
```

5-day forecast by coordinates coming from the incoming item, in Fahrenheit:

```json
{
  "type": "open_weather_map",
  "parameters": {
    "operation": "5DayForecast",
    "locationSelection": "coordinates",
    "latitude": "{{ $json.lat }}",
    "longitude": "{{ $json.lon }}",
    "format": "imperial"
  }
}
```

Current weather by city ID, with German descriptions and Kelvin units:

```json
{
  "type": "open_weather_map",
  "parameters": {
    "operation": "currentWeather",
    "locationSelection": "cityId",
    "cityId": 2643743,
    "format": "standard",
    "language": "de"
  }
}
```

Weather by postal code, throttled for a large batch of items:

```json
{
  "type": "open_weather_map",
  "parameters": {
    "operation": "currentWeather",
    "locationSelection": "zipCode",
    "zipCode": "{{ $json.postcode }},de",
    "format": "metric",
    "language": "de",
    "maxConcurrency": 5
  }
}
```

### Error Handling

| Mode | Behavior |
|------|----------|
| **stop** | Halts workflow on first error |
| **continue** | Skips failed items, passes successful ones through |
| **errorPort** | Routes failed items to Error output port |

## Tips

Get current weather or 5-day forecasts from OpenWeatherMap by city name, coordinates, city ID, or zip code.

### Important Notes

- Always ensure the location parameter matches the `locationSelection` value
- When using coordinates, both `latitude` and `longitude` must be provided as strings
- City names can include country codes for better accuracy (e.g., "Paris,FR")
- Language codes should be standard two-letter ISO codes
- City IDs are numeric values, not strings