Climate forecast for 30 days

Climate forecast for 30 days allows you to request weather data for the next 30 days. This product is based on a statistical approach to our Historical weather data and is updated with 1-hour frequency.

Request of Climate forecast for 30 days

Request by city name

API call:
pro.openweathermap.org/data/2.5/climate/month?q={city name},{country code}
Parameters:

q city name and country code divided by comma (please use ISO 3166 country codes)

Examples of API calls:
https://pro.openweathermap.org/data/2.5/climate/month?q=London&appid={YOUR 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.

Request by city ID

List of city IDs can be downloaded here http://bulk.openweathermap.org/sample/history.city.list.json.gz

API call:
pro.openweathermap.org/data/2.5/climate/month?id={city ID}
Parameters:
id city ID
Examples of API calls:
https://pro.openweathermap.org/data/2.5/climate/month?id=2643743&appid={YOUR API KEY}

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

Request by geographic coordinates

API call:
pro.openweathermap.org/data/2.5/climate/month?lat={lat}&lon={lon}
Parameters:
lat, lon coordinates of the location of your interest
Examples of API calls:
https://pro.openweathermap.org/data/2.5/climate/month?lat=35&lon=139&appid={YOUR API KEY}

Request by ZIP code

Description:

Please note that, if your country is not specified, then the search function will use USA by default.

API call:
pro.openweathermap.org/data/2.5/climate/month?zip={zip code},{country code}
Parameters:

zip zip code

Examples of API calls:
https://pro.openweathermap.org/data/2.5/climate/month?zip=94040,us&appid={YOUR API KEY}

Response of Climate forecast for 30 days

The response of API contains 30 groups of statistical data for each day of the 30 days.

Example of API response:

{
  "cod": "200",
  "city": {
    "id": 2643743,
    "name": "London",
    "coord": {
      "lon": -0.1277,
      "lat": 51.5073
    },
    "country": "GB"
  },
  "message": 0.353472054,
  "list": [
    {
      "dt": 1560384000,
      "humidity": 72.96,
      "pressure": 1011.99,
      "temp": {
        "average": 289.42,
        "average_max": 292.55,
        "average_min": 285.12,
        "record_max": 298.95,
        "record_min": 281.34
      },
      "wind_speed": 2.74
    },
.....

Parameters:
  • codeInternal parameter
  • city
    • city.id City ID
    • city.name City name
    • city.coord
      • city.coord.lat City geo location, latitude
      • city.coord.lon City geo location, longitude
    • city.country Country code (GB, JP etc.)
  • messageInternal parameter
  • list
    • dt Time of data forecasted
    • list.humidity Humidity, %
    • list.pressure Atmospheric pressure on the sea level, hPa
    • temp
      • averageAverage of all minimum temperature values for this day, Kelvin.
      • average_maxAverage of all maximum temperature values for this day, Kelvin.
      • average_minAverage of all minimum temperature values for this day, Kelvin.
      • record_maxAbsolute temperature maximum based on all historical measurements for this day, Kelvin.
      • record_minAbsolute temperature minimum based on all historical measurements for this day, Kelvin.
    • wind_speedThe value of the wind speed, meter/sec.