Hourly forecast

Hourly forecast for 4 days (96 timestamps). Weather data is available in JSON and XML formats.

Call hourly forecast data

How to make an API call

You can search weather forecast for 4 days with data every hour by geographic coordinates.

All weather data can be obtained in JSON and XML formats.

API call

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat={lat}&lon={lon}&appid={API key}
Parameters
lat, lon required Geographical coordinates (latitude, 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)
mode optional Data format. Possible values are json and xml. If the mode parameter is empty the format is JSON by default. Learn more
cnt optional A number of timestamps in response. Learn more
lang optional Language code. Learn more

You can use the geocoder built into this API by default, but please note that this version is less accurate than the Geocoder API and will be deprecated soon.
Learn more

API call example

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=35&lon=139&appid={API key}
                     
{
  "cod": "200",
  "message": 0,
  "cnt": 96,
  "list": [
    {
      "dt": 1647360000,
      "main": {
        "temp": 283.32,
        "feels_like": 281.83,
        "temp_min": 283.21,
        "temp_max": 283.32,
        "pressure": 1011,
        "sea_level": 1011,
        "grnd_level": 985,
        "humidity": 55,
        "temp_kf": 0.11
      },
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01n"
        }
      ],
      "clouds": {
        "all": 0
      },
      "wind": {
        "speed": 2.33,
        "deg": 62,
        "gust": 3.62
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 16:00:00"
    },
    {
      "dt": 1647363600,
      "main": {
        "temp": 283.43,
        "feels_like": 282.08,
        "temp_min": 283.43,
        "temp_max": 283.88,
        "pressure": 1011,
        "sea_level": 1011,
        "grnd_level": 985,
        "humidity": 60,
        "temp_kf": -0.45
      },
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01n"
        }
      ],
      "clouds": {
        "all": 3
      },
      "wind": {
        "speed": 1.57,
        "deg": 58,
        "gust": 2.1
      },
      "visibility": 10000,
      "pop": 0,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-15 17:00:00"
    },
      .....
         {
      "dt": 1647702000,
      "main": {
        "temp": 279.33,
        "feels_like": 277.5,
        "temp_min": 279.33,
        "temp_max": 279.33,
        "pressure": 995,
        "sea_level": 995,
        "grnd_level": 967,
        "humidity": 73,
        "temp_kf": 0
      },
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "clear sky",
          "icon": "01n"
        }
      ],
      "clouds": {
        "all": 2
      },
      "wind": {
        "speed": 2.44,
        "deg": 225,
        "gust": 3.33
      },
      "visibility": 10000,
      "pop": 0.04,
      "sys": {
        "pod": "n"
      },
      "dt_txt": "2022-03-19 15:00:00"
    }
  ],
  "city": {
    "id": 1851632,
    "name": "Shuzenji",
    "coord": {
      "lat": 35,
      "lon": 139
    },
    "country": "JP",
    "population": 0,
    "timezone": 32400,
    "sunrise": 1647377649,
    "sunset": 1647420692
  }
}
                     
                  

Weather parameters in 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

API response example
                     
{
  "cod": "200",
  "message": 0.0179,
  "cnt": 96,
  "list": [
   {
     "dt": 1596632400,
     "main": {
       "temp": 289.16,
       "feels_like": 288.41,
       "temp_min": 289.16,
       "temp_max": 289.16,
       "pressure": 1013,
       "sea_level": 1013,
       "grnd_level": 1010,
       "humidity": 78,
       "temp_kf": 0
     },
     "weather": [
       {
         "id": 804,
         "main": "Clouds",
         "description": "overcast clouds",
         "icon": "04n"
       }
     ],
     "clouds": {
       "all": 100
     },
     "wind": {
       "speed": 2.03,
       "deg": 252,
       "gust":5.46
     },
     "visibility": 10000,
     "pop": 0.04,
     "sys": {
       "pod": "n"
     },
     "dt_txt": "2020-08-05 13:00:00"
   },
   .....
       ],
  "city": {
   "id": 2643743,
   "name": "London",
   "coord": {
     "lat": 51.5085,
     "lon": -0.1258
   },
   "country": "GB",
   "timezone": 0,
   "sunrise": 1568958164,
   "sunset": 1569002733
  }
}
                     
                  

Fields in API response

  • cod Internal parameter
  • message Internal parameter
  • cnt Number of timestamps returned by this API call
  • 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. 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 these parameter optionally. 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, Extreme etc.)
      • list.weather.description Weather condition within the group. 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. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour.
    • list.rain
      • list.rain.1h Rain volume for last hour, mm
    • list.snow
      • list.snow.1h Snow volume for last 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.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 (available if the API call has been made by City ID)
      • city.name City name
      • city.coord
        • city.coord.lat City geo location, latitude
        • city.coord.lon City geo location, longitude
    • country Country code (GB, JP etc.)
    • timezone Shift in seconds from UTC
    • sunrise Sunrise time, Unix, UTC
    • sunset Sunset time, Unix, UTC

XML

Example of API response
                     
<weatherdata>
   <location>
      <name>London</name>
      <type />
      <country>GB</country>
      <timezone>3600</timezone>
      <location altitude="0" latitude="51.5085" longitude="-0.1258" geobase="geonames" geobaseid="2643743" />
   </location>
   <credit />
   <meta>
      <lastupdate />
      <calctime>0</calctime>
      <nextupdate />
   </meta>
   <sun rise="2019-09-20T05:42:44" set="2019-09-20T18:05:33" />
   <forecast>
      <time from="2020-08-07T08:00:00" to="2020-08-07T09:00:00">
         <symbol number="803" name="broken clouds" var="04n" />
         <precipitation probability="0" />
         <windDirection deg="14" code="NNE" name="North-northeast" />
         <windSpeed mps="2.88" unit="m/s" name="Light breeze" />
         <windGust gust="7.6" unit="m/s"/>
         <temperature unit="kelvin" value="288.4" min="288.4" max="288.49" />
         <feels_like value="287.35" unit="kelvin" />
         <pressure unit="hPa" value="1019" />
         <humidity value="87" unit="%" />
         <clouds value="broken clouds" all="76" unit="%" />
         <visibility value="10000" />
      </time>
      ...
   </forecast>
</weatherdata>
                     
                  

Fields in API response

  • location
    • location.name City ID
    • location.type Internal parameter
    • location.country Country code (GB, JP etc.)
    • location.timezone Shift in seconds from UTC
    • location.location
      • location.location.altitude City geo location, altitude above the sea level
      • location.location.latitude City geo location, latitude
      • location.location.longitude City geo location, longitude
      • location.location.geobase Internal parameter
      • location.location.geobaseid Internal parameter
  • credit Internal parameter
  • meta
    • meta.lastupdate Internal parameter
    • meta.calctime Speed of data calculation
    • meta.nextupdate Internal 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.value Precipitation volume for the last hour, mm
      • forecast.precipitation.unit Period of measurements. Possilbe value is 1 hour.
      • forecast.precipitation.type Type of precipitation. Possible value is rain, snow.
      • 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.windDirection
      • forecast.windDirection.deg Wind direction, degrees (meteorological)
      • forecast.windDirection.code Code of the wind direction. Possilbe 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 Unit of measurements
      • forecast.windSpeed.name Type of the wind
    • forecast.windGust
      • forecast.windGust.gust Wind gust, meters per second
      • forecast.windGust.unit Unit of measurements
    • forecast.temperature
      • forecast.temperature.unit Unit of measurements. Possilbe valure is Celsius, Kelvin, Fahrenheit.
      • 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.
      • 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.
    • forecast.feels_like
      • forecast.feels_like.unit Unit of measurements. Possilbe valure 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.clouds.value Name of the cloudiness
      • forecast.clouds.all Cloudiness
      • forecast.clouds.unit %
    • forecast.visibility
      • forecast.visibility.value Average visibility, metres. The maximum value of the visibility is 10km

List of weather condition codes

List of weather condition codes with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere including extreme conditions like tornado, hurricane etc.)

Min/max temperature in our weather API

Please, do not confuse min/max parameters in our weather APIs.

  • In Hourly forecast API, Current weather API and 5 day / 3 hour forecast 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":306, //min current temperature in the city
   "temp_max":306 //max current temperature in the city
   },
                     
                  

For comparison look at example of daily forecast weather API response:

Example of 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
                     
                  

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

We highly recommend you using our Geocoding API. This API uses a much more accurate geographical database and supports both direct and reverse geocoding.

Please note that buit-in API requests by city name, zip-codes and city id will be deprecated soon.

Built-in API request by city name

You can search weather forecast for 4 days (96 hours) with data every hour by city name. All weather data can be obtained in JSON and XML formats.

API call

https://pro.openweathermap.org/data/2.5/forecast/hourly?q={city name}&appid={API key}
https://pro.openweathermap.org/data/2.5/forecast/hourly?q={city name},{state code}&appid={API key}
https://pro.openweathermap.org/data/2.5/forecast/hourly?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 Data format. Possible values are json and xml. If the mode parameter is empty the format is JSON by default. Learn more
cnt optional A number of timestamps in response. Learn more
lang optional Language code. Learn more

API call examples

https://pro.openweathermap.org/data/2.5/forecast/hourly?q=London,us&mode=xml&appid={API key}
                     
<weatherdata>
<location>
<name>London</name>
<type/>
<country>US</country>
<timezone>-14400</timezone>
<location altitude="0" latitude="39.8865" longitude="-83.4483" geobase="geonames" geobaseid="4517009"/>
</location>
<credit/>
<meta>
<lastupdate/>
<calctime>0</calctime>
<nextupdate/>
</meta>
<sun rise="2022-03-15T11:45:19" set="2022-03-15T23:40:10"/>
<forecast>
<time from="2022-03-15T15:00:00" to="2022-03-15T16:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation probability="0"/>
<windDirection deg="236" code="SW" name="Southwest"/>
<windSpeed mps="3.58" unit="m/s" name="Gentle Breeze"/>
<windGust gust="6.02" unit="m/s"/>
<temperature unit="kelvin" value="283.48" min="283.48" max="284.46"/>
<feels_like value="282.11" unit="kelvin"/>
<pressure unit="hPa" value="1024"/>
<humidity value="59" unit="%"/>
<clouds value="overcast clouds" all="100" unit="%"/>
<visibility value="10000"/>
</time>
....
<time from="2022-03-19T14:00:00" to="2022-03-19T15:00:00">
<symbol number="804" name="overcast clouds" var="04d"/>
<precipitation probability="0.33"/>
<windDirection deg="236" code="SW" name="Southwest"/>
<windSpeed mps="9.88" unit="m/s" name="Fresh Breeze"/>
<windGust gust="15.37" unit="m/s"/>
<temperature unit="kelvin" value="276.47" min="276.47" max="276.47"/>
<feels_like value="270.55" unit="kelvin"/>
<pressure unit="hPa" value="1009"/>
<humidity value="90" unit="%"/>
<clouds value="overcast clouds" all="100" unit="%"/>
<visibility value="6728"/>
</time>
</forecast>
</weatherdata>
                     
                  
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.

https://pro.openweathermap.org/data/2.5/forecast/hourly?q=München,DE&appid={API key}
                 
{
   "cod":"200",
   "message":0.0151,
   "cnt":96,
   "list":[
      {
         "dt":1553709600,
         "main":{
            "temp":278.76,
            "temp_min":278.76,
            "temp_max":279.558,
            "pressure":1031.934,
            "sea_level":1031.934,
            "grnd_level":971.745,
            "humidity":100,
            "temp_kf":-0.8
         },
         "weather":[
            {
               "id":803,
               "main":"Clouds",
               "description":"broken clouds",
               "icon":"04n"
            }
         ],
         "clouds":{
            "all":77
         },
         "wind":{
            "speed":1.6,
            "deg":40.932,
            "gust":7.9
         },
         "sys":{
            "pod":"n"
         },
         "dt_txt":"2019-03-27 18:00:00"
      },
      {
         "dt":1553713200,
         "main":{
            "temp":278.4,
            "temp_min":278.4,
            "temp_max":279,
            "pressure":1033.061,
            "sea_level":1033.061,
            "grnd_level":972.411,
            "humidity":100,
            "temp_kf":-0.6
         },
         "weather":[
            {
               "id":801,
               "main":"Clouds",
               "description":"few clouds",
               "icon":"02n"
            }
         ],
         "clouds":{
            "all":24
         },
         "wind":{
            "speed":1.49,
            "deg":46.416,
            "gust":5.46
         },
         "sys":{
            "pod":"n"
         },
         "dt_txt":"2019-03-27 19:00:00"
      },
      .....
      {
         "dt":1554051600,
         "main":{
            "temp":281.5,
            "temp_min":281.5,
            "temp_max":281.5,
            "pressure":1021.88,
            "sea_level":1021.88,
            "grnd_level":963.288,
            "humidity":100,
            "temp_kf":0
         },
         "weather":[
            {
               "id":804,
               "main":"Clouds",
               "description":"overcast clouds",
               "icon":"04d"
            }
         ],
         "clouds":{
            "all":100
         },
         "wind":{
            "speed":5,
            "deg":7.624,
            "gust":8.46
         },
         "rain":{

         },
         "sys":{
            "pod":"d"
         },
         "dt_txt":"2019-03-31 17:00:00"
      }
   ],
   "city":{
      "id":2867714,
      "name":"Munich",
      "coord":{
         "lat":48.1371,
         "lon":11.5754
      },
      "country":"DE",
      "population":1260391
   }
}
                 
               

Built-in API request by city ID

You can search weather forecast for 4 days with data every hour by city ID.

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

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

API call

https://pro.openweathermap.org/data/2.5/forecast/hourly?id={city ID}&appid={API key}
Parameters
id required city ID
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
mode optional Data format. Possible values are json and xml. If the mode parameter is empty the format is JSON by default. Learn more
cnt optional A number of timestamps in response. Learn more
lang optional Language code. Learn more

API call example

https://pro.openweathermap.org/data/2.5/forecast/hourly?id=524901&appid={API key}
                     
{
   "cod":"200",
   "message":0.0204,
   "cnt":96,
   "list":[
      {
         "dt":1553709600,
         "main":{
            "temp":272.09,
            "temp_min":271.358,
            "temp_max":272.09,
            "pressure":1018.01,
            "sea_level":1018.01,
            "grnd_level":997.153,
            "humidity":100,
            "temp_kf":0.73
         },
         "weather":[
            {
               "id":803,
               "main":"Clouds",
               "description":"broken clouds",
               "icon":"04n"
            }
         ],
         "clouds":{
            "all":60
         },
         "wind":{
            "speed":3.25,
            "deg":287.822,
            "gust":5.46
         },
         "sys":{
            "pod":"n"
         },
         "dt_txt":"2019-03-27 18:00:00"
      },
      {
         "dt":1553713200,
         "main":{
            "temp":271.59,
            "temp_min":271.1,
            "temp_max":271.59,
            "pressure":1018.335,
            "sea_level":1018.335,
            "grnd_level":997.403,
            "humidity":100,
            "temp_kf":0.49
         },
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"clear sky",
               "icon":"02n"
            }
         ],
         "clouds":{
            "all":2
         },
         "wind":{
            "speed":3.4,
            "deg":294.075,
            "gust":5.46
         },
         "sys":{
            "pod":"n"
         },
         "dt_txt":"2019-03-27 19:00:00"
      },
      {
         "dt":1553716800,
         "main":{
            "temp":271.15,
            "temp_min":270.907,
            "temp_max":271.15,
            "pressure":1018.794,
            "sea_level":1018.794,
            "grnd_level":997.864,
            "humidity":100,
            "temp_kf":0.24
         },
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"clear sky",
               "icon":"01n"
            }
         ],
         "clouds":{
            "all":1
         },
         "wind":{
            "speed":3.47,
            "deg":300.189,
            "gust":5.46
         },
         "sys":{
            "pod":"n"
         },
         "dt_txt":"2019-03-27 20:00:00"
      },
      ....
      {
         "dt":1554051600,
         "main":{
            "temp":281.5,
            "temp_min":281.5,
            "temp_max":281.5,
            "pressure":1011.332,
            "sea_level":1011.332,
            "grnd_level":991.048,
            "humidity":100,
            "temp_kf":0
         },
         "weather":[
            {
               "id":803,
               "main":"Clouds",
               "description":"broken clouds",
               "icon":"04n"
            }
         ],
         "clouds":{
            "all":63
         },
         "wind":{
            "speed":4.61,
            "deg":226.055,
            "gust":8.46
         },
         "rain":{

         },
         "sys":{
            "pod":"n"
         },
         "dt_txt":"2019-03-31 17:00:00"
      }
   ],
   "city":{
      "id":524901,
      "name":"Moscow",
      "coord":{
         "lat":55.7522,
         "lon":37.6156
      },
      "country":"RU"
   }
}
                     
                  

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

https://pro.openweathermap.org/data/2.5/forecast/hourly?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 Data format. Possible values are json and xml. If the mode parameter is empty the format is JSON by default. Learn more
cnt optional A number of timestamps in response. Learn more
lang optional Language code

API call example

https://pro.openweathermap.org/data/2.5/forecast/hourly?zip=94040,us&appid={API key}
                     
{
   "cod":"200",
   "message":0.0208,
   "cnt":96,
   "list":[
      {
         "dt":1553709600,
         "main":{
            "temp":286.44,
            "temp_min":286.258,
            "temp_max":286.44,
            "pressure":1015.82,
            "sea_level":1015.82,
            "grnd_level":1002.193,
            "humidity":100,
            "temp_kf":0.18
         },
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "clouds":{
            "all":86
         },
         "wind":{
            "speed":5.51,
            "deg":202.816,
            "gust":10.46
         },
         "rain":{
            "1h":0.812
         },
         "sys":{
            "pod":"d"
         },
         "dt_txt":"2019-03-27 18:00:00"
      },
      {
         "dt":1553713200,
         "main":{
            "temp":286.43,
            "temp_min":286.3,
            "temp_max":286.43,
            "pressure":1016.183,
            "sea_level":1016.183,
            "grnd_level":1002.667,
            "humidity":100,
            "temp_kf":0.13
         },
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "clouds":{
            "all":92
         },
         "wind":{
            "speed":4.84,
            "deg":206.141,
            "gust":5.46
         },
         "rain":{
            "1h":0.625
         },
         "sys":{
            "pod":"d"
         },
         "dt_txt":"2019-03-27 19:00:00"
      },
      {
         "dt":1553716800,
         "main":{
            "temp":286.6,
            "temp_min":286.507,
            "temp_max":286.6,
            "pressure":1016.462,
            "sea_level":1016.462,
            "grnd_level":1003.128,
            "humidity":100,
            "temp_kf":0.09
         },
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "clouds":{
            "all":94
         },
         "wind":{
            "speed":4.58,
            "deg":216.201,
            "gust":5.46
         },
         "rain":{
            "1h":0.437
         },
         "sys":{
            "pod":"d"
         },
         "dt_txt":"2019-03-27 20:00:00"
      },
      ....
      {
         "dt":1554051600,
         "main":{
            "temp":288.9,
            "temp_min":288.9,
            "temp_max":288.9,
            "pressure":1023.992,
            "sea_level":1023.992,
            "grnd_level":1011.112,
            "humidity":100,
            "temp_kf":0
         },
         "weather":[
            {
               "id":802,
               "main":"Clouds",
               "description":"scattered clouds",
               "icon":"03d"
            }
         ],
         "clouds":{
            "all":50
         },
         "wind":{
            "speed":1.69,
            "deg":347.482,
            "gust":5.46
         },
         "sys":{
            "pod":"d"
         },
         "dt_txt":"2019-03-31 17:00:00"
      }
   ],
   "city":{
      "id":420006353,
      "name":"Mountain View",
      "coord":{
         "lat":37.3894,
         "lon":-122.0833
      },
      "country":"US"
   }
}
                     
                  

Format

JSON format is used by default. To get data in XML format just set up mode = xml.

Parameters
mode optional Data format. Possible values are json and xml. If the mode parameter is empty the format is JSON by default.

API call examples

JSON

api.openweathermap.org/data/2.5/weather?q=London&appid={API key}
                     
{
   "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,
      "gust":8.1,
   },
   "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
}
                     
                  

XML

api.openweathermap.org/data/2.5/weather?q=London&mode=xml
                  
<current>
<city id="2643743" name="London">
   <coord lon="-0.13" lat="51.51" />
   <country>GB</country>
   <sun rise="2017-01-30T07:40:36" set="2017-01-30T16:47:56" />
</city>
<temperature value="280.15" min="278.15" max="281.15" unit="kelvin" />
<humidity value="81" unit="%" />
<pressure value="1012" unit="hPa" />
<wind>
   <speed value="4.6" name="Gentle Breeze" />
   <gusts />
   <direction value="90" code="E" name="East" />
</wind>
<clouds value="90" name="overcast clouds" />
<visibility value="10000" />
<precipitation mode="no" />
<weather number="701" value="mist" icon="50d" />
<lastupdate value="2017-01-30T15:50:00" />
</current>
                  
               

Limitation of result

To limit number of listed cities please setup cnt parameter that specifies the number of timestamps returned.

Parameters
cnt optional A number of timestamps in response

API call example

cnt=3

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15{API key}&cnt=3
                     

{
  "cod": "200",
  "message": 0,
  "cnt": 3,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 281.98,
        "feels_like": 278.65,
        "temp_min": 280.57,
        "temp_max": 281.98,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 81,
        "temp_kf": 1.41
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647360000,
      "main": {
        "temp": 281.8,
        "feels_like": 278.45,
        "temp_min": 281.06,
        "temp_max": 281.8,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.74
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.68,
        "deg": 186,
        "gust": 11.8
      },
      "visibility": 10000,
      "pop": 0.28,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 16:00:00"
    },
    {
      "dt": 1647363600,
      "main": {
        "temp": 281.58,
        "feels_like": 278.29,
        "temp_min": 280.99,
        "temp_max": 281.58,
        "pressure": 1014,
        "sea_level": 1014,
        "grnd_level": 1014,
        "humidity": 79,
        "temp_kf": 0.59
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.33,
        "deg": 181,
        "gust": 11.26
      },
      "visibility": 10000,
      "pop": 0.24,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 17: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. List of all API parameters with available units.

Parameters
units optional Units of measurement. metric, imperial. When you do not use units parameter, format is Standard 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

API call examples

Standard

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}
                        
{
  "cod": "200",
  "message": 0,
  "cnt": 96,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 281.99,
        "feels_like": 278.67,
        "temp_min": 280.57,
        "temp_max": 281.99,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 77,
        "temp_kf": 1.42
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647360000,
      "main": {
        "temp": 281.83,
        "feels_like": 278.49,
        "temp_min": 281.06,
        "temp_max": 281.83,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 76,
        "temp_kf": 0.77
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.68,
        "deg": 186,
        "gust": 11.8
      },
      "visibility": 10000,
      "pop": 0.28,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 16:00:00"
    },
    .....
      ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                        
                     
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&units=metric
                        
{
  "cod": "200",
  "message": 0,
  "cnt": 96,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 8.84,
        "feels_like": 5.52,
        "temp_min": 7.42,
        "temp_max": 8.84,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 78,
        "temp_kf": 1.42
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647360000,
      "main": {
        "temp": 8.68,
        "feels_like": 5.34,
        "temp_min": 7.91,
        "temp_max": 8.68,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 77,
        "temp_kf": 0.77
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.68,
        "deg": 186,
        "gust": 11.8
      },
      "visibility": 10000,
      "pop": 0.28,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 16:00:00"
    },
    ....
      ],
  "city": {
    "id": 2641549,
    "name": "Newtonhill",
    "coord": {
      "lat": 57,
      "lon": -2.15
    },
    "country": "GB",
    "population": 3284,
    "timezone": 0,
    "sunrise": 1647325488,
    "sunset": 1647367827
  }
}
                        
                     
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&units=imperial
                        
{
  "cod": "200",
  "message": 0,
  "cnt": 96,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 47.91,
        "feels_like": 41.94,
        "temp_min": 45.36,
        "temp_max": 47.91,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 78,
        "temp_kf": 1.42
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 15.17,
        "deg": 184,
        "gust": 27.16
      },
      "visibility": 10000,
      "pop": 0.34,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647360000,
      "main": {
        "temp": 47.62,
        "feels_like": 41.61,
        "temp_min": 46.24,
        "temp_max": 47.62,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 77,
        "temp_kf": 0.77
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 14.94,
        "deg": 186,
        "gust": 26.4
      },
      "visibility": 10000,
      "pop": 0.28,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 16: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 lang parameter to get the output in your language.
Translation is applied for the city name and description fields.

API call

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&lang={lang}
Parameters
lang optional Language code

API call example

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&lang=zh_cn&appid={API key}
                        

{
  "cod": "200",
  "message": 0,
  "cnt": 96,
  "list": [
    {
      "dt": 1647356400,
      "main": {
        "temp": 281.99,
        "feels_like": 278.67,
        "temp_min": 280.57,
        "temp_max": 281.99,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 78,
        "temp_kf": 1.42
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "阴,多云",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.78,
        "deg": 184,
        "gust": 12.14
      },
      "visibility": 10000,
      "pop": 0.34,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 15:00:00"
    },
    {
      "dt": 1647360000,
      "main": {
        "temp": 281.83,
        "feels_like": 278.49,
        "temp_min": 281.06,
        "temp_max": 281.83,
        "pressure": 1015,
        "sea_level": 1015,
        "grnd_level": 1014,
        "humidity": 77,
        "temp_kf": 0.77
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "阴,多云",
          "icon": "04d"
        }
      ],
      "clouds": {
        "all": 100
      },
      "wind": {
        "speed": 6.68,
        "deg": 186,
        "gust": 11.8
      },
      "visibility": 10000,
      "pop": 0.28,
      "sys": {
        "pod": "d"
      },
      "dt_txt": "2022-03-15 16: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:

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

Call back function for JavaScript code

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

API call example

https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&callback=test&appid={API key}
                           
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,
      "gust":6.1
   },
   "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
})