Hourly forecast
Loading...
Hourly forecast
Hourly forecast for 4 days (96 timestamps). Weather data is available in JSON and XML formats.
Call hourly forecast data
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.
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat={lat}&lon={lon}&appid={API key}Parameters | ||
|---|---|---|
| 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 |
| 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 |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | Data format. Possible values are |
| optional | A number of timestamps in response. Learn more |
| optional | Language code. 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.
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=44.34&lon=10.99&appid={API key}To view the API response, expand the example by clicking the triangle.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.
To view the API response, expand the example by clicking the triangle.cod Internal parametermessage Internal parametercnt Number of timestamps returned by this API calllistlist.dt Time of data forecasted, Unix, UTClist.mainlist.main.temp Temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.main.feels_like This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.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: Fahrenheitlist.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. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.main.pressure Atmospheric pressure on the sea level by default, hPalist.main.sea_level Atmospheric pressure on the sea level, hPalist.main.grnd_level Atmospheric pressure on the ground level, hPalist.main.humidity Humidity, %list.main.temp_kf Internal parameterlist.weatherlist.weather.id Weather condition idlist.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 morelist.weather.icon Weather icon idlist.cloudslist.clouds.all Cloudiness, %list.windlist.wind.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hourlist.wind.deg Wind direction, degrees (meteorological)list.wind.gust Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hourlist.rainlist.rain.1h Rain volume for last hour, mm. Please note that only mm as units of measurement are available for this parameterlist.snowlist.snow.1hSnow volume for last hour, mm. Please note that only mm as units of measurement are available for this parameterlist.visibility Average visibility, metres. The maximum value of the visibility is 10kmlist.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.syslist.sys.pod Part of the day (n - night, d - day)list.dt_txt Time of data forecasted, ISO, UTCcitycountryCountry code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more heretimezone Shift in seconds from UTCsunrise Sunrise time, Unix, UTCsunset Sunset time, Unix, UTCTo view the API response, expand the example by clicking the triangle.locationlocation.name City name. Please note that built-in geocoder functionality has been deprecated. Learn more herelocation.type Internal parameterlocation.country Country code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more herelocation.timezone Shift in seconds from UTClocation.locationlocation.location.altitude Geo location, altitude above the sea levellocation.location.latitude Geo location, latitudelocation.location.longitude Geo location, longitudelocation.location.geobase Internal parameterlocation.location.geobaseid Internal parametercredit Internal parametermetameta.lastupdate Internal parametermeta.calctime Speed of data calculationmeta.nextupdate Internal parametersunsun.rise Sunrise timesun.set Sunset timeforecastforecast.timeforecast.time.from Beginning of the period of data forecastedforecast.time.to End of the period of data forecastedforecast.symbolforecast.symbol.number Weather condition idforecast.symbol.name Weather conditionforecast.symbol.var Weather icon idforecast.precipitationforecast.precipitation.value Precipitation volume for the last hour, mm. Please note that only mm as units of measurement are available for this parameterforecast.precipitation.unit Period of measurements. Possible value is 1 hourforecast.precipitation.type Type of precipitation. Possible value is rain, snowforecast.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.windDirectionforecast.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 directionforecast.windSpeedforecast.windSpeed.mps Wind speed, meters per secondforecast.windSpeed.unit Unit of measurementsforecast.windSpeed.name Type of the windforecast.windGustforecast.windGust.gust Wind gust, meters per secondforecast.windGust.unit Unit of measurementsforecast.temperatureforecast.temperature.unit Unit of measurements. Possible value is Celsius, Kelvin, Fahrenheit.forecast.temperature.value Temperatureforecast.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 hereforecast.feels_likeforecast.feels_like.unit Unit of measurements. Possible value is Celsius, Kelvin, Fahrenheit. Unit Default: Kelvinforecast.feels_like.value Temperature. This temperature parameter accounts for the human perception of weatherforecast.pressureforecast.pressure.unit hPaforecast.pressure.value Pressure valueforecast.humidityforecast.humidity.unit %forecast.humidity.value Humidity valueforecast.cloudsforecast.clouds.value Name of the cloudinessforecast.clouds.all Cloudinessforecast.clouds.unit %forecast.visibilityforecast.visibility.value Average visibility, metres. The maximum value of the visibility is 10kmWe 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 with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere etc.)
Please do not confuse min/max parameters in our weather APIs.
"main":{
"temp":306.15, //current temperature
"pressure":1013,
"humidity":44,
"temp_min":306.15, //min current temperature in the city
"temp_max":306.15 //max current temperature in the city
},For comparison look at 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 temperatureOther features
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.
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.
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.
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},{country code}&appid={API key}https://pro.openweathermap.org/data/2.5/forecast/hourly?q={city name},{state code},{country code}&appid={API key}Parameters | ||
|---|---|---|
| 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. |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | Data format. Possible values are |
| optional | A number of timestamps in response. Learn more |
| optional | Language code. Learn more |
https://pro.openweathermap.org/data/2.5/forecast/hourly?q=London,us&mode=xml&appid={API key}To view the API response, expand the example by clicking the triangle.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}To view the API response, expand the example by clicking the triangle.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.
https://pro.openweathermap.org/data/2.5/forecast/hourly?id={city ID}&appid={API key}Parameters | ||
|---|---|---|
| required | city ID |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | Data format. Possible values are |
| optional | A number of timestamps in response. Learn more |
| optional | Language code. Learn more |
https://pro.openweathermap.org/data/2.5/forecast/hourly?id=524901&appid={API key}To view the API response, expand the example by clicking the triangle.Please note if country is not specified then the search works for USA as a default.
https://pro.openweathermap.org/data/2.5/forecast/hourly?zip={zip code},{country code}&appid={API key}Parameters | ||
|---|---|---|
| required | Zip code |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | Data format. Possible values are |
| optional | A number of timestamps in response. Learn more |
| optional | Language code |
https://pro.openweathermap.org/data/2.5/forecast/hourly?zip=94040,us&appid={API key}To view the API response, expand the example by clicking the triangle.JSON format is used by default. To get data in XML format just set up mode = xml.
Parameters | ||
|---|---|---|
| optional | Data format. Possible values are |
JSON
api.openweathermap.org/data/2.5/weather?q=London&appid={API key}To view the API response, expand the example by clicking the triangle.XML
api.openweathermap.org/data/2.5/weather?q=London&mode=xmlTo view the API response, expand the example by clicking the triangle.To limit number of listed cities please setup cnt parameter that specifies the number of timestamps returned.
Parameters | ||
|---|---|---|
| optional | A number of timestamps in response |
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
}
}standard, metric, and imperial units are available. List of all API parameters with available units.
Parameters | ||
|---|---|---|
| optional | Units of measurement. |
Temperature is available in Fahrenheit, Celsius and Kelvin units.
List of all API parameters with units openweathermap.org/weather-data
Standard
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}To view the API response, expand the example by clicking the triangle.https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&units=metricTo view the API response, expand the example by clicking the triangle.https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&units=imperialTo view the API response, expand the example by clicking the triangle.You can use lang parameter to get the output in your language. Translation is applied for the city name and description fields.
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&appid={API key}&lang={lang}Parameters | ||
|---|---|---|
| optional | Language code |
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&lang=zh_cn&appid={API key}To view the API response, expand the example by clicking the triangle.We support the following languages that you can use with the corresponded lang values:
sq Albanianaf Afrikaansar Arabicaz Azerbaijanieu Basquebe Belarusianbg Bulgarianca Catalanzh_cn Chinese Simplifiedzh_tw Chinese Traditionalhr Croatiancz Czechda Danishnl Dutchen Englishfi Finnishfr Frenchgl Galiciande Germanel Greekhe Hebrewhi Hindihu Hungarianis Icelandicid Indonesianit Italianja Japanesekr Koreanku Kurmanji (Kurdish)la Latvianlt Lithuanianmk Macedonianno Norwegianfa Persian (Farsi)pl Polishpt Portuguesept_br Português Brasilro Romanianru Russiansr Serbiansk Slovaksl Sloveniansp, es Spanishsv, se Swedishth Thaitr Turkishua, uk Ukrainianvi Vietnamesezu ZuluTo use JavaScript code you can transfer callback functionName to JSONP callback.
https://pro.openweathermap.org/data/2.5/forecast/hourly?lat=57&lon=-2.15&callback=test&appid={API key}To view the API response, expand the example by clicking the triangle.