<!-- block-id: concept -->

## Climatic forecast for 30 days

### Product concept

Climatic forecast 30 Days allows you to request daily weather data for the next 30 days. Data is available in JSON and XML formats.

<!-- block-id: year -->

## Call weather forecast for 30 days

<!-- block-id: geo-year -->

### How to make an API call

### API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?lat={lat}&lon={lon}&appid={API key}
```

| Parameters |  |  |
| --- | --- | --- |
| `lat` | Yes | Latitude. If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our [Geocoding API](/api/geocoding-api.md) |
| `lon` | Yes | Longitude. If you need the geocoder to automatic convert city names and zip-codes to geo coordinates and the other way around, please use our [Geocoding API](/api/geocoding-api.md) |
| `appid` | Yes | Your unique API key (you can always find it on your account page under the ["API key" tab](https://home.openweathermap.org/api_keys)) |
| `cnt` | optional | A number of days, which will be returned in the API response (from `1` to `30`). [Learn more](#limit) |
| `mode` | optional | Data format. Possible values are: `json`, `xml`. If the `mode` parameter is empty the format is JSON by default. [Learn more](#format) |
| `units` | optional | Units of measurement. `standard`, `metric` and `imperial` units are available. If you do not use the `units` parameter, `standard` units will be applied by default. [Learn more](#data) |
| `lang` | optional | Language code. [Learn more](#multi) |

> Please use [Geocoder API](/api/geocoding-api.md) if you need automatic convert city names and zip-codes to geo coordinates and the other way around.
>
> Please note that [built-in geocoder](#geocoding) has been deprecated. Although it is still available for use, bug fixing and updates are no longer available for this functionality.

### Example of API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?lat=35&lon=139&appid={API key}
```

<!-- block-id: fields -->

### Fields in API response

- `city`
- - `city.id` City ID. Please note that built-in geocoder functionality has been deprecated. Learn more [here](/api/forecast30.md#builtin)
  - `city.name` City name. Please note that built-in geocoder functionality has been deprecated. Learn more [here](/api/forecast30.md#builtin)
  - `city.coord`
  - - `city.coord.lat` Geo location, latitude
    - `city.coord.lon` Geo location, longitude
- `country` Country code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more [here](/api/forecast30.md#builtin)
- `population` City population
- `timezone` Shift in seconds from UTC
- `cod` Internal parameter
- `message` Internal parameter
- `list`
- - `list.dt `Time of data forecasted
  - `list.sunrise` Sunrise time, Unix, UTC
  - `list.sunset` Sunset time, Unix, UTC
  - `list.temp`
  - - `list.temp.day` Day temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.temp.min` Min daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.temp.max` Max daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.temp.night` Night temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.temp.eve` Evening temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.temp.morn` Morning temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
  - `list.feels_like`
  - - `list.feels_like.day` Day temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.feels_like.night` Night temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.feels_like.eve` Evening temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
    - `list.feels_like.morn` Morning temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
  - `list.pressure` Atmospheric pressure on the sea level, hPa
  - `list.humidity` Humidity, %
  - `list.weather` (more info [Weather condition codes](/weather-conditions.md))
  - - `list.weather.id` Weather condition id
    - `list.weather.main` Group of weather parameters (Rain, Snow, Clouds etc.)
    - `list.weather.description` Weather condition within the group. Please find more [here.](/api/forecast30.md#list) You can get the output in your language. [Learn more](/api/forecast30.md#multi)
    - `list.weather.icon` Weather icon id
  - `list.speed` Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour
  - `list.deg` Wind direction, degrees (meteorological)
  - `list.clouds` Cloudiness, %
  - `list.rain` Precipitation volume, mm. Please note that only mm as units of measurement are available for this parameter
  - `list.snow` Snow volume, mm. Please note that only mm as units of measurement are available for this parameter
  - `list.cnt` Number of lines returned by this API call

<!-- block-id: promotion -->

> We provide a broad variety of products such as [One Call API 4.0,](/api/one-call-4.md)  [Solar Irradiance & Energy Prediction service,](/api.md#solar)  [Road Risk API,](/api/road-risk.md)  [Air Pollution API](/api/air-pollution.md) and solutions for advanced weather parameters like solar irradiance data, UVI, dew point, government weather alerts, etc. Please review our [product list](/api.md) page and find more info in the product documentation and [pricing](/price.md) pages.

<!-- block-id: list -->

### List of weather condition codes

List of [weather condition codes](/weather-conditions.md) with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere etc.)

<!-- block-id: other -->

## Other features

<!-- block-id: geocoding -->

### Geocoding API

Requesting API calls by geographical coordinates is the most accurate way to specify any location. If you need to convert city names and zip-codes to geo coordinates and the other way around automatically, please use our [Geocoding API](/api/geocoding-api.md).

<!-- block-id: builtin -->

### Built-in geocoding

> Please use [Geocoder API](/api/geocoding-api.md) if you need automatic convert city names and zip-codes to geo coordinates and the other way around.
>
> **Please note that API requests by city name, zip-codes and city id have been deprecated. Although they are still available for use, bug fixing and updates are no longer available for this functionality.**

<!-- block-id: name-year -->

### Built-in API request by city name

### API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?q={city name},{country code}&appid={API key}
```

| Parameters |  |  |
| --- | --- | --- |
| `q` | Yes | city name and country code divided by comma (please use ISO 3166 country codes) |
| `appid` | Yes | Your unique API key (you can always find it on your account page under the ["API key" tab](https://home.openweathermap.org/api_keys)) |
| `cnt` | optional | A number of days, which will be returned in the API response (from `1` to `30`). [Learn more](#limit) |
| `mode` | optional | Data format. Possible values are: `json`, `xml`. If the `mode` parameter is empty the format is JSON by default. [Learn more](#format) |
| `units` | optional | Units of measurement. `standard`, `metric` and `imperial` units are available. If you do not use the `units` parameter, `standard` units will be applied by default. [Learn more](#data) |
| `lang` | optional | Language code. [Learn more](#multi) |

### Example of API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?q=London&appid={API key}
```

> When requesting API by city name, there is a possibility to receive a central district of the city/town with its own parameters (geographic coordinates/id/name) in API response.

<!-- block-id: cityid-year -->

### Built-in API request by city ID

List of city IDs can be downloaded [here](http://bulk.openweathermap.org/sample/city.list.json.gz).

We recommend to call API by city ID to get unambiguous result for your city.

### API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?id={city ID}&appid={API key}
```

| Parameters |  |  |
| --- | --- | --- |
| `id` | Yes | city ID |
| `appid` | Yes | Your unique API key (you can always find it on your account page under the ["API key" tab](https://home.openweathermap.org/api_keys)) |
| `cnt` | optional | A number of days, which will be returned in the API response (from `1` to `30`). [Learn more](#limit) |
| `mode` | optional | Data format. Possible values are: `json`, `xml`. If the `mode` parameter is empty the format is JSON by default. [Learn more](#format) |
| `units` | optional | Units of measurement. `standard`, `metric` and `imperial` units are available. If you do not use the `units` parameter, `standard` units will be applied by default. [Learn more](#data) |
| `lang` | optional | Language code. [Learn more](#multi) |

### Example of API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?id=2643743&appid={API key}
```

<!-- block-id: zip-year -->

### Built-in API request by ZIP code

Please note that, if the country code is not specified, then the search function will use `usa` by default.

### API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?zip={zip code},{country code}&appid={API key}
```

| Parameters |  |  |
| --- | --- | --- |
| `zip` | Yes | Zip code |
| `appid` | Yes | Your unique API key (you can always find it on your account page under the ["API key" tab](https://home.openweathermap.org/api_keys)) |
| `cnt` | optional | A number of days, which will be returned in the API response (from `1` to `30`). [Learn more](#limit) |
| `mode` | optional | Data format. Possible values are: `json`, `xml`. If the `mode` parameter is empty the format is JSON by default. [Learn more](#format) |
| `units` | optional | Units of measurement. `standard`, `metric` and `imperial` units are available. If you do not use the `units` parameter, `standard` units will be applied by default. [Learn more](#data) |
| `lang` | optional | Language code. [Learn more](#multi) |

### Example of API call

```text
https://pro.openweathermap.org/data/2.5/forecast/climate?zip=94040,us&appid={API key}
```

### Format

Data format. JSON format is used by default. To get data in XML format use `mode=xml`.

<!-- block-id: format -->

| Parameters |  |  |
| --- | --- | --- |
| `mode` | optional | Data format. Possible values are: `json`, `xml`. If the `mode` parameter is empty the format is JSON by default. |

JSON

XML

### Limitation of result

To limit the number of returned days please use `cnt` parameter.

<!-- block-id: limit -->

| Parameters |  |  |
| --- | --- | --- |
| `cnt` |  | A number of days, which will be returned in the API response |

### Units of measurement

`standard`, `metric`, and `imperial` units are available. [List of all API parameters with available units](/weather-data.md).

<!-- block-id: data -->

| Parameters |  |  |
| --- | --- | --- |
| `units` | optional | Units of measurement. `standard`, `metric` and `imperial` units are available. If you do not use the `units` parameter, `standard` units will be applied by default. |

> Temperature is available in Fahrenheit, Celsius and Kelvin units.
>
> Wind speed is available in miles/hour and meter/sec.
>
> - For temperature in Fahrenheit and wind speed in miles/hour, use `units=imperial`
> - For temperature in Celsius and wind speed in meter/sec, use `units=metric`
> - Temperature in Kelvin and wind speed in meter/sec is used by default, so there is no need to use the units parameter in the API call if you want this

### Standard

### Metric

### Imperial

### Multilingual support

You can use `lang` parameter to get the output in your language.

Translation is applied for the `city name` and `description` fields.

### API call

```text
http://api.openweathermap.org/data/2.5/forecast/climate?id=524901&lang={lang}
```

| Parameters |  |  |
| --- | --- | --- |
| `lang` | optional | Language code |

We support the following languages that you can use with the corresponded lang values:

- `sq` Albanian
- `af` Afrikaans
- `ar` Arabic
- `az` Azerbaijani
- `eu` Basque
- `be` Belarusian
- `bg` Bulgarian
- `ca` Catalan
- `zh_cn` Chinese Simplified
- `zh_tw` Chinese Traditional
- `hr` Croatian
- `cz` Czech
- `da` Danish
- `nl` Dutch
- `en` English
- `fi` Finnish
- `fr` French
- `gl` Galician
- `de` German
- `el` Greek
- `he` Hebrew
- `hi` Hindi
- `hu` Hungarian
- `is` Icelandic
- `id` Indonesian
- `it` Italian
- `ja` Japanese
- `kr` Korean
- `ku` Kurmanji (Kurdish)
- `la` Latvian
- `lt` Lithuanian
- `mk` Macedonian
- `no` Norwegian
- `fa` Persian (Farsi)
- `pl` Polish
- `pt` Portuguese
- `pt_br` Português Brasil
- `ro` Romanian
- `ru` Russian
- `sr` Serbian
- `sk` Slovak
- `sl` Slovenian
- `sp, es` Spanish
- `sv, se` Swedish
- `th` Thai
- `tr` Turkish
- `ua, uk` Ukrainian
- `vi` Vietnamese
- `zu` Zulu

### Call back function for JavaScript code

To use JavaScript code you can transfer `callback` functionName to JSONP callback.

### Example of API call

```text
test(
{
 "coord":{
    "lon":-0.13,
    "lat":51.51
 },
 "weather":[
    {
       "id":300,
       "main":"Drizzle",
       "description":"light intensity drizzle",
       "icon":"09d"
    }
 ],
 "base":"stations",
 "main":{
    "temp":280.32,
    "pressure":1012,
    "humidity":81,
    "temp_min":279.15,
    "temp_max":281.15
 },
 "visibility":10000,
 "wind":{
    "speed":4.1,
    "deg":80
 },
 "clouds":{
    "all":90
 },
 "dt":1485789600,
 "sys":{
    "type":1,
    "id":5091,
    "message":0.0103,
    "country":"GB",
    "sunrise":1485762037,
    "sunset":1485794875
 },
 "id":2643743,
 "name":"London",
 "cod":200
}
)
```