5 day weather forecast

×

OpenWeather
Meteorological Service

Dan Hart Speak to the Chief
Meteorologist Dan Hart and
his team!

Product concept

5 day forecast is available at any location on the globe. It includes weather forecast data with 3-hour step. Forecast is available in JSON or XML format.

Call 5 day / 3 hour forecast data

How to make an API call

You can search weather forecast for 5 days with data every 3 hours by geographic coordinates. All weather data can be obtained in JSON and XML formats.

API call

api.openweathermap.org/data/2.5/forecast?lat={lat}&lon={lon}&appid={API key}
Parameters
lat required 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
lon required 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
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
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
mode optional Response format. JSON format is used by default. To get data in XML format use mode=xml. Learn more
cnt optional A number of timestamps, which will be returned in the API response. Learn more
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
lang optional You can use the lang parameter to get the output in your language. Learn more

Please use Geocoder API if you need automatic convert city names and zip-codes to geo coordinates and the other way around.

Please note that built-in geocoder has been deprecated. Although it is still available for use, bug fixing and updates are no longer available for this functionality.

Examples of API calls

api.openweathermap.org/data/2.5/forecast?lat=44.34&lon=10.99&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 40,
  "list": [
    {
      "dt": 1661871600,
      "main": {
        "temp": 296.76,
        "feels_like": 296.98,
        "temp_min": 296.76,
        "temp_max": 297.87,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 933,
        "humidity": 69,
        "temp_kf": -1.11
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 0.62,
        "deg": 349,
        "gust": 1.18
      },
      "visibility": 10000,
      "pop": 0.32,
      "rain": {
        "3h": 0.26
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-08-30 15:00:00"
    },
    {
      "dt": 1661882400,
      "main": {
        "temp": 295.45,
        "feels_like": 295.59,
        "temp_min": 292.84,
        "temp_max": 295.45,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 931,
        "humidity": 71,
        "temp_kf": 2.61
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "clouds": {
        "all": 96
      },
      "wind": {
        "speed": 1.97,
        "deg": 157,
        "gust": 3.39
      },
      "visibility": 10000,
      "pop": 0.33,
      "rain": {
        "3h": 0.57
      },
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-08-30 18:00:00"
    },
    {
      "dt": 1661893200,
      "main": {
        "temp": 292.46,
        "feels_like": 292.54,
        "temp_min": 290.31,
        "temp_max": 292.46,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 931,
        "humidity": 80,
        "temp_kf": 2.15
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "clouds": {
        "all": 68
      },
      "wind": {
        "speed": 2.66,
        "deg": 210,
        "gust": 3.58
      },
      "visibility": 10000,
      "pop": 0.7,
      "rain": {
        "3h": 0.49
      },
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-08-30 21:00:00"
    },
    ....
    {
      "dt": 1662292800,
      "main": {
        "temp": 294.93,
        "feels_like": 294.83,
        "temp_min": 294.93,
        "temp_max": 294.93,
        "pressure": 1018,
        "sea_level": 1018,
        "grnd_level": 935,
        "humidity": 64,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 88
      },
      "wind": {
        "speed": 1.14,
        "deg": 17,
        "gust": 1.57
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-09-04 12:00:00"
    }
  ],
  "city": {
    "id": 3163858,
    "name": "Zocca",
    "coord": {
      "lat": 44.34,
      "lon": 10.99
    },
    "country": "IT",
    "population": 4593,
    "timezone": 7200,
    "sunrise": 1661834187,
    "sunset": 1661882248
  }
}
                        
                    

API response

If you do not see some of the parameters in your API response it means that these weather phenomena are just not happened for the time of measurement for the city or location chosen. Only really measured or calculated data is displayed in API response.

JSON

JSON format API response example
      
{
  "cod": "200",
  "message": 0,
  "cnt": 40,
  "list": [
    {
      "dt": 1661871600,
      "main": {
        "temp": 296.76,
        "feels_like": 296.98,
        "temp_min": 296.76,
        "temp_max": 297.87,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 933,
        "humidity": 69,
        "temp_kf": -1.11
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 0.62,
        "deg": 349,
        "gust": 1.18
      },
      "visibility": 10000,
      "pop": 0.32,
      "rain": {
        "3h": 0.26
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-08-30 15:00:00"
    },
    {
      "dt": 1661882400,
      "main": {
        "temp": 295.45,
        "feels_like": 295.59,
        "temp_min": 292.84,
        "temp_max": 295.45,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 931,
        "humidity": 71,
        "temp_kf": 2.61
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "clouds": {
        "all": 96
      },
      "wind": {
        "speed": 1.97,
        "deg": 157,
        "gust": 3.39
      },
      "visibility": 10000,
      "pop": 0.33,
      "rain": {
        "3h": 0.57
      },
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-08-30 18:00:00"
    },
    {
      "dt": 1661893200,
      "main": {
        "temp": 292.46,
        "feels_like": 292.54,
        "temp_min": 290.31,
        "temp_max": 292.46,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 931,
        "humidity": 80,
        "temp_kf": 2.15
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "clouds": {
        "all": 68
      },
      "wind": {
        "speed": 2.66,
        "deg": 210,
        "gust": 3.58
      },
      "visibility": 10000,
      "pop": 0.7,
      "rain": {
        "3h": 0.49
      },
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-08-30 21:00:00"
    },
    ....
    {
      "dt": 1662292800,
      "main": {
        "temp": 294.93,
        "feels_like": 294.83,
        "temp_min": 294.93,
        "temp_max": 294.93,
        "pressure": 1018,
        "sea_level": 1018,
        "grnd_level": 935,
        "humidity": 64,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 88
      },
      "wind": {
        "speed": 1.14,
        "deg": 17,
        "gust": 1.57
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-09-04 12:00:00"
    }
  ],
  "city": {
    "id": 3163858,
    "name": "Zocca",
    "coord": {
      "lat": 44.34,
      "lon": 10.99
    },
    "country": "IT",
    "population": 4593,
    "timezone": 7200,
    "sunrise": 1661834187,
    "sunset": 1661882248
  }
}
        
    

JSON format API response fields

  • cod Internal parameter
  • message Internal parameter
  • cntA number of timestamps returned in the API response
  • list
    • list.dt Time of data forecasted, unix, UTC
    • list.main
      • list.main.temp Temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
      • list.main.feels_like This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
      • list.main.temp_min Minimum temperature at the moment of calculation. This is minimal forecasted temperature (within large megalopolises and urban areas), use this parameter optionally. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
      • list.main.temp_max Maximum temperature at the moment of calculation. This is maximal forecasted temperature (within large megalopolises and urban areas), use this parameter optionally. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
      • list.main.pressure Atmospheric pressure on the sea level by default, hPa
      • list.main.sea_level Atmospheric pressure on the sea level, hPa
      • list.main.grnd_level Atmospheric pressure on the ground level, hPa
      • list.main.humidity Humidity, %
      • list.main.temp_kf Internal parameter
    • list.weather
      • 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. You can get the output in your language. Learn more
      • list.weather.icon Weather icon id
    • list.clouds
      • list.clouds.all Cloudiness, %
    • list.wind
      • list.wind.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour
      • list.wind.deg Wind direction, degrees (meteorological)
      • list.wind.gust Wind gust. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour
    • list.visibility Average visibility, metres. The maximum value of the visibility is 10km
    • list.pop Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%
    • list.rain
      • list.rain.3h Rain volume for last 3 hours, mm. Please note that only mm as units of measurement are available for this parameter
    • list.snow
      • list.snow.3h Snow volume for last 3 hours. Please note that only mm as units of measurement are available for this parameter
    • list.sys
      • list.sys.pod Part of the day (n - night, d - day)
    • list.dt_txt Time of data forecasted, ISO, UTC
  • city
    • city.id City ID. Please note that built-in geocoder functionality has been deprecated. Learn more here
    • city.name City name. Please note that built-in geocoder functionality has been deprecated. Learn more here
    • city.coord
      • city.coord.lat Geo location, latitude
      • city.coord.lon Geo location, longitude
    • city.country Country code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more here
    • city.population City population
    • city.timezone Shift in seconds from UTC
    • city.sunrise Sunrise time, Unix, UTC
    • city.sunset Sunset time, Unix, UTC

XML

XML format API response example
  
<weatherdata>
<location>
<name>Zocca</name>
<type/>
<country>IT</country>
<timezone>7200</timezone>
<location altitude="0" latitude="44.34" longitude="10.99" geobase="geonames" geobaseid="3163858"/>
</location>
<credit/>
<meta>
<lastupdate/>
<calctime>0</calctime>
<nextupdate/>
</meta>
<sun rise="2022-08-30T04:36:27" set="2022-08-30T17:57:28"/>
<forecast>
<time from="2022-08-30T12:00:00" to="2022-08-30T15:00:00">
<symbol number="500" name="light rain" var="10d"/>
<precipitation probability="0.32" unit="3h" value="0.26" type="rain"/>
<windDirection deg="349" code="N" name="North"/>
<windSpeed mps="0.62" unit="m/s" name="Calm"/>
<windGust gust="1.18" unit="m/s"/>
<temperature unit="kelvin" value="298.08" min="297.87" max="298.08"/>
<feels_like value="298.01" unit="kelvin"/>
<pressure unit="hPa" value="1015"/>
<humidity value="53" unit="%"/>
<clouds value="overcast clouds" all="100" unit="%"/>
<visibility value="10000"/>
</time>
<time from="2022-08-30T15:00:00" to="2022-08-30T18:00:00">
<symbol number="500" name="light rain" var="10n"/>
<precipitation probability="0.33" unit="3h" value="0.57" type="rain"/>
<windDirection deg="157" code="SSE" name="South-southeast"/>
<windSpeed mps="1.97" unit="m/s" name="Light breeze"/>
<windGust gust="3.39" unit="m/s"/>
<temperature unit="kelvin" value="296.33" min="292.84" max="296.33"/>
<feels_like value="296.27" unit="kelvin"/>
<pressure unit="hPa" value="1015"/>
<humidity value="60" unit="%"/>
<clouds value="overcast clouds" all="96" unit="%"/>
<visibility value="10000"/>
</time>
<time from="2022-08-30T18:00:00" to="2022-08-30T21:00:00">
<symbol number="500" name="light rain" var="10n"/>
<precipitation probability="0.7" unit="3h" value="0.49" type="rain"/>
<windDirection deg="210" code="SSW" name="South-southwest"/>
<windSpeed mps="2.66" unit="m/s" name="Light breeze"/>
<windGust gust="3.58" unit="m/s"/>
<temperature unit="kelvin" value="292.9" min="290.31" max="292.9"/>
<feels_like value="292.89" unit="kelvin"/>
<pressure unit="hPa" value="1015"/>
<humidity value="75" unit="%"/>
<clouds value="broken clouds" all="68" unit="%"/>
<visibility value="10000"/>
</time>
...
<time from="2022-09-04T09:00:00" to="2022-09-04T12:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation probability="0"/>
<windDirection deg="17" code="NNE" name="North-northeast"/>
<windSpeed mps="1.14" unit="m/s" name="Calm"/>
<windGust gust="1.57" unit="m/s"/>
<temperature unit="kelvin" value="294.93" min="294.93" max="294.93"/>
<feels_like value="294.83" unit="kelvin"/>
<pressure unit="hPa" value="1018"/>
<humidity value="64" unit="%"/>
<clouds value="overcast clouds" all="88" unit="%"/>
<visibility value="10000"/>
</time>
</forecast>
</weatherdata>
  

XML format API response fields

  • location
    • location.name City name. Please note that built-in geocoder functionality has been deprecated. Learn more here
    • location.type Internal parameter
    • location.country Country code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more here
    • location.timezone Shift in seconds from UTC
    • location.location
      • location.location.altitude Geo location, altitude above the sea level
      • location.location.latitude Geo location, latitude
      • location.location.longitude Geo location, longitude
      • location.location.geobase Internal parameter
      • location.location.geobaseid Internal parameter
  • meta
    • meta.lastupdate Prototype parameter
    • meta.calctime Speed of data calculation
    • meta.nextupdate Prototype parameter
  • sun
    • sun.rise Sunrise time
    • sun.set Sunset time
  • forecast
    • forecast.time
      • forecast.time.from Beginning of the period of data forecasted
      • forecast.time.to End of the period of data forecasted
    • forecast.symbol
      • forecast.symbol.number Weather condition id
      • forecast.symbol.name Weather condition
      • forecast.symbol.var Weather icon id
    • forecast.precipitation
      • forecast.precipitation.probability Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%
      • forecast.precipitation.unit Period of measurements. Possible value is 1 hour, 3 hours
      • forecast.precipitation.value Precipitation volume for the last 3 hours, mm. Please note that only mm as units of measurement are available for this parameter
      • forecast.precipitation.type Type of precipitation. Possible value is rain, snow
    • forecast.windDirection
      • forecast.windDirection.deg Wind direction, degrees (meteorological)
      • forecast.windDirection.code Code of the wind direction. Possible value is WSW, N, S etc.
      • forecast.windDirection.name Full name of the wind direction
    • forecast.windSpeed
      • forecast.windSpeed.mps Wind speed, meters per second
      • forecast.windSpeed.unit Wind speed units, m/s
      • forecast.windSpeed.nameType of wind
    • forecast.windGust
      • forecast.windGust.gust Wind gust, meters per second
      • forecast.windGust.unit Wind gust units, m/s
    • forecast.temperature
      • forecast.temperature.unit Unit of measurements. Possible value is Celsius, Kelvin, Fahrenhei.
      • forecast.temperature.value Temperature
      • forecast.temperature.min Minimum temperature at the moment of calculation. This is minimal forecasted temperature (within large megalopolises and urban areas), use this parameter optionally. Please find more info here
      • forecast.temperature.max Maximum temperature at the moment of calculation. This is maximal forecasted temperature (within large megalopolises and urban areas), use this parameter optionally. Please find more info here
    • forecast.feels_like
      • forecast.feels_like.unit Unit of measurements. Possible value is Celsius, Kelvin, Fahrenheit. Unit Default: Kelvin
      • forecast.feels_like.value Temperature. This temperature parameter accounts for the human perception of weather
    • forecast.pressure
      • forecast.pressure.unit hPa
      • forecast.pressure.value Pressure value
    • forecast.humidity
      • forecast.humidity.unit %
      • forecast.humidity.value Humidity value
    • forecast.clouds
      • forecast.pressure.value Name of the cloudiness
      • forecast.pressure.all Cloudiness
      • forecast.pressure.unit %
    • forecast.visibility
      • forecast.visibility.value Average visibility, metres. The maximum value of the visibility is 10km

We provide a broad variety of products such as One Call API 3.0, Solar Irradiance & Energy Prediction service, Road Risk API, Air Pollution API and solutions for advanced weather parameters like solar irradiance data, UVI, dew point, government weather alerts, etc. Please review our product list page and find more info in the product documentation and pricing pages.

List of weather condition codes

List of weather condition codes with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere etc.)

Min/max temperature in current weather API and forecast API

Please do not confuse min/max parameters in our weather APIs.
  • In 5 day / 3 hour forecast API, Hourly forecast API and Current weather API - temp_min and temp_max are optional parameters mean min / max temperature in the city at the current moment just for your reference. For large cities and megalopolises geographically expanded it might be applicable. In most cases both temp_min and temp_max parameters have the same volume as 'temp'. Please use temp_min and temp_max parameters in current weather API optionally.
  • In 16 Day forecast - min and max mean maximum and minimum temperature in the day.
Example of Current Weather API response
                      
"main":{
  "temp":306.15, //current temperature
  "pressure":1013,
  "humidity":44,
  "temp_min":30.15, //min current temperature in the city
  "temp_max":306.15 //max current temperature in the city
},
                        
                    

For comparison take a look at example of Daily Forecast Weather API response:

Daily Forecast Weather API response
      
"dt":1406080800,
"temp":{
        "day":297.77,  //daily averaged temperature
        "min":293.52, //daily min temperature
        "max":297.77, //daily max temperature
        "night":293.52, //night temperature
        "eve":297.77, //evening temperature
        "morn":297.77}, //morning temperature
      
    

Bulk downloading

We provide number of bulk files with current weather and forecasts. More information is on the Bulk page.

Bulk downloading is available not for all accounts. To get more information please refer to the Price page.

Examples of bulk files

http://bulk.openweathermap.org/sample/

Other features

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.

Built-in geocoding

Please use Geocoder API 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.

Built-in API request by city name

You can search weather forecast for 5 days with data every 3 hours by city name. All weather data can be obtained in JSON and XML formats.

API call

api.openweathermap.org/data/2.5/forecast?q={city name}&appid={API key}
api.openweathermap.org/data/2.5/forecast?q={city name},{country code}&appid={API key}
api.openweathermap.org/data/2.5/forecast?q={city name},{state code},{country code}&appid={API key}
Parameters
q required City name, state code and country code divided by comma, use ISO 3166 country codes.

You can specify the parameter not only in English. In this case, the API response should be returned in the same language as the language of requested location name if the location is in our predefined list of more than 200,000 locations.

appid required Your unique API key (you can always find it on your account page under the "API key" tab)
mode optional Response format. JSON format is used by default. To get data in XML format use mode=xml. Learn more
cnt optional A number of timestamps, which will be returned in the API response. Learn more
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
lang optional You can use the lang parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/forecast?q=London,us&mode=xml&appid={API key}
                    
<weatherdata>
<location>
<name>Shuzenji</name>
<type/>
<country>JP</country>
<timezone>32400</timezone>
<location altitude="0" latitude="35" longitude="139" geobase="geonames" geobaseid="1851632"/>
</location>
<credit/>
<meta>
<lastupdate/>
<calctime>0</calctime>
<nextupdate/>
</meta>
<sun rise="2022-03-14T20:55:33" set="2022-03-15T08:50:43"/>
<forecast>
<time from="2022-03-15T09:00:00" to="2022-03-15T12:00:00">
<symbol number="800" name="clear sky" var="01n"/>
<precipitation probability="0"/>
<windDirection deg="84" code="E" name="East"/>
<windSpeed mps="3.82" unit="m/s" name="Gentle Breeze"/>
<windGust gust="6.53" unit="m/s"/>
<temperature unit="kelvin" value="286.55" min="286.32" max="286.55"/>
<feels_like value="285.2" unit="kelvin"/>
<pressure unit="hPa" value="1008"/>
<humidity value="48" unit="%"/>
<clouds value="clear sky" all="0" unit="%"/>
<visibility value="10000"/>
</time>
    ....
<time from="2022-03-20T06:00:00" to="2022-03-20T09:00:00">
<symbol number="803" name="broken clouds" var="04n"/>
<precipitation probability="0"/>
<windDirection deg="140" code="SE" name="SouthEast"/>
<windSpeed mps="2.13" unit="m/s" name="Light breeze"/>
<windGust gust="3.3" unit="m/s"/>
<temperature unit="kelvin" value="281.23" min="281.23" max="281.23"/>
<feels_like value="279.99" unit="kelvin"/>
<pressure unit="hPa" value="1012"/>
<humidity value="78" unit="%"/>
<clouds value="broken clouds" all="74" unit="%"/>
<visibility value="10000"/>
</time>
</forecast>
</weatherdata>


                    
Please note, that searching by states available only for the USA locations.

There is a possibility to receive a central district of the city/town with its own parameters (geographic coordinates/id/name) in API response. Please see the example below.

api.openweathermap.org/data/2.5/forecast?q=München,DE&appid={API key}
                          
{
  "cod": "200",
  "message": 0,
  "cnt": 40,
  "list": [
    {
      "dt": 1647345600,
      "main": {
        "temp": 284.83,
        "feels_like": 283.59,
        "temp_min": 284.83,
        "temp_max": 285.69,
        "pressure": 1013,
        "sea_level": 1013,
        "grnd_level": 964,
        "humidity": 59,
        "temp_kf": -0.86
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 0.7,
        "deg": 288,
        "gust": 2.1
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 12:00:00"
    },
    {
      "dt": 1647356400,
      "main": {
        "temp": 285.09,
        "feels_like": 283.85,
        "temp_min": 285.09,
        "temp_max": 285.6,
        "pressure": 1016,
        "sea_level": 1016,
        "grnd_level": 961,
        "humidity": 58,
        "temp_kf": -0.51
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 2.24,
        "deg": 26,
        "gust": 2.56
      },
      "visibility": 10000,
      "pop": 0.26,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 283.03,
        "feels_like": 281.89,
        "temp_min": 282.13,
        "temp_max": 283.03,
        "pressure": 1020,
        "sea_level": 1020,
        "grnd_level": 961,
        "humidity": 71,
        "temp_kf": 0.9
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 2.41,
        "deg": 169,
        "gust": 4.81
      },
      "visibility": 10000,
      "pop": 0.31,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
      ....
     {
      "dt": 1647766800,
      "main": {
        "temp": 278.26,
        "feels_like": 274.33,
        "temp_min": 278.26,
        "temp_max": 278.26,
        "pressure": 1030,
        "sea_level": 1030,
        "grnd_level": 966,
        "humidity": 54,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "few clouds",
          "icon": "02d"
        }
      ],
      "clouds": {
        "all": 18
      },
      "wind": {
        "speed": 5.66,
        "deg": 89,
        "gust": 8.01
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-20 09:00:00"
    }
  ],
  "city": {
    "id": 2867714,
    "name": "Munich",
    "coord": {
      "lat": 48.1374,
      "lon": 11.5755
    },
    "country": "DE",
    "population": 1260391,
    "timezone": 3600,
    "sunrise": 1647322046,
    "sunset": 1647364681
  }
}
                          
                        

Built-in API request by city ID

You can search weather forecast for 5 days with data every 3 hours by city ID. All weather data can be obtained in JSON and XML formats.

List of city ID "city.list.json.gz" can be downloaded here.

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

API call

api.openweathermap.org/data/2.5/forecast?id={city ID}&appid={API key}
Parameters
id required City ID. The list of city IDs 'city.list.json.gz' can be downloaded here.
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
mode optional Response format. JSON format is used by default. To get data in XML format use mode=xml. Learn more
cnt optional A number of timestamps, which will be returned in the API response. Learn more
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
lang optional You can use the lang parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/forecast?id=524901&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 40,
  "list": [
    {
      "dt": 1647345600,
      "main": {
        "temp": 274.05,
        "feels_like": 270.56,
        "temp_min": 272.67,
        "temp_max": 274.05,
        "pressure": 1035,
        "sea_level": 1035,
        "grnd_level": 1016,
        "humidity": 56,
        "temp_kf": 1.38
      },
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01d"
        }
      ],
      "clouds": {
        "all": 8
      },
      "wind": {
        "speed": 3.2,
        "deg": 28,
        "gust": 4.62
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 12:00:00"
    },
    {
      "dt": 1647356400,
      "main": {
        "temp": 272.74,
        "feels_like": 270.19,
        "temp_min": 270.12,
        "temp_max": 272.74,
        "pressure": 1035,
        "sea_level": 1035,
        "grnd_level": 1016,
        "humidity": 64,
        "temp_kf": 2.62
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "few clouds",
          "icon": "02d"
        }
      ],
      "clouds": {
        "all": 23
      },
      "wind": {
        "speed": 2.02,
        "deg": 46,
        "gust": 4.27
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 269.89,
        "feels_like": 266.36,
        "temp_min": 267.81,
        "temp_max": 269.89,
        "pressure": 1036,
        "sea_level": 1036,
        "grnd_level": 1017,
        "humidity": 78,
        "temp_kf": 2.08
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03n"
        }
      ],
      "clouds": {
        "all": 33
      },
      "wind": {
        "speed": 2.42,
        "deg": 58,
        "gust": 7.57
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
   ....
        {
      "dt": 1647766800,
      "main": {
        "temp": 274.5,
        "feels_like": 272.12,
        "temp_min": 274.5,
        "temp_max": 274.5,
        "pressure": 1044,
        "sea_level": 1044,
        "grnd_level": 1025,
        "humidity": 72,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01d"
        }
      ],
      "clouds": {
        "all": 10
      },
      "wind": {
        "speed": 2.13,
        "deg": 305,
        "gust": 3.26
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-20 09:00:00"
    }
  ],
  "city": {
    "id": 524901,
    "name": "Moscow",
    "coord": {
      "lat": 55.7522,
      "lon": 37.6156
    },
    "country": "RU",
    "population": 0,
    "timezone": 10800,
    "sunrise": 1647315936,
    "sunset": 1647358295
  }
}

                    

Built-in API request by ZIP code

Please note if country is not specified then the search works for USA as a default.

API call

api.openweathermap.org/data/2.5/forecast?zip={zip code},{country code}&appid={API key}
Parameters
zip required Zip code
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
mode optional Response format. JSON format is used by default. To get data in XML format use mode=xml. Learn more
cnt optional A number of timestamps, which will be returned in the API response. Learn more
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
lang optional You can use the lang parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/forecast?zip=94040,us&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 40,
  "list": [
    {
      "dt": 1647345600,
      "main": {
        "temp": 286.94,
        "feels_like": 286.2,
        "temp_min": 286.94,
        "temp_max": 287.43,
        "pressure": 1023,
        "sea_level": 1023,
        "grnd_level": 1020,
        "humidity": 70,
        "temp_kf": -0.49
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 0.5,
        "deg": 203,
        "gust": 1.01
      },
      "visibility": 10000,
      "pop": 0.24,
      "rain": {
        "3h": 0.12
      },
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 12:00:00"
    },
    {
      "dt": 1647356400,
      "main": {
        "temp": 286.99,
        "feels_like": 286.47,
        "temp_min": 286.99,
        "temp_max": 287.08,
        "pressure": 1023,
        "sea_level": 1023,
        "grnd_level": 1021,
        "humidity": 78,
        "temp_kf": -0.09
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 0.67,
        "deg": 271,
        "gust": 1.74
      },
      "visibility": 10000,
      "pop": 0.23,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 288.71,
        "feels_like": 288.28,
        "temp_min": 288.71,
        "temp_max": 289.59,
        "pressure": 1024,
        "sea_level": 1024,
        "grnd_level": 1022,
        "humidity": 75,
        "temp_kf": -0.88
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 1.63,
        "deg": 312,
        "gust": 2.92
      },
      "visibility": 10000,
      "pop": 0.08,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    ....
       {
      "dt": 1647766800,
      "main": {
        "temp": 280.26,
        "feels_like": 276.7,
        "temp_min": 280.26,
        "temp_max": 280.26,
        "pressure": 1013,
        "sea_level": 1013,
        "grnd_level": 1010,
        "humidity": 76,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01n"
        }
      ],
      "clouds": {
        "all": 6
      },
      "wind": {
        "speed": 6.06,
        "deg": 302,
        "gust": 11.59
      },
      "visibility": 10000,
      "pop": 0.06,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-20 09:00:00"
    }
  ],
  "city": {
    "id": 0,
    "name": "Mountain View",
    "coord": {
      "lat": 37.3855,
      "lon": -122.088
    },
    "country": "US",
    "population": 0,
    "timezone": -25200,
    "sunrise": 1647353957,
    "sunset": 1647396916
  }
}
                        
                    

Format

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

Parameters
mode optional Response format. JSON format is used by default. To get data in XML format use mode=xml.

Examples of API calls

JSON

api.openweathermap.org/data/2.5/weather?q=London&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 40,
  "list": [
    {
      "dt": 1647345600,
      "main": {
        "temp": 287.39,
        "feels_like": 286.38,
        "temp_min": 286.69,
        "temp_max": 287.39,
        "pressure": 1021,
        "sea_level": 1021,
        "grnd_level": 1018,
        "humidity": 58,
        "temp_kf": 0.7
      },
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 71
      },
      "wind": {
        "speed": 3.08,
        "deg": 128,
        "gust": 4.3
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 12:00:00"
    },
    {
      "dt": 1647356400,
      "main": {
        "temp": 287.09,
        "feels_like": 286.13,
        "temp_min": 286.5,
        "temp_max": 287.09,
        "pressure": 1021,
        "sea_level": 1021,
        "grnd_level": 1016,
        "humidity": 61,
        "temp_kf": 0.59
      },
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 81
      },
      "wind": {
        "speed": 3.28,
        "deg": 168,
        "gust": 3.96
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 285.44,
        "feels_like": 284.6,
        "temp_min": 284.47,
        "temp_max": 285.44,
        "pressure": 1020,
        "sea_level": 1020,
        "grnd_level": 1016,
        "humidity": 72,
        "temp_kf": 0.97
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 90
      },
      "wind": {
        "speed": 2.7,
        "deg": 183,
        "gust": 5.59
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    .....
        {
      "dt": 1647766800,
      "main": {
        "temp": 282.42,
        "feels_like": 280,
        "temp_min": 282.42,
        "temp_max": 282.42,
        "pressure": 1036,
        "sea_level": 1036,
        "grnd_level": 1033,
        "humidity": 60,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ],
      "clouds": {
        "all": 39
      },
      "wind": {
        "speed": 4.58,
        "deg": 83,
        "gust": 8.45
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-20 09:00:00"
    }
  ],
  "city": {
    "id": 2643743,
    "name": "London",
    "coord": {
      "lat": 51.5085,
      "lon": -0.1257
    },
    "country": "GB",
    "population": 1000000,
    "timezone": 0,
    "sunrise": 1647324902,
    "sunset": 1647367441
  }
}
                        
                    

XML

api.openweathermap.org/data/2.5/weather?q=London&mode=xml
                      
<weatherdata>
<location>
<name>London</name>
<type/>
<country>GB</country>
<timezone>0</timezone>
<location altitude="0" latitude="51.5085" longitude="-0.1257" geobase="geonames" geobaseid="2643743"/>
</location>
<credit/>
<meta>
<lastupdate/>
<calctime>0</calctime>
<nextupdate/>
</meta>
<sun rise="2022-03-15T06:15:02" set="2022-03-15T18:04:01"/>
<forecast>
<time from="2022-03-15T09:00:00" to="2022-03-15T12:00:00">
<symbol number="803" name="broken clouds" var="04d"/>
<precipitation probability="0"/>
<windDirection deg="128" code="SE" name="SouthEast"/>
<windSpeed mps="3.08" unit="m/s" name="Light breeze"/>
<windGust gust="4.3" unit="m/s"/>
<temperature unit="kelvin" value="287.52" min="286.69" max="287.52"/>
<feels_like value="286.47" unit="kelvin"/>
<pressure unit="hPa" value="1021"/>
<humidity value="56" unit="%"/>
<clouds value="broken clouds" all="71" unit="%"/>
<visibility value="10000"/>
</time>
<time from="2022-03-15T12:00:00" to="2022-03-15T15:00:00">
<symbol number="803" name="broken clouds" var="04d"/>
<precipitation probability="0"/>
<windDirection deg="168" code="SSE" name="South-southeast"/>
<windSpeed mps="3.28" unit="m/s" name="Light breeze"/>
<windGust gust="3.96" unit="m/s"/>
<temperature unit="kelvin" value="287.18" min="286.5" max="287.18"/>
<feels_like value="286.18" unit="kelvin"/>
<pressure unit="hPa" value="1021"/>
<humidity value="59" unit="%"/>
<clouds value="broken clouds" all="81" unit="%"/>
<visibility value="10000"/>
</time>
<time from="2022-03-15T15:00:00" to="2022-03-15T18:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation probability="0"/>
<windDirection deg="183" code="S" name="South"/>
<windSpeed mps="2.7" unit="m/s" name="Light breeze"/>
<windGust gust="5.59" unit="m/s"/>
<temperature unit="kelvin" value="285.49" min="284.47" max="285.49"/>
<feels_like value="284.66" unit="kelvin"/>
<pressure unit="hPa" value="1020"/>
<humidity value="72" unit="%"/>
<clouds value="overcast clouds" all="90" unit="%"/>
<visibility value="10000"/>
</time>
....
<time from="2022-03-20T06:00:00" to="2022-03-20T09:00:00">
<symbol number="802" name="scattered clouds" var="03d"/>
<precipitation probability="0"/>
<windDirection deg="83" code="E" name="East"/>
<windSpeed mps="4.58" unit="m/s" name="Gentle Breeze"/>
<windGust gust="8.45" unit="m/s"/>
<temperature unit="kelvin" value="282.42" min="282.42" max="282.42"/>
<feels_like value="280" unit="kelvin"/>
<pressure unit="hPa" value="1036"/>
<humidity value="60" unit="%"/>
<clouds value="scattered clouds" all="39" unit="%"/>
<visibility value="10000"/>
</time>
</forecast>
</weatherdata>
                        
                    

Limitation of result

To limit number of timestamps in the API response please setup cnt.

Parameters
cnt optional A number of timestamps, which will be returned in the API response.

Examples of API calls

https://api.openweathermap.org/data/2.5/forecast?lat=57&lon=-2.15&cnt=3&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 281.28,
        "feels_like": 277.76,
        "temp_min": 280.57,
        "temp_max": 281.28,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.71
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 95
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "rain": {
        "3h": 0.27
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 281.03,
        "feels_like": 277.59,
        "temp_min": 280.73,
        "temp_max": 281.03,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.3
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 98
      },
      "wind": {
        "speed": 6.31,
        "deg": 189,
        "gust": 11.74
      },
      "visibility": 10000,
      "pop": 0.2,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    {
      "dt": 1647378000,
      "main": {
        "temp": 280.39,
        "feels_like": 276.74,
        "temp_min": 280.39,
        "temp_max": 280.39,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 82,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.41,
        "deg": 199,
        "gust": 12.52
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 21:00:00"
    }
  ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                        
                    

Units of measurement

standard, metric, and imperial units are available.

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.
  • For temperature in Fahrenheit use units=imperial
  • For temperature in Celsius use units=metric
  • Temperature in Kelvin is used by default, no need to use units parameter in API call

List of all API parameters with units openweathermap.org/weather-data

Examples of API calls

Standard

https://api.openweathermap.org/data/2.5/forecast?lat=57&lon=-2.15&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 281.28,
        "feels_like": 277.76,
        "temp_min": 280.57,
        "temp_max": 281.28,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.71
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 95
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "rain": {
        "3h": 0.27
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 281.03,
        "feels_like": 277.59,
        "temp_min": 280.73,
        "temp_max": 281.03,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.3
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 98
      },
      "wind": {
        "speed": 6.31,
        "deg": 189,
        "gust": 11.74
      },
      "visibility": 10000,
      "pop": 0.2,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    {
      "dt": 1647378000,
      "main": {
        "temp": 280.39,
        "feels_like": 276.74,
        "temp_min": 280.39,
        "temp_max": 280.39,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 82,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.41,
        "deg": 199,
        "gust": 12.52
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 21:00:00"
    }
  ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                        
                    

Metric

https://api.openweathermap.org/data/2.5/forecast?lat=57&lon=-2.15&appid={API key}&units=metric
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 8.13,
        "feels_like": 4.61,
        "temp_min": 7.42,
        "temp_max": 8.13,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.71
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 95
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "rain": {
        "3h": 0.27
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 7.88,
        "feels_like": 4.44,
        "temp_min": 7.58,
        "temp_max": 7.88,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.3
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 98
      },
      "wind": {
        "speed": 6.31,
        "deg": 189,
        "gust": 11.74
      },
      "visibility": 10000,
      "pop": 0.2,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    {
      "dt": 1647378000,
      "main": {
        "temp": 7.24,
        "feels_like": 3.59,
        "temp_min": 7.24,
        "temp_max": 7.24,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 82,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.41,
        "deg": 199,
        "gust": 12.52
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 21:00:00"
    }
  ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                        
                    

Imperial

https://api.openweathermap.org/data/2.5/forecast?lat=57&lon=-2.15&appid={API key}&units=imperial
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 46.63,
        "feels_like": 40.3,
        "temp_min": 45.36,
        "temp_max": 46.63,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.71
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 95
      },
      "wind": {
        "speed": 15.17,
        "deg": 184,
        "gust": 27.16
      },
      "visibility": 10000,
      "pop": 0.34,
      "rain": {
        "3h": 0.27
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 46.18,
        "feels_like": 39.99,
        "temp_min": 45.64,
        "temp_max": 46.18,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.3
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 98
      },
      "wind": {
        "speed": 14.12,
        "deg": 189,
        "gust": 26.26
      },
      "visibility": 10000,
      "pop": 0.2,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    {
      "dt": 1647378000,
      "main": {
        "temp": 45.03,
        "feels_like": 38.46,
        "temp_min": 45.03,
        "temp_max": 45.03,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 82,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 14.34,
        "deg": 199,
        "gust": 28.01
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 21:00:00"
    }
  ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                        
                    

Multilingual support

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

Translation is applied to the city name and description fields.

API call

http://api.openweathermap.org/data/2.5/forecast?id=524901&lang={lang}
Parameters
lang optional You can use the lang parameter to get the output in your language.

Examples of API calls

http://api.openweathermap.org/data/2.5/forecast?id=524901&lang=zh_cn&appid={API key}
                      
{
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 281.28,
        "feels_like": 277.76,
        "temp_min": 280.57,
        "temp_max": 281.28,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.71
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "小雨",
          "icon": "10d"
        }
      ],
      "clouds": {
        "all": 95
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "rain": {
        "3h": 0.27
      },
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647367200,
      "main": {
        "temp": 281.03,
        "feels_like": 277.59,
        "temp_min": 280.73,
        "temp_max": 281.03,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.3
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "阴,多云",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 98
      },
      "wind": {
        "speed": 6.31,
        "deg": 189,
        "gust": 11.74
      },
      "visibility": 10000,
      "pop": 0.2,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 18:00:00"
    },
    {
      "dt": 1647378000,
      "main": {
        "temp": 280.39,
        "feels_like": 276.74,
        "temp_min": 280.39,
        "temp_max": 280.39,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 82,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "阴,多云",
          "icon": "04n"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.41,
        "deg": 199,
        "gust": 12.52
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 21:00:00"
    }
  ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                      
                    

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.

Examples of API calls

api.openweathermap.org/data/2.5/forecast?q=London,uk&callback=test&appid={API key}
                      
test({
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1599760800,
      "main": {
        "temp": 66.09,
        "feels_like": 61.48,
        "temp_min": 64.67,
        "temp_max": 66.09,
        "pressure": 1021,
        "sea_level": 1020,
        "grnd_level": 1017,
        "humidity": 44,
        "temp_kf": 0.79
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "多云",
          "icon": "03d"
        }
      ],
      "clouds": {
        "all": 37
      },
      "wind": {
        "speed": 5.53,
        "deg": 314,
        "gust": 8.3
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2020-09-10 18:00:00"
    },
    {
      "dt": 1599771600,
      "main": {
        "temp": 61.43,
        "feels_like": 57.49,
        "temp_min": 59.77,
        "temp_max": 61.43,
        "pressure": 1021,
        "sea_level": 1021,
        "grnd_level": 1018,
        "humidity": 54,
        "temp_kf": 0.92
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "晴,少云",
          "icon": "02n"
        }
      ],
      "clouds": {
        "all": 22
      },
      "wind": {
        "speed": 4.76,
        "deg": 15,
        "gust": 5.3
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2020-09-10 21:00:00"
    },
    {
      "dt": 1599782400,
      "main": {
        "temp": 59.18,
        "feels_like": 56.8,
        "temp_min": 58.62,
        "temp_max": 59.18,
        "pressure": 1019,
        "sea_level": 1019,
        "grnd_level": 1016,
        "humidity": 57,
        "temp_kf": 0.31
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "多云",
          "icon": "03n"
        }
      ],
      "clouds": {
        "all": 46
      },
      "wind": {
        "speed": 1.74,
        "deg": 106,
        "gust": 5.3
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2020-09-11 00:00:00"
    }
  ],
  "city": {
    "id": 2643743,
    "name": "London",
    "coord": {
      "lat": 51.5085,
      "lon": -0.1257
    },
    "country": "GB",
    "population": 1000000,
    "timezone": 3600,
    "sunrise": 1599715685,
    "sunset": 1599762420
  }
})
                        
                    
We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.