Daily Forecast 16 Days
Product concept
Daily Forecast 16 Days is available at any location on the globe. The forecast includes daily weather data and the response data is available in JSON or XML format.
Call 16 day / daily forecast data
You can seach 16 day weather forecast with daily average parameters by geographic coordinates. All weather data can be obtained in JSON and XML formats.
API call
api.openweathermap.org/data/2.5/forecast/daily?lat={lat}&lon={lon}&cnt={cnt}&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 | A number of days, which will be returned in the API response (from |
| optional | Data format. Possible values are: |
| optional | Units of measurement. |
| 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.
Call 7 days forecast by geographic coordinates
Example of API call
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.
JSON
To view the API response, expand the example by clicking the triangle.citycountryCountry code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more herepopulationInternal parametertimezoneShift in seconds from UTCcodInternal parametermessageInternal parametercntA number of days returned in the API responselistlist.dtTime of data forecastedlist.templist.temp.dayTemperature at 12:00 local time. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.minMin daily temperature. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.maxMax daily temperature. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.nightTemperature at 00:00 local time. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.eveTemperature at 18:00 local time. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.mornTtemperature at 06:00 local time. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
list.feels_likelist.feels_like.dayTemperature at 12:00 local time.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_like.nightTemperature at 00:00 local time.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_like.eveTemperature at 18:00 local time.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_like.mornTemperature at 06:00 local time. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
list.pressureAtmospheric pressure on the sea level, hPalist.humidityHumidity, %list.weather(more info Weather condition codes)list.weather.idWeather condition idlist.weather.mainGroup of weather parameters (Rain, Snow, Clouds etc.)list.weather.descriptionWeather condition within the group. Please find more here. You can get the output in your language. Learn morelist.weather.iconWeather icon id
list.speedMaximum wind speed for the day. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.list.degWind direction relevant to the maximum wind speed, degrees (meteorological)list.gustWind gust. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.list.cloudsCloudiness, %list.rainPrecipitation volume, mm. Please note that only mm as units of measurement are available for this parameterlist.snowSnow volume, mm. Please note that only mm as units of measurement are available for this parameterlist.popProbability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%
XML
<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 day="2022-08-30">
<sun rise="2022-08-30T04:36:27" set="2022-08-30T17:57:28"/>
<symbol number="500" name="light rain" var="10d"/>
<precipitation probability="0.7" value="2.51" type="rain"/>
<windDirection deg="209" code="SSW" name="South-southwest"/>
<windSpeed mps="2.7" unit="m/s" name="Light breeze"/>
<windGust gust="3.58" unit="m/s"/>
<temperature day="299.65" min="288.93" max="299.65" night="290.31" eve="297.15" morn="288.93" unit="kelvin"/>
<feels_like day="299.65" night="290.3" eve="297.09" morn="288.73" unit="kelvin"/>
<pressure unit="hPa" value="1017"/>
<humidity value="44" unit="%"/>
<clouds value="broken clouds" all="53" unit="%"/>
</time>
<time day="2022-08-31">
<sun rise="2022-08-31T04:37:36" set="2022-08-31T17:55:42"/>
<symbol number="500" name="light rain" var="10d"/>
<precipitation probability="0.82" value="5.32" type="rain"/>
<windDirection deg="215" code="SW" name="Southwest"/>
<windSpeed mps="2.29" unit="m/s" name="Light breeze"/>
<windGust gust="3.27" unit="m/s"/>
<temperature day="295.76" min="287.73" max="295.76" night="289.37" eve="292.76" morn="287.73" unit="kelvin"/>
<feels_like day="295.64" night="289.45" eve="292.97" morn="287.59" unit="kelvin"/>
<pressure unit="hPa" value="1014"/>
<humidity value="60" unit="%"/>
<clouds value="broken clouds" all="66" unit="%"/>
</time>
<time day="2022-09-01">
<sun rise="2022-09-01T04:38:46" set="2022-09-01T17:53:55"/>
<symbol number="500" name="light rain" var="10d"/>
<precipitation probability="0.84" value="4.49" type="rain"/>
<windDirection deg="60" code="ENE" name="East-northeast"/>
<windSpeed mps="2.67" unit="m/s" name="Light breeze"/>
<windGust gust="2.66" unit="m/s"/>
<temperature day="293.38" min="287.06" max="293.38" night="287.06" eve="289.01" morn="287.84" unit="kelvin"/>
<feels_like day="293.31" night="287.01" eve="289.05" morn="287.85" unit="kelvin"/>
<pressure unit="hPa" value="1014"/>
<humidity value="71" unit="%"/>
<clouds value="overcast clouds" all="97" unit="%"/>
</time>
...
</time>
</forecast>
</weatherdata>locationlocation.nameCity name. Please note that built-in geocoder functionality has been deprecated. Learn more herelocation.typePrototype parameterlocation.countryCountry code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more herelocation.timezoneShift in seconds from UTClocation.locationlocation.location.altitudeGeo location, altitude above the sea levellocation.location.latitudeGeo location, latitudelocation.location.longitudeGeo location, longitudelocation.location.geobaseInternal parameterlocation.location.geobaseidInternal parameter
metameta.lastupdateInternal parametermeta.calctimeSpeed of data calculationmeta.nextupdateInternal parameter
sunsun.riseSunrise timesun.setSunset time
forecastforecast.timeforecast.time.dayDate of weather data forecasted
forecast.symbolforecast.symbol.numberWeather condition idforecast.symbol.nameWeather conditionforecast.symbol.varWeather icon id
forecast.precipitationforecast.precipitation.valuePrecipitation volume for the last day, mm. Please note that only mm as units of measurement are available for this parameterforecast.precipitation.typeType of precipitation. Possible value is rain, snowforecast.precipitation.probabilityProbability 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.degWind direction relevant to the maximum wind speed, degrees (meteorological)forecast.windDirection.codeCode of the wind direction relevant to the maximum wind speed. Possible value is WSW, N, S etc.forecast.windDirection.nameFull name of the wind direction relevant to the maximum wind speed
forecast.windSpeedforecast.windSpeed.mpsMaximum wind speed for the day, meters per secondforecast.windSpeed.unitMaximum wind speed units, m/sforecast.windSpeed.nameType of wind relevant to the maximum wind speed
forecast.windGustforecast.windGust.gustWind gust, meters per secondforecast.windGust.unitWind gust units, m/s
forecast.temperatureforecast.temperature.dayTemperature at 12:00 local time for forecasted day. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.temperature.minMin daily temperature. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.temperature.maxMax daily temperature. Please find more info here. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.temperature.nightTemperature at 00:00 local time for forecasted day. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.temperature.eveTemperature at 18:00 local time for forecasted day. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.temperature.mornTemperature at 06:00 local time for forecasted day. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.temperature.unitUnit of measurements. Possible values are Celsius, Kelvin, Fahrenheit
forecast.feels_likeforecast.feels_like.dayTemperature at 12:00 local time for forecasted day. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenhei.forecast.feels_like.nightTemperature at 00:00 local time for forecasted day. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.feels_like.eveTemperature at 18:00 local time for forecasted day. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.feels_like.mornTemperature at 06:00 local time for forecasted day. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitforecast.feels_like.unitUnit of measurements. Possible values are Celsius, Kelvin, Fahrenheit. Unit Default: Kelvin
forecast.pressureforecast.pressure.unithPaforecast.pressure.valuePressure value
forecast.humidityforecast.humidity.unit%forecast.humidity.valueHumidity value
forecast.cloudsforecast.pressure.valueName of the cloudinessforecast.pressure.allCloudinessforecast.pressure.unit%
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 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
- In 16 Day forecast - min and max mean maximum and minimum temperature in the day.
- In Current weather API, Hourly forecast 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 to see deviation from current temp 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.
Min/max temperature in current weather API and forecast API
"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, take a look at the example of daily forecast weather API response:
Example of API response
To view the API response, expand the example by clicking the triangle.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.
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 16 day weather forecast with daily average parameters by city name. All weather data can be obtained in JSON and XML formats.
API calls
api.openweathermap.org/data/2.5/forecast/daily?q={city name}&cnt={cnt}&appid={API key}API call
api.openweathermap.org/data/2.5/forecast/daily?q={city name},{country code}&cnt={cnt}&appid={API key}API call
api.openweathermap.org/data/2.5/forecast/daily?q={city name},{state code},{country code}&cnt={cnt}&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 | A number of days, which will be returned in the API response (from |
| optional | Data format. Possible values are: |
| optional | Units of measurement. |
| optional | Language code. Learn more |
Examples of API calls
Call 7 days forecast by city name in metric units
Examples of API calls
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
Call 16 days forecast by geographic coordinates
Example of API response
To view the API response, expand the example by clicking the triangle.Built-in API request by city ID
You can seach 16 day weather forecast with daily average parameters by city ID. All weather data can be obtained in JSON and XML format.
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/daily?id={city ID}&cnt={cnt}&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 | A number of days, which will be returned in the API response (from |
| optional | Data format. Possible values are: |
| optional | Units of measurement. |
| optional | Language code. Learn more |
Example of API call
To view the API response, expand the example by clicking the triangle.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/daily?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 | A number of days, which will be returned in the API response (from |
| optional | Data format. Possible values are: |
| optional | Units of measurement. |
| optional | Language code. Learn more |
Example of API call
To view the API response, expand the example by clicking the triangle.Format
Data format. JSON format is used by default. To get data in XML format use mode=xml.
Parameters | ||
|---|---|---|
| optional | Data format. Possible values are: |
JSON
Examples of API calls
To view the API response, expand the example by clicking the triangle.XML
Example of API response
<weatherdata>
<location>
<name>London</name>
<type />
<country>GB</country>
<timezone />
<location altitude="0" latitude="51.5085" longitude="-0.1258" geobase="geonames" geobaseid="2643743" />
</location>
<credit />
<meta>
<lastupdate />
<calctime>0.0117</calctime>
<nextupdate />
</meta>
<sun rise="2017-01-30T07:40:34" set="2017-01-30T16:47:56" />
<forecast>
<time day="2017-01-30">
<symbol number="500" name="light rain" var="10d" />
<precipitation value="1.64" type="rain" />
<windDirection deg="85" code="E" name="East" />
<windSpeed mps="1.97" name="Light breeze" />
<windGust gust="3.31" unit="m/s"/>
<temperature day="7" min="4.34" max="7" night="4.91" eve="5.05" morn="7" />
<pressure unit="hPa" value="1016.99" />
<humidity value="100" unit="%" />
<clouds value="few clouds" all="12" unit="%" />
</time>
<time day="2017-01-31">
<symbol number="501" name="moderate rain" var="10d" />
<precipitation value="9.42" type="rain" />
<windDirection deg="140" code="SE" name="SouthEast" />
<windSpeed mps="3.37" name="" />
<windGust gust="6.31" unit="m/s"/>
<temperature day="9.66" min="6.16" max="11.51" night="10.63" eve="10.85" morn="6.16" />
<pressure unit="hPa" value="1018.15" />
<humidity value="100" unit="%" />
<clouds value="overcast clouds" all="92" unit="%" />
</time>
<time day="2017-02-01">
<symbol number="501" name="moderate rain" var="10d" />
<precipitation value="9.11" type="rain" />
<windDirection deg="197" code="SSW" name="South-southwest" />
<windSpeed mps="5.01" name="Gentle Breeze" />
<windGust gust="6.31" unit="m/s"/>
<temperature day="9.81" min="9.64" max="10.23" night="10.08" eve="9.81" morn="10.03" />
<pressure unit="hPa" value="1011.7" />
<humidity value="99" unit="%" />
<clouds value="scattered clouds" all="44" unit="%" />
</time>
<time day="2017-02-02">
<symbol number="501" name="moderate rain" var="10d" />
<precipitation value="3.98" type="rain" />
<windDirection deg="184" code="S" name="South" />
<windSpeed mps="8.42" name="Fresh Breeze" />
<windGust gust="10.31" unit="m/s"/>
<temperature day="11.44" min="8.86" max="11.53" night="8.86" eve="10.99" morn="10.05" />
<pressure unit="hPa" value="999.34" />
<humidity value="96" unit="%" />
<clouds value="overcast clouds" all="92" unit="%" />
</time>
<time day="2017-02-03">
<symbol number="500" name="light rain" var="10d" />
<precipitation value="1.65" type="rain" />
<windDirection deg="213" code="SSW" name="South-southwest" />
<windSpeed mps="8.51" name="Fresh Breeze" />
<windGust gust="11.31" unit="m/s"/>
<temperature day="10.66" min="8.63" max="10.66" night="8.63" eve="9.14" morn="10.18" />
<pressure unit="hPa" value="1010.98" />
<humidity value="0" unit="%" />
<clouds value="scattered clouds" all="48" unit="%" />
</time>
<time day="2017-02-04">
<symbol number="501" name="moderate rain" var="10d" />
<precipitation value="7.25" type="rain" />
<windDirection deg="172" code="S" name="South" />
<windSpeed mps="10.39" name="Fresh Breeze" />
<temperature day="8.68" min="7.07" max="10.4" night="8.48" eve="10.4" morn="7.07" />
<pressure unit="hPa" value="1001.13" />
<humidity value="0" unit="%" />
<clouds value="overcast clouds" all="96" unit="%" />
</time>
<time day="2017-02-05">
<symbol number="501" name="moderate rain" var="10d" />
<precipitation value="4.24" type="rain" />
<windDirection deg="274" code="W" name="West" />
<windSpeed mps="6.21" name="Moderate breeze" />
<windGust gust="9.31" unit="m/s"/>
<temperature day="8.5" min="4.86" max="8.5" night="4.86" eve="6.25" morn="8.26" />
<pressure unit="hPa" value="995.24" />
<humidity value="0" unit="%" />
<clouds value="broken clouds" all="64" unit="%" />
</time>
</forecast>
</weatherdLimitation of result
To limit the number of returned days please use cnt parameter.
Parameters | ||
|---|---|---|
| A number of days, which will be returned in the API response |
Example of API call
To view the API response, expand the example by clicking the triangle.Units of measurement
standard, metric, and imperial units are available. List of all API parameters with available units.
Parameters | ||
|---|---|---|
| optional | Units of measurement. |
Maximum wind speed is available in miles/hour and meter/sec.
Standard
Examples of API calls:
To view the API response, expand the example by clicking the triangle.metric
Example of API response
To view the API response, expand the example by clicking the triangle.imperial
Example of API response
To view the API response, expand the example by clicking the triangle.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://api.openweathermap.org/data/2.5/forecast/daily?id=524901&lang={lang}Parameters | ||
|---|---|---|
| optional | Language code |
Example of API call
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:
sqAlbanianafAfrikaansarArabicazAzerbaijanieuBasquebeBelarusianbgBulgariancaCatalanzh_cnChinese Simplifiedzh_twChinese TraditionalhrCroatianczCzechdaDanishnlDutchenEnglishfiFinnishfrFrenchglGaliciandeGermanelGreekheHebrewhiHindihuHungarianisIcelandicidIndonesianitItalianjaJapanesekrKoreankuKurmanji (Kurdish)laLatvianltLithuanianmkMacedoniannoNorwegianfaPersian (Farsi)plPolishptPortuguesept_brPortuguês BrasilroRomanianruRussiansrSerbianskSlovakslSloveniansp, esSpanishsv, seSwedishthThaitrTurkishua, ukUkrainianviVietnamesezuZulu
Call back function for JavaScript code
To use JavaScript code you can transfer callback functionName to JSONP callback.
Example of API call
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
}
)