5 day weather forecast
Loading...
5 day weather forecast
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
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.openweathermap.org/data/2.5/forecast?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 | Units of measurement. |
| optional | Response format. JSON format is used by default. To get data in XML format use |
| optional | A number of timestamps, which will be returned in the API response. Learn more |
| optional | Units of measurement. |
| optional | You can use the |
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.
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.JSON format API response fields
cod Internal parametermessage Internal parametercntA number of timestamps returned in the API responselistlist.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 this 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. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hourlist.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.rainlist.rain.3h Rain volume for last 3 hours, mm. Please note that only mm as units of measurement are available for this parameterlist.snowlist.snow.3h Snow volume for last 3 hours. Please note that only mm as units of measurement are available for this parameterlist.syslist.sys.pod Part of the day (n - night, d - day)list.dt_txt Time of data forecasted, ISO, UTCcitycity.id City ID. Please note that built-in geocoder functionality has been deprecated. Learn more herecity.name City name. Please note that built-in geocoder functionality has been deprecated. Learn more herecity.coordcity.coord.lat Geo location, latitudecity.coord.lon Geo location, longitudecity.country Country code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more herecity.population City populationcity.timezone Shift in seconds from UTCcity.sunrise Sunrise time, Unix, UTCcity.sunset Sunset time, Unix, UTCXML
To 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 parametermetameta.lastupdate Prototype parametermeta.calctime Speed of data calculationmeta.nextupdate Prototype 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.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 hoursforecast.precipitation.value Precipitation volume for the last 3 hours, mm. Please note that only mm as units of measurement are available for this parameterforecast.precipitation.type Type of precipitation. Possible value is rain, snowforecast.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 Wind speed units, m/sforecast.windSpeed.nameType of windforecast.windGustforecast.windGust.gust Wind gust, meters per secondforecast.windGust.unit Wind gust units, m/sforecast.temperatureforecast.temperature.unit Unit of measurements. Possible value is Celsius, Kelvin, Fahrenhei.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 hereforecast.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.pressure.value Name of the cloudinessforecast.pressure.all Cloudinessforecast.pressure.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.)
"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:
"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 temperatureBulk 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.
Other 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 5 days with data every 3 hours by city name. All weather data can be obtained in JSON and XML formats.
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 | ||
|---|---|---|
| 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 | Response format. JSON format is used by default. To get data in XML format use |
| optional | A number of timestamps, which will be returned in the API response. Learn more |
| optional | Units of measurement. |
| optional | You can use the |
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.
To view the API response, expand the example by clicking the triangle.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.openweathermap.org/data/2.5/forecast?id={city ID}&appid={API key}Parameters | ||
|---|---|---|
| required | City ID. The list of city IDs 'city.list.json.gz' can be downloaded here. |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | Response format. JSON format is used by default. To get data in XML format use |
| optional | A number of timestamps, which will be returned in the API response. Learn more |
| optional | Units of measurement. |
| optional | You can use the |
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.
api.openweathermap.org/data/2.5/forecast?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 | Response format. JSON format is used by default. To get data in XML format use |
| optional | A number of timestamps, which will be returned in the API response. Learn more |
| optional | Units of measurement. |
| optional | You can use the |
To view the API response, expand the example by clicking the triangle.Response format. JSON format is used by default. To get data in XML format use mode=xml.
Parameters | ||
|---|---|---|
| optional | Response format. JSON format is used by default. To get data in XML format use |
JSON
To view the API response, expand the example by clicking the triangle.XML
To view the API response, expand the example by clicking the triangle.To limit number of timestamps in the API response please setup cnt.
Parameters | ||
|---|---|---|
| optional | A number of timestamps, which will be returned in the API response. |
To view the API response, expand the example by clicking the triangle.standard, metric, and imperial units are available.
Parameters | ||
|---|---|---|
| optional | Units of measurement. |
List of all API parameters with units openweathermap.org/weather-data
Standard
To view the API response, expand the example by clicking the triangle.Metric
To view the API response, expand the example by clicking the triangle.Imperial
To view the API response, expand the example by clicking the triangle.You can use the lang parameter to get the output in your language.
Translation is applied to the city name and description fields.
http://api.openweathermap.org/data/2.5/forecast?id=524901&lang={lang}Parameters | ||
|---|---|---|
| optional | You can use the |
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.
To view the API response, expand the example by clicking the triangle.