Climatic forecast for 30 days
Product concept
Climatic forecast 30 Days allows you to request daily weather data for the next 30 days. Data is available in JSON and XML formats.
Call weather forecast for 30 days
How to make an API call
API call
https://pro.openweathermap.org/data/2.5/forecast/climate?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 | 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.
Example of API call
https://pro.openweathermap.org/data/2.5/forecast/climate?lat=35&lon=139&appid={API key}Example of API response
To view the API response, expand the example by clicking the triangle.Fields in API response
citycountryCountry code (GB, JP etc.). Please note that built-in geocoder functionality has been deprecated. Learn more herepopulationCity populationtimezoneShift in seconds from UTCcodInternal parametermessageInternal parameterlistlist.dtTime of data forecastedlist.sunriseSunrise time, Unix, UTClist.sunsetSunset time, Unix, UTClist.templist.temp.dayDay temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.minMin daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.maxMax daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.nightNight temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.eveEvening temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.temp.mornMorning temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_likelist.feels_like.dayDay temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_like.nightNight temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_like.eveEvening temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.feels_like.mornMorning temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheitlist.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 idlist.speedWind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hourlist.degWind direction, degrees (meteorological)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.cntNumber of lines returned by this API call
We provide a broad variety of products such as One Call API 3.0, Solar Irradiance & Energy Prediction service, Road Risk API, Air Pollution API and solutions for advanced weather parameters like solar irradiance data, UVI, dew point, government weather alerts, etc. Please review our product list page and find more info in the product documentation and pricing pages.
List of weather condition codes
List of weather condition codes with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere etc.)
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
API call
https://pro.openweathermap.org/data/2.5/forecast/climate?q={city name},{country code}&appid={API key}Parameters | ||
|---|---|---|
| required | city name and country code divided by comma (please use ISO 3166 country codes) |
| 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
https://pro.openweathermap.org/data/2.5/forecast/climate?q=London&appid={API key}When requesting API by city name, there is a possibility to receive a central district of the city/town with its own parameters (geographic coordinates/id/name) in API response.
Built-in API request by city ID
List of city IDs can be downloaded here.
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/climate?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 | 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
https://pro.openweathermap.org/data/2.5/forecast/climate?id=2643743&appid={API key}Built-in API request by ZIP code
Please note that, if the country code is not specified, then the search function will use usa by default.
API call
https://pro.openweathermap.org/data/2.5/forecast/climate?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
https://pro.openweathermap.org/data/2.5/forecast/climate?zip=94040,us&appid={API key}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
To view the API response, expand the example by clicking the triangle.Limitation 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. |
Temperature is available in Fahrenheit, Celsius and Kelvin units.
Wind speed is available in miles/hour and meter/sec.
- For temperature in Fahrenheit and wind speed in miles/hour, use
units=imperial - For temperature in Celsius and wind speed in meter/sec, use
units=metric - Temperature in Kelvin and wind speed in meter/sec is used by default, so there is no need to use the units parameter in the API call if you want this
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
http://api.openweathermap.org/data/2.5/forecast/climate?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
},
"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
}
)