Daily Forecast 16 Days

Daily Forecast 16 Days is available at any location or city. The forecast includes daily weather data and the response data is available in JSON or XML format.

Call 16 day / daily forecast data

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.openweathermap.org/data/2.5/forecast/daily?q={city name},{state code}&cnt={cnt}&appid={API key}
api.openweathermap.org/data/2.5/forecast/daily?q={city name},{state code},{country code}&cnt={cnt}&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)
cnt optional A number of days, which will be returned in the API response (from 1 to 16). Learn more
mode optional Data format. Possible values are: json, xml. If the mode parameter is empty the format is JSON by default. Learn more
units optional Units of measurement. standard, metric and imperial units are available. If you do not use the units parameter, standard units will be applied by default. Learn more
lang optional Language code. Learn more

Examples of API calls

Call 7 days forecast by city name in XML format and metric units

api.openweathermap.org/data/2.5/forecast/daily?q=London&mode=xml&units=metric&cnt=7&appid={API key}
                      
{
   "cod":"200",
   "message":0,
   "city":  {
       "geoname_id":524901,
       "name":"Moscow",
       "lat":55.7522,
       "lon":37.6156,
       "country":"RU",
       "iso2":"RU",
       "type":"city",
       "population":0
},
"cnt":7,
"list":[
 {
    "dt":1485766800,
    "temp":{
       "day":262.65,
       "min":261.41,
       "max":262.65,
       "night":261.41,
       "eve":262.65,
       "morn":262.65
    },
    "pressure":1024.53,
    "humidity":76,
    "weather":[
       {
          "id":800,
          "main":"Clear",
          "description":"sky is clear",
          "icon":"01d"
       }
    ],
    "speed":4.57,
    "deg":225,
    "clouds":0,
    "snow":0.01
 },
 {
    "dt":1485853200,
    "temp":{
       "day":262.31,
       "min":260.98,
       "max":265.44,
       "night":265.44,
       "eve":264.18,
       "morn":261.46
    },
    "pressure":1018.1,
    "humidity":91,
    "weather":[
       {
          "id":600,
          "main":"Snow",
          "description":"light snow",
          "icon":"13d"
       }
    ],
    "speed":4.1,
    "deg":249,
    "clouds":88,
    "snow":1.44
 },
 {
    "dt":1485939600,
    "temp":{
       "day":270.27,
       "min":266.9,
       "max":270.59,
       "night":268.06,
       "eve":269.66,
       "morn":266.9
    },
    "pressure":1010.85,
    "humidity":92,
    "weather":[
       {
          "id":600,
          "main":"Snow",
          "description":"light snow",
          "icon":"13d"
       }
    ],
    "speed":4.53,
    "deg":298,
    "clouds":64,
    "snow":0.92
 },
 {
    "dt":1486026000,
    "temp":{
       "day":263.46,
       "min":255.19,
       "max":264.02,
       "night":255.59,
       "eve":259.68,
       "morn":263.38
    },
    "pressure":1019.32,
    "humidity":84,
    "weather":[
       {
          "id":800,
          "main":"Clear",
          "description":"sky is clear",
          "icon":"01d"
       }
    ],
    "speed":3.06,
    "deg":344,
    "clouds":0
 },
 {
    "dt":1486112400,
    "temp":{
       "day":265.69,
       "min":256.55,
       "max":266,
       "night":256.55,
       "eve":260.09,
       "morn":266
    },
    "pressure":1012.2,
    "humidity":0,
    "weather":[
       {
          "id":600,
          "main":"Snow",
          "description":"light snow",
          "icon":"13d"
       }
    ],
    "speed":7.35,
    "deg":24,
    "clouds":45,
    "snow":0.21
 },
 {
    "dt":1486198800,
    "temp":{
       "day":259.95,
       "min":254.73,
       "max":259.95,
       "night":257.13,
       "eve":254.73,
       "morn":257.02
    },
    "pressure":1029.5,
    "humidity":0,
    "weather":[
       {
          "id":800,
          "main":"Clear",
          "description":"sky is clear",
          "icon":"01d"
       }
    ],
    "speed":2.6,
    "deg":331,
    "clouds":29
 },
 {
    "dt":1486285200,
    "temp":{
       "day":263.13,
       "min":259.11,
       "max":263.13,
       "night":262.01,
       "eve":261.32,
       "morn":259.11
    },
    "pressure":1023.21,
    "humidity":0,
    "weather":[
       {
          "id":600,
          "main":"Snow",
          "description":"light snow",
          "icon":"13d"
       }
    ],
    "speed":5.33,
    "deg":234,
    "clouds":46,
    "snow":0.04
 }
]
}
                   
                  
Please note, that 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

api.openweathermap.org/data/2.5/forecast/daily?q=München,DE
                  
{
   "city":{
      "id":6940463,
      "name":"Altstadt",
      "coord":{
         "lon":11.5752,
         "lat":48.137
      },
      "country":"DE",
      "population":0
   },
   "cod":"200",
   "message":0.1094425,
   "cnt":7,
   "list":[
      {
         "dt":1487242800,
         "temp":{
            "day":286.67,
            "min":272.78,
            "max":286.67,
            "night":273.34,
            "eve":277.05,
            "morn":281.56
         },
         "pressure":972.73,
         "humidity":75,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":1.81,
         "deg":248,
         "clouds":0
      },
      {
         "dt":1487329200,
         "temp":{
            "day":278.25,
            "min":275.04,
            "max":278.25,
            "night":275.04,
            "eve":275.64,
            "morn":276.48
         },
         "pressure":966.98,
         "humidity":95,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":3.17,
         "deg":262,
         "clouds":92,
         "rain":11.74,
         "snow":0.31
      },
      {
         "dt":1487415600,
         "temp":{
            "day":277.93,
            "min":269.55,
            "max":278.37,
            "night":269.55,
            "eve":273.8,
            "morn":274.56
         },
         "pressure":966.06,
         "humidity":95,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":0.86,
         "deg":244,
         "clouds":8,
         "snow":0.09
      },
      {
         "dt":1487502000,
         "temp":{
            "day":276.41,
            "min":267.97,
            "max":276.41,
            "night":269.77,
            "eve":273.57,
            "morn":267.97
         },
         "pressure":933.27,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":1.57,
         "deg":142,
         "clouds":74
      },
      {
         "dt":1487588400,
         "temp":{
            "day":276.28,
            "min":271.12,
            "max":276.28,
            "night":273.12,
            "eve":274.52,
            "morn":271.12
         },
         "pressure":938.21,
         "humidity":0,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":1.79,
         "deg":248,
         "clouds":88,
         "rain":0.93,
         "snow":0.38
      },
      {
         "dt":1487674800,
         "temp":{
            "day":278.1,
            "min":271.73,
            "max":278.1,
            "night":272.55,
            "eve":274.01,
            "morn":271.73
         },
         "pressure":945.82,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":2.19,
         "deg":262,
         "clouds":25,
         "snow":0.01
      },
      {
         "dt":1487761200,
         "temp":{
            "day":281.76,
            "min":273.21,
            "max":281.76,
            "night":278.88,
            "eve":279.22,
            "morn":273.21
         },
         "pressure":945.21,
         "humidity":0,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":2.98,
         "deg":272,
         "clouds":65,
         "rain":1.48
      }
   ]
}
                  
                

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
id required city ID
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
cnt optional A number of days, which will be returned in the API response (from 1 to 16). Learn more
mode optional Data format. Possible values are: json, xml. If the mode parameter is empty the format is JSON by default. Learn more
units optional Units of measurement. standard, metric and imperial units are available. If you do not use the units parameter, standard units will be applied by default. Learn more
lang optional Language code. Learn more

Example of API call

api.openweathermap.org/data/2.5/forecast/daily?id=524901&appid={API key}
                      
{
   "cod":"200",
   "message":0,
   "city":{
      "geoname_id":524901,
      "name":"Moscow",
      "lat":55.7522,
      "lon":37.6156,
      "country":"RU",
      "iso2":"RU",
      "type":"city",
      "population":0
   },
   "cnt":7,
   "list":[
      {
         "dt":1485766800,
         "temp":{
            "day":262.65,
            "min":261.41,
            "max":262.65,
            "night":261.41,
            "eve":262.65,
            "morn":262.65
         },
         "pressure":1024.53,
         "humidity":76,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":4.57,
         "deg":225,
         "clouds":0,
         "snow":0.01
      },
      {
         "dt":1485853200,
         "temp":{
            "day":262.31,
            "min":260.98,
            "max":265.44,
            "night":265.44,
            "eve":264.18,
            "morn":261.46
         },
         "pressure":1018.1,
         "humidity":91,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":4.1,
         "deg":249,
         "clouds":88,
         "snow":1.44
      },
      {
         "dt":1485939600,
         "temp":{
            "day":270.27,
            "min":266.9,
            "max":270.59,
            "night":268.06,
            "eve":269.66,
            "morn":266.9
         },
         "pressure":1010.85,
         "humidity":92,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":4.53,
         "deg":298,
         "clouds":64,
         "snow":0.92
      },
      {
         "dt":1486026000,
         "temp":{
            "day":263.46,
            "min":255.19,
            "max":264.02,
            "night":255.59,
            "eve":259.68,
            "morn":263.38
         },
         "pressure":1019.32,
         "humidity":84,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":3.06,
         "deg":344,
         "clouds":0
      },
      {
         "dt":1486112400,
         "temp":{
            "day":265.69,
            "min":256.55,
            "max":266,
            "night":256.55,
            "eve":260.09,
            "morn":266
         },
         "pressure":1012.2,
         "humidity":0,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":7.35,
         "deg":24,
         "clouds":45,
         "snow":0.21
      },
      {
         "dt":1486198800,
         "temp":{
            "day":259.95,
            "min":254.73,
            "max":259.95,
            "night":257.13,
            "eve":254.73,
            "morn":257.02
         },
         "pressure":1029.5,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":2.6,
         "deg":331,
         "clouds":29
      },
      {
         "dt":1486285200,
         "temp":{
            "day":263.13,
            "min":259.11,
            "max":263.13,
            "night":262.01,
            "eve":261.32,
            "morn":259.11
         },
         "pressure":1023.21,
         "humidity":0,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":5.33,
         "deg":234,
         "clouds":46,
         "snow":0.04
      }
   ]
}
                      
                   

By geographic coordinates

You can seach 16 day weather forecast with daily average parameters by geographic coordinats. 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
lat, lon required coordinates of the location of your interest
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
cnt optional A number of days, which will be returned in the API response (from 1 to 16). Learn more
mode optional Data format. Possible values are: json, xml. If the mode parameter is empty the format is JSON by default. Learn more
units optional Units of measurement. standard, metric and imperial units are available. If you do not use the units parameter, standard units will be applied by default. Learn more
lang optional Language code. Learn more

Example of API call

Call 10 days forecast by geographic coordinates

api.openweathermap.org/data/2.5/forecast/daily?lat=35&lon=139&cnt=10&appid={API key}
                      
{
   "cod":"200",
   "message":0,
   "city":{
      "geoname_id":1907296,
      "name":"Tawarano",
      "lat":35.0164,
      "lon":139.0077,
      "country":"JP",
      "iso2":"JP",
      "type":"",
      "population":0
   },
   "cnt":10,
   "list":[
      {
         "dt":1485741600,
         "temp":{
            "day":285.51,
            "min":285.51,
            "max":285.51,
            "night":285.51,
            "eve":285.51,
            "morn":285.51
         },
         "pressure":1013.75,
         "humidity":100,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01n"
            }
         ],
         "speed":5.52,
         "deg":311,
         "clouds":0
      },
      {
         "dt":1485828000,
         "temp":{
            "day":282.27,
            "min":282.27,
            "max":284.66,
            "night":284.66,
            "eve":282.78,
            "morn":282.56
         },
         "pressure":1023.68,
         "humidity":100,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":5.46,
         "deg":66,
         "clouds":0
      },
      {
         "dt":1485914400,
         "temp":{
            "day":284.83,
            "min":283.21,
            "max":285.7,
            "night":284.16,
            "eve":285.49,
            "morn":283.21
         },
         "pressure":1017.39,
         "humidity":100,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"02d"
            }
         ],
         "speed":13.76,
         "deg":260,
         "clouds":8
      },
      {
         "dt":1486000800,
         "temp":{
            "day":283.71,
            "min":281.86,
            "max":285.13,
            "night":283.81,
            "eve":284.76,
            "morn":281.86
         },
         "pressure":1017.36,
         "humidity":100,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":8.95,
         "deg":288,
         "clouds":0
      },
      {
         "dt":1486087200,
         "temp":{
            "day":280,
            "min":275.68,
            "max":283.75,
            "night":278.79,
            "eve":283.75,
            "morn":275.68
         },
         "pressure":996.2,
         "humidity":0,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":5.92,
         "deg":295,
         "clouds":0
      },
      {
         "dt":1486173600,
         "temp":{
            "day":279.4,
            "min":276.69,
            "max":283.22,
            "night":277.58,
            "eve":283.22,
            "morn":276.69
         },
         "pressure":998.07,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":3.71,
         "deg":314,
         "clouds":0
      },
      {
         "dt":1486260000,
         "temp":{
            "day":280.88,
            "min":276.28,
            "max":284.66,
            "night":281.2,
            "eve":284.66,
            "morn":276.28
         },
         "pressure":997.4,
         "humidity":0,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":2.1,
         "deg":337,
         "clouds":66,
         "rain":0.28
      },
      {
         "dt":1486346400,
         "temp":{
            "day":281.58,
            "min":278.74,
            "max":283.76,
            "night":278.74,
            "eve":283.76,
            "morn":279.15
         },
         "pressure":991.11,
         "humidity":0,
         "weather":[
            {
               "id":501,
               "main":"Rain",
               "description":"moderate rain",
               "icon":"10d"
            }
         ],
         "speed":2.69,
         "deg":2,
         "clouds":4,
         "rain":3.72
      },
      {
         "dt":1486432800,
         "temp":{
            "day":277.62,
            "min":275.86,
            "max":281.14,
            "night":276.45,
            "eve":281.14,
            "morn":275.86
         },
         "pressure":993.37,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":2.05,
         "deg":353,
         "clouds":47,
         "rain":0.52,
         "snow":0.03
      },
      {
         "dt":1486519200,
         "temp":{
            "day":279.26,
            "min":275.51,
            "max":281.61,
            "night":276.55,
            "eve":281.61,
            "morn":275.51
         },
         "pressure":991.72,
         "humidity":0,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":3.47,
         "deg":326,
         "clouds":2,
         "rain":0.35
      }
   ]
}
                      
                   

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
zip required Zip code
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
cnt optional A number of days, which will be returned in the API response (from 1 to 16). Learn more
mode optional Data format. Possible values are: json, xml. If the mode parameter is empty the format is JSON by default. Learn more
units optional Units of measurement. standard, metric and imperial units are available. If you do not use the units parameter, standard units will be applied by default. Learn more
lang optional Language code. Learn more

Example of API call

api.openweathermap.org/data/2.5/forecast/daily?zip=94040,us&appid={API key}
                      
{
   "city":{
      "id":0,
      "name":"Mountain View",
      "coord":{
         "lon":-122.088,
         "lat":37.3855
      },
      "country":"US",
      "population":0
   },
   "cod":"200",
   "message":2.1505307,
   "cnt":7,
   "list":[
      {
         "dt":1519070400,
         "temp":{
            "day":283.99,
            "min":271.86,
            "max":283.99,
            "night":271.86,
            "eve":278.3,
            "morn":280.44
         },
         "pressure":989.94,
         "humidity":52,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":3.36,
         "deg":325,
         "clouds":20,
         "rain":0.31
      },
      {
         "dt":1519156800,
         "temp":{
            "day":282.68,
            "min":268.17,
            "max":282.68,
            "night":271.62,
            "eve":277.16,
            "morn":268.17
         },
         "pressure":996.36,
         "humidity":50,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":1.25,
         "deg":245,
         "clouds":0
      },
      {
         "dt":1519243200,
         "temp":{
            "day":280.88,
            "min":271.62,
            "max":280.98,
            "night":274.19,
            "eve":277.8,
            "morn":271.62
         },
         "pressure":996.59,
         "humidity":84,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":1.46,
         "deg":232,
         "clouds":92,
         "rain":1.3
      },
      {
         "dt":1519329600,
         "temp":{
            "day":283.8,
            "min":282.02,
            "max":285.94,
            "night":284.02,
            "eve":285.94,
            "morn":282.02
         },
         "pressure":1014.12,
         "humidity":0,
         "weather":[
            {
               "id":501,
               "main":"Rain",
               "description":"moderate rain",
               "icon":"10d"
            }
         ],
         "speed":6.4,
         "deg":173,
         "clouds":57,
         "rain":11.41
      },
      {
         "dt":1519416000,
         "temp":{
            "day":284.36,
            "min":281.5,
            "max":285.85,
            "night":281.5,
            "eve":285.85,
            "morn":283.32
         },
         "pressure":1014.73,
         "humidity":0,
         "weather":[
            {
               "id":501,
               "main":"Rain",
               "description":"moderate rain",
               "icon":"10d"
            }
         ],
         "speed":4.23,
         "deg":114,
         "clouds":89,
         "rain":9.29
      },
      {
         "dt":1519502400,
         "temp":{
            "day":285.58,
            "min":279.27,
            "max":288.96,
            "night":282.02,
            "eve":288.96,
            "morn":279.27
         },
         "pressure":1015.81,
         "humidity":0,
         "weather":[
            {
               "id":500,
               "main":"Rain",
               "description":"light rain",
               "icon":"10d"
            }
         ],
         "speed":1.27,
         "deg":57,
         "clouds":9
      },
      {
         "dt":1519588800,
         "temp":{
            "day":287.05,
            "min":279.96,
            "max":290.51,
            "night":282.65,
            "eve":290.51,
            "morn":279.96
         },
         "pressure":1012.12,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":1.75,
         "deg":54,
         "clouds":1
      }
   ]
}
                      
                   

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.

Examples of bulk files

http://bulk.openweathermap.org/sample/

Weather fields 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

Example of API reponse
                   
{
   "city":{
      "id":2643743,
      "name":"London",
      "coord":{
         "lon":-0.1258,
         "lat":51.5085
      },
      "country":"GB",
      "population":0,
      "timezone":3600
   },
   "cod":"200",
   "message":0.7809187,
   "cnt":7,
   "list":[
      {
         "dt":1568977200,
         "sunrise":1568958164,
         "sunset":1569002733,
         "temp":{
            "day":293.79,
            "min":288.85,
            "max":294.47,
            "night":288.85,
            "eve":290.44,
            "morn":293.79
         },
         "feels_like":{
            "day":278.87,
            "night":282.73,
            "eve":281.92,
            "morn":278.87
         },
         "pressure":1025.04,
         "humidity":42,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":4.66,
         "deg":102,
         "clouds":0,
         "pop":0.24
      },
      ....
                   
                

Fields in API response

  • city
    • city.id 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.)
  • population Internal parameter
  • timezone Shift in seconds from UTC
  • cod Internal parameter
  • message Internal parameter
  • cnt A number of days returned in the API response
  • list
    • list.dt Time of data forecasted
    • list.temp
      • list.temp.day Day temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.temp.min Min daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.temp.max Max daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.temp.night Night temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.temp.eve Evening temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.temp.morn Morning temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • list.feels_like
      • list.feels_like.day Day temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.feels_like.night Night temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.feels_like.eve Evening temperature.This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • list.feels_like.morn Morning temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • list.pressure Atmospheric pressure on the sea level, hPa
    • list.humidity Humidity, %
    • list.weather (more info Weather condition codes)
      • 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.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.
    • list.deg Wind direction, degrees (meteorological)
    • list.clouds Cloudiness, %
    • list.rain Precipitation volume, mm
    • list.snow Snow volume, mm
    • list.pop Probability of precipitation

XML

Example of API response
                   
<weatherdata>
<location>
<name>London</name>
<type />
<country>GB</country>
<timezone>3600</timezone>
<location altitude="0" latitude="51.50853" longitude="-0.12574" geobase="geonames" geobaseid="0" />
</location>
<credit />
<meta>
<lastupdate />
<calctime>0.0091</calctime>
<nextupdate />
</meta>
<sun rise="2015-06-04T03:46:26" set="2015-06-04T20:11:17" />
<forecast>
<time day="2015-06-04">
 <sun rise="2020-08-06T19:57:53" set="2020-08-07T09:41:42" />
 <symbol number="804" name="overcast clouds" var="04n" />
 <precipitation probability="0.24" />
 <windDirection deg="250" code="WSW" name="West-southwest" />
 <windSpeed mps="5.09" unit="m/s" name="Gentle Breeze" />
 <temperature day="298.15" min="298.15" max="298.44" night="298.44" eve="298.15" morn="298.15" unit="kelvin" />
 <feels_like day="299.13" night="300.41" eve="299.13" morn="299.13" unit="kelvin" />
 <pressure unit="hPa" value="1005" />
 <humidity value="82" unit="%" />
 <clouds value="overcast clouds" all="100" unit="%" />
</time>
</forecast>
</weatherdata>
                   
                

Fields in API response

  • location
    • location.name City ID
    • location.type Prototype 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
  • 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.day Date of weather 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 day, mm
      • forecast.precipitation.type Type of precipitation. Possible value is rain, snow.
      • forecast.precipitation.probability Probability of precipitation
    • 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, mps
      • forecast.windSpeed.name Type of the wind
    • forecast.temperature
      • forecast.temperature.day Day temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.temperature.min Min daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.temperature.max Max daily temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.temperature.night Night temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.temperature.eve Evening temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.temperature.morn Morning temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.temperature.unit Unit of measurements. Possilbe values are Celsius, Kelvin, Fahrenheit.
    • forecast.feels_like
      • forecast.feels_like.day Day temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.feels_like.night Night temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.feels_like.eve Evening temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.feels_like.morn Morning temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
      • forecast.feels_like.unit Unit of measurements. Possilbe values are Celsius, Kelvin, Fahrenheit. Unit Default: Kelvin
    • forecast.pressure
      • forecast.pressure.unit hPa
      • forecast.pressure.value Pressure value
    • forecast.humidity
      • forecast.humidity.unit %
      • forecast.humidity.value Humidity value
    • forecast.clouds
      • forecast.pressure.value Name of the cloudiness
      • forecast.pressure.all Cloudiness
      • forecast.pressure.unit %

List of 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 current weather API and forecast API

Please, do not confuse min/max parameters in our weather APIs.
  • 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.
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, take a look at the 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

Format

Data format. JSON format is used by default. To get data in XML format use mode=xml.

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

Examples of API calls

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
   },
   "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
                   
<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" />
 <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="" />
 <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" />
 <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" />
 <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" />
 <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" />
 <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>
</weatherd
                   
                

Limitation of result

To limit the number of returned days please use cnt parameter.

Parameters
cnt A number of days, which will be returned in the API response

Example of API call

http://api.openweathermap.org/data/2.5/forecast/daily?q=London&cnt=3&appid={API key}
                   
{
  "city": {
    "id": 2643743,
    "name": "London",
    "coord": {
      "lon": -0.1257,
      "lat": 51.5085
    },
    "country": "GB",
    "population": 1000000,
    "timezone": 3600
  },
  "cod": "200",
  "message": 0.05491,
  "cnt": 3,
  "list": [
    {
      "dt": 1599735600,
      "sunrise": 1599715685,
      "sunset": 1599762420,
      "temp": {
        "day": 292.05,
        "min": 286.3,
        "max": 292.77,
        "night": 289.72,
        "eve": 291.46,
        "morn": 286.3
      },
      "feels_like": {
        "day": 289.68,
        "night": 288,
        "eve": 288.78,
        "morn": 284.19
      },
      "pressure": 1023,
      "humidity": 40,
      "weather": [
        {
          "id": 800,
          "main": "Clear",
          "description": "sky is clear",
          "icon": "01d"
        }
      ],
      "speed": 1.78,
      "deg": 332,
      "clouds": 0,
      "pop": 0
    },
    {
      "dt": 1599822000,
      "sunrise": 1599802180,
      "sunset": 1599848682,
      "temp": {
        "day": 292.26,
        "min": 286.58,
        "max": 293.36,
        "night": 288.83,
        "eve": 290.65,
        "morn": 286.58
      },
      "feels_like": {
        "day": 289.07,
        "night": 286.12,
        "eve": 287.85,
        "morn": 284.39
      },
      "pressure": 1016,
      "humidity": 48,
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ],
      "speed": 3.84,
      "deg": 242,
      "clouds": 50,
      "pop": 0
    },
    {
      "dt": 1599908400,
      "sunrise": 1599888675,
      "sunset": 1599934943,
      "temp": {
        "day": 292.86,
        "min": 285.62,
        "max": 293.08,
        "night": 290.3,
        "eve": 292.15,
        "morn": 285.62
      },
      "feels_like": {
        "day": 290.24,
        "night": 289.13,
        "eve": 290.42,
        "morn": 282.9
      },
      "pressure": 1018,
      "humidity": 57,
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ],
      "speed": 4.19,
      "deg": 258,
      "clouds": 74,
      "pop": 0
    }
  ]
}
                   
                

Units of measurement

standard, metric, and imperial units are available. List of all API parameters with available units.

Parameters
units optional Units of measurement. standard, metric and imperial units are available. If you do not use the units parameter, standard units will be applied by default.
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

Examples of API calls:

Standard

api.openweathermap.org/data/2.5/find?q=London&appid={API key}
                      
{
   "message":"accurate",
   "cod":"200",
   "count":1,
   "list":[
      {
         "id":2643743,
         "name":"London",
         "coord":{
            "lat":51.5085,
            "lon":-0.1258
         },
         "main":{
            "temp":280.15,
            "pressure":1012,
            "humidity":81,
            "temp_min":278.15,
            "temp_max":281.15
         },
         "dt":1485791400,
         "wind":{
            "speed":4.6,
            "deg":90
         },
         "sys":{
            "country":"GB"
         },
         "rain":null,
         "snow":null,
         "clouds":{
            "all":90
         },
         "weather":[
            {
               "id":701,
               "main":"Mist",
               "description":"mist",
               "icon":"50d"
            },
            {
               "id":300,
               "main":"Drizzle",
               "description":"light intensity drizzle",
               "icon":"09d"
            }
         ]
      }
   ]
}
                      
                   

metric

api.openweathermap.org/data/2.5/find?q=London&units=metric
                      
{
   "message":"accurate",
   "cod":"200",
   "count":1,
   "list":[
      {
         "id":2643743,
         "name":"London",
         "coord":{
            "lat":51.5085,
            "lon":-0.1258
         },
         "main":{
            "temp":7,
            "pressure":1012,
            "humidity":81,
            "temp_min":5,
            "temp_max":8
         },
         "dt":1485791400,
         "wind":{
            "speed":4.6,
            "deg":90
         },
         "sys":{
            "country":"GB"
         },
         "rain":null,
         "snow":null,
         "clouds":{
            "all":90
         },
         "weather":[
            {
               "id":701,
               "main":"Mist",
               "description":"mist",
               "icon":"50d"
            },
            {
               "id":300,
               "main":"Drizzle",
               "description":"light intensity drizzle",
               "icon":"09d"
            }
         ]
      }
   ]
}
                      
                   

imperial

api.openweathermap.org/data/2.5/find?q=London&units=imperial
                      
{
   "message":"accurate",
   "cod":"200",
   "count":1,
   "list":[
      {
         "id":2643743,
         "name":"London",
         "coord":{
            "lat":51.5085,
            "lon":-0.1258
         },
         "main":{
            "temp":7,
            "pressure":1012,
            "humidity":81,
            "temp_min":5,
            "temp_max":8
         },
         "dt":1485791400,
         "wind":{
            "speed":4.6,
            "deg":90
         },
         "sys":{
            "country":"GB"
         },
         "rain":null,
         "snow":null,
         "clouds":{
            "all":90
         },
         "weather":[
            {
               "id":701,
               "main":"Mist",
               "description":"mist",
               "icon":"50d"
            },
            {
               "id":300,
               "main":"Drizzle",
               "description":"light intensity drizzle",
               "icon":"09d"
            }
         ]
      }
   ]
}
                      
                   

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/daily?id=524901&lang={lang}
Parameters
lang optional Language code

Example of API call

http://api.openweathermap.org/data/2.5/forecast/daily?id=524901&lang=zh_cn&appid={API key}
                
{
   "cod":"200",
   "message":0,
   "city":{
      "geoname_id":524901,
      "name":"Moscow",
      "lat":55.7522,
      "lon":37.6156,
      "country":"RU",
      "iso2":"RU",
      "type":"city",
      "population":0
   },
   "cnt":7,
   "list":[
      {
         "dt":1485766800,
         "temp":{
            "day":262.65,
            "min":261.41,
            "max":262.65,
            "night":261.41,
            "eve":262.65,
            "morn":262.65
         },
         "pressure":1024.53,
         "humidity":76,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":4.57,
         "deg":225,
         "clouds":0,
         "snow":0.01
      },
      {
         "dt":1485853200,
         "temp":{
            "day":262.31,
            "min":260.98,
            "max":265.44,
            "night":265.44,
            "eve":264.18,
            "morn":261.46
         },
         "pressure":1018.1,
         "humidity":91,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":4.1,
         "deg":249,
         "clouds":88,
         "snow":1.44
      },
      {
         "dt":1485939600,
         "temp":{
            "day":270.27,
            "min":266.9,
            "max":270.59,
            "night":268.06,
            "eve":269.66,
            "morn":266.9
         },
         "pressure":1010.85,
         "humidity":92,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":4.53,
         "deg":298,
         "clouds":64,
         "snow":0.92
      },
      {
         "dt":1486026000,
         "temp":{
            "day":263.46,
            "min":255.19,
            "max":264.02,
            "night":255.59,
            "eve":259.68,
            "morn":263.38
         },
         "pressure":1019.32,
         "humidity":84,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":3.06,
         "deg":344,
         "clouds":0
      },
      {
         "dt":1486112400,
         "temp":{
            "day":265.69,
            "min":256.55,
            "max":266,
            "night":256.55,
            "eve":260.09,
            "morn":266
         },
         "pressure":1012.2,
         "humidity":0,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":7.35,
         "deg":24,
         "clouds":45,
         "snow":0.21
      },
      {
         "dt":1486198800,
         "temp":{
            "day":259.95,
            "min":254.73,
            "max":259.95,
            "night":257.13,
            "eve":254.73,
            "morn":257.02
         },
         "pressure":1029.5,
         "humidity":0,
         "weather":[
            {
               "id":800,
               "main":"Clear",
               "description":"sky is clear",
               "icon":"01d"
            }
         ],
         "speed":2.6,
         "deg":331,
         "clouds":29
      },
      {
         "dt":1486285200,
         "temp":{
            "day":263.13,
            "min":259.11,
            "max":263.13,
            "night":262.01,
            "eve":261.32,
            "morn":259.11
         },
         "pressure":1023.21,
         "humidity":0,
         "weather":[
            {
               "id":600,
               "main":"Snow",
               "description":"light snow",
               "icon":"13d"
            }
         ],
         "speed":5.33,
         "deg":234,
         "clouds":46,
         "snow":0.04
      }
   ]
}
                
             

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.

Example of API call

api.openweathermap.org/data/2.5/weather?q=London,uk&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
 },
 "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
}
)