Current weather data

Access current weather data for any location on Earth including over 200,000 cities! We collect and process weather data from different sources such as global and local weather models, satellites, radars and vast network of weather stations. Data is available in JSON, XML, or HTML format.

Call current weather data for one location

By city name

You can call by city name or city name, state code and country code. Please note that searching by states available only for the USA locations.

API call

api.openweathermap.org/data/2.5/weather?q={city name}&appid={API key}
api.openweathermap.org/data/2.5/weather?q={city name},{state code}&appid={API key}
api.openweathermap.org/data/2.5/weather?q={city name},{state code},{country code}&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)
mode optional Response format. Possible values are xml and html. If you don't use the mode parameter 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 You can use this parameter to get the output in your language. Learn more

Examples of API calls:

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
     }
                         
                       
api.openweathermap.org/data/2.5/weather?q=London,uk&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
     }
                         
                       
There is a possibility to receive a central district of the city/town with its own parameters (geographic coordinates/id/name) in API response. Example

By city ID

You can make an API call by city ID. 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/weather?id={city id}&appid={API key}

Parameters
id required City ID. List of city ID 'city.list.json.gz' can be downloaded here.
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
mode optional Response format. Possible values are xml and html. If you don't use the mode parameter 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 You can use this parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/weather?id=2172797&appid={API key}
                         
     {
     "coord": {
       "lon": 145.77,
       "lat": -16.92
     },
     "weather": [
       {
         "id": 802,
         "main": "Clouds",
         "description": "scattered clouds",
         "icon": "03n"
       }
     ],
     "base": "stations",
     "main": {
       "temp": 300.15,
       "pressure": 1007,
       "humidity": 74,
       "temp_min": 300.15,
       "temp_max": 300.15
     },
     "visibility": 10000,
     "wind": {
       "speed": 3.6,
       "deg": 160
     },
     "clouds": {
       "all": 40
     },
     "dt": 1485790200,
     "sys": {
       "type": 1,
       "id": 8166,
       "message": 0.2064,
       "country": "AU",
       "sunrise": 1485720272,
       "sunset": 1485766550
     },
     "id": 2172797,
     "name": "Cairns",
     "cod": 200
     }
                         
                       

By geographic coordinates

API call

api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={API key}
Parameters
lat, lon required Geographical coordinates (latitude, longitude)
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
mode optional Response format. Possible values are xml and html. If you don't use the mode parameter 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 You can use this parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/weather?lat=35&lon=139&appid={API key}
                             
     {"coord": { "lon": 139,"lat": 35},
     "weather": [
       {
         "id": 800,
         "main": "Clear",
         "description": "clear sky",
         "icon": "01n"
       }
     ],
     "base": "stations",
     "main": {
       "temp": 281.52,
       "feels_like": 278.99,
       "temp_min": 280.15,
       "temp_max": 283.71,
       "pressure": 1016,
       "humidity": 93
     },
     "wind": {
       "speed": 0.47,
       "deg": 107.538
     },
     "clouds": {
       "all": 2
     },
     "dt": 1560350192,
     "sys": {
       "type": 3,
       "id": 2019346,
       "message": 0.0065,
       "country": "JP",
       "sunrise": 1560281377,
       "sunset": 1560333478
     },
     "timezone": 32400,
     "id": 1851632,
     "name": "Shuzenji",
     "cod": 200
     }
                             
                           

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/weather?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)
mode optional Response format. Possible values are xml and html. If you don't use the mode parameter 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 You can use this parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/weather?zip=94040,us&appid={API key}
                             
     {
     "coord": {"lon": -122.08,"lat": 37.39},
     "weather": [
       {
         "id": 800,
         "main": "Clear",
         "description": "clear sky",
         "icon": "01d"
       }
     ],
     "base": "stations",
     "main": {
       "temp": 282.55,
       "feels_like": 281.86,
       "temp_min": 280.37,
       "temp_max": 284.26,
       "pressure": 1023,
       "humidity": 100
     },
     "visibility": 16093,
     "wind": {
       "speed": 1.5,
       "deg": 350
     },
     "clouds": {
       "all": 1
     },
     "dt": 1560350645,
     "sys": {
       "type": 1,
       "id": 5122,
       "message": 0.0139,
       "country": "US",
       "sunrise": 1560343627,
       "sunset": 1560396563
     },
     "timezone": -25200,
     "id": 420006353,
     "name": "Mountain View",
     "cod": 200
     }
                             
                           

Call current weather data for several cities

If you request weather data for several locations, you will get the response only in JSON format (XML and HTML formats are not available for these cases).

Cities within a rectangle zone

API returns the data from cities within the defined rectangle specified by the geographic coordinates.

API call

api.openweathermap.org/data/2.5/box/city?bbox={bbox}&appid={API key}
Parameters
bbox required Bounding box [lon-left,lat-bottom,lon-right,lat-top,zoom]
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
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 You can use this parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/box/city?bbox=12,32,15,37,10&appid={API key}
                          
  {
  "cod": "200",
  "calctime": 0.3107,
  "cnt": 15,
  "list": [
    {
      "id": 2208791,
      "name": "Yafran",
      "coord": {
        "lon": 12.52859,
        "lat": 32.06329
      },
      "main": {
        "temp": 9.68,
        "temp_min": 9.681,
        "temp_max": 9.681,
        "pressure": 961.02,
        "sea_level": 1036.82,
        "grnd_level": 961.02,
        "humidity": 85
      },
      "dt": 1485784982,
      "wind": {
        "speed": 3.96,
        "deg": 356.5
      },
      "rain": {
        "3h": 0.255
      },
      "clouds": {
        "all": 88
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ]
    },
    {
      "id": 2208425,
      "name": "Zuwarah",
      "coord": {
        "lon": 12.08199,
        "lat": 32.931198
      },
      "main": {
        "temp": 15.36,
        "temp_min": 15.356,
        "temp_max": 15.356,
        "pressure": 1036.81,
        "sea_level": 1037.79,
        "grnd_level": 1036.81,
        "humidity": 89
      },
      "dt": 1485784982,
      "wind": {
        "speed": 5.46,
        "deg": 30.0002
      },
      "clouds": {
        "all": 56
      },
      "weather": [
        {
          "id": 803,
          "main": "Clouds",
          "description": "broken clouds",
          "icon": "04d"
        }
      ]
    },
    {
      "id": 2212771,
      "name": "Sabratah",
      "coord": {
        "lon": 12.48845,
        "lat": 32.79335
      },
      "main": {
        "temp": 15.31,
        "temp_min": 15.306,
        "temp_max": 15.306,
        "pressure": 1037.05,
        "sea_level": 1037.55,
        "grnd_level": 1037.05,
        "humidity": 100
      },
      "dt": 1485784982,
      "wind": {
        "speed": 6.71,
        "deg": 28.5002
      },
      "clouds": {
        "all": 92
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ]
    },
    {
      "id": 2217362,
      "name": "Gharyan",
      "coord": {
        "lon": 13.02028,
        "lat": 32.172218
      },
      "main": {
        "temp": 11.23,
        "temp_min": 11.231,
        "temp_max": 11.231,
        "pressure": 1004.23,
        "sea_level": 1037.06,
        "grnd_level": 1004.23,
        "humidity": 90
      },
      "dt": 1485784982,
      "wind": {
        "speed": 3.86,
        "deg": 16.5002
      },
      "rain": {
        "3h": 1.29
      },
      "clouds": {
        "all": 92
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ]
    },
    {
      "id": 2216885,
      "name": "Zawiya",
      "coord": {
        "lon": 12.72778,
        "lat": 32.75222
      },
      "main": {
        "temp": 17,
        "pressure": 1024,
        "humidity": 55,
        "temp_min": 17,
        "temp_max": 17
      },
      "dt": 1485784982,
      "wind": {
        "speed": 3.6,
        "deg": 10
      },
      "clouds": {
        "all": 40
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ]
    },
    {
      "id": 2210247,
      "name": "Tripoli",
      "coord": {
        "lon": 13.18746,
        "lat": 32.875191
      },
      "main": {
        "temp": 16,
        "pressure": 1025,
        "humidity": 59,
        "temp_min": 16,
        "temp_max": 16
      },
      "dt": 1485781822,
      "wind": {
        "speed": 3.6,
        "deg": 360
      },
      "clouds": {
        "all": 40
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ]
    },
    {
      "id": 2210221,
      "name": "Tarhuna",
      "coord": {
        "lon": 13.6332,
        "lat": 32.43502
      },
      "main": {
        "temp": 17,
        "pressure": 1024,
        "humidity": 55,
        "temp_min": 17,
        "temp_max": 17
      },
      "dt": 1485784982,
      "wind": {
        "speed": 3.6,
        "deg": 10
      },
      "clouds": {
        "all": 40
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ]
    },
    {
      "id": 2215163,
      "name": "Masallatah",
      "coord": {
        "lon": 14,
        "lat": 32.616669
      },
      "main": {
        "temp": 12.86,
        "temp_min": 12.856,
        "temp_max": 12.856,
        "pressure": 1000.17,
        "sea_level": 1036.49,
        "grnd_level": 1000.17,
        "humidity": 73
      },
      "dt": 1485784982,
      "wind": {
        "speed": 4.81,
        "deg": 16.5002
      },
      "rain": {
        "3h": 0.39
      },
      "clouds": {
        "all": 88
      },
      "weather": [
        {
          "id": 500,
          "main": "Rain",
          "description": "light rain",
          "icon": "10d"
        }
      ]
    },
    {
      "id": 2219905,
      "name": "Al Khums",
      "coord": {
        "lon": 14.26191,
        "lat": 32.648609
      },
      "main": {
        "temp": 15.18,
        "temp_min": 15.181,
        "temp_max": 15.181,
        "pressure": 1023.35,
        "sea_level": 1036.01,
        "grnd_level": 1023.35,
        "humidity": 73
      },
      "dt": 1485784982,
      "wind": {
        "speed": 5.26,
        "deg": 26.0002
      },
      "clouds": {
        "all": 88
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ]
    },
    {
      "id": 2208485,
      "name": "Zlitan",
      "coord": {
        "lon": 14.56874,
        "lat": 32.467381
      },
      "main": {
        "temp": 15.18,
        "temp_min": 15.181,
        "temp_max": 15.181,
        "pressure": 1023.35,
        "sea_level": 1036.01,
        "grnd_level": 1023.35,
        "humidity": 73
      },
      "dt": 1485784982,
      "wind": {
        "speed": 5.26,
        "deg": 26.0002
      },
      "clouds": {
        "all": 88
      },
      "weather": [
        {
          "id": 804,
          "main": "Clouds",
          "description": "overcast clouds",
          "icon": "04d"
        }
      ]
    },
    {
      "id": 2563191,
      "name": "Birkirkara",
      "coord": {
        "lon": 14.46111,
        "lat": 35.897221
      },
      "main": {
        "temp": 14,
        "pressure": 1023,
        "humidity": 62,
        "temp_min": 14,
        "temp_max": 14
      },
      "dt": 1485784991,
      "wind": {
        "speed": 4.1,
        "deg": 10,
        "var_beg": 330,
        "var_end": 30
      },
      "clouds": {
        "all": 40
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ]
    },
    {
      "id": 2523650,
      "name": "Ragusa",
      "coord": {
        "lon": 14.71719,
        "lat": 36.928242
      },
      "main": {
        "temp": 14.54,
        "pressure": 1022,
        "humidity": 50,
        "temp_min": 13,
        "temp_max": 16
      },
      "dt": 1485781816,
      "wind": {
        "speed": 3.1,
        "deg": 20,
        "var_beg": 350,
        "var_end": 60
      },
      "clouds": {
        "all": 20
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "few clouds",
          "icon": "02d"
        }
      ]
    },
    {
      "id": 2523693,
      "name": "Pozzallo",
      "coord": {
        "lon": 14.84989,
        "lat": 36.730541
      },
      "main": {
        "temp": 14,
        "pressure": 1022,
        "humidity": 50,
        "temp_min": 14,
        "temp_max": 14
      },
      "dt": 1485781816,
      "wind": {
        "speed": 3.1,
        "deg": 20,
        "var_beg": 350,
        "var_end": 60
      },
      "clouds": {
        "all": 20
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "few clouds",
          "icon": "02d"
        }
      ]
    },
    {
      "id": 2524119,
      "name": "Modica",
      "coord": {
        "lon": 14.77399,
        "lat": 36.84594
      },
      "main": {
        "temp": 15.74,
        "pressure": 1022,
        "humidity": 47,
        "temp_min": 14,
        "temp_max": 17
      },
      "dt": 1485785168,
      "wind": {
        "speed": 2.1,
        "deg": 0
      },
      "clouds": {
        "all": 40
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ]
    },
    {
      "id": 2523581,
      "name": "Rosolini",
      "coord": {
        "lon": 14.94779,
        "lat": 36.824242
      },
      "main": {
        "temp": 15.62,
        "pressure": 1022,
        "humidity": 47,
        "temp_min": 14,
        "temp_max": 17
      },
      "dt": 1485784979,
      "wind": {
        "speed": 2.1,
        "deg": 0
      },
      "clouds": {
        "all": 40
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ]
    }
  ]
  }
                          
                        
There is a limit of 25 square degrees for Free and Startup plans.

Cities in circle

API returns data from cities laid within definite circle that is specified by center point (lat, lon) and expected number of cities (cnt) around this point.

API call

api.openweathermap.org/data/2.5/find?lat={lat}&lon={lon}&cnt={cnt}&appid={API key}
Parameters
lat, lon required Geographical coordinates (latitude, longitude)
appid required Your unique API key (you can always find it on your account page under the "API key" tab)
cnt optional Number of cities around the point that should be returned. The default number of cities is 5, the maximum is 50.
mode optional Response format. Possible values are xml and html. If you don't use the mode parameter 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 You can use this parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/find?lat=55.5&lon=37.5&cnt=10&appid={API key}
                          
{
  "message": "accurate",
  "cod": "200",
  "count": 3,
  "list": [
    {
      "id": 2641549,
      "name": "Newtonhill",
      "coord": {
        "lat": 57.0333,
        "lon": -2.15
      },
      "main": {
        "temp": 275.15,
        "pressure": 1010,
        "humidity": 93,
        "temp_min": 275.15,
        "temp_max": 275.15
      },
      "dt": 1521204600,
      "wind": {
        "speed": 9.3,
        "deg": 120,
        "gust": 18
      },
      "sys": {
        "country": ""
      },
      "rain": null,
      "snow": null,
      "clouds": {
        "all": 75
      },
      "weather": [
        {
          "id": 311,
          "main": "Drizzle",
          "description": "rain and drizzle",
          "icon": "09d"
        }
      ]
    },
    {
      "id": 2636814,
      "name": "Stonehaven",
      "coord": {
        "lat": 56.9637,
        "lon": -2.2118
      },
      "main": {
        "temp": 275.15,
        "pressure": 1010,
        "humidity": 93,
        "temp_min": 275.15,
        "temp_max": 275.15
      },
      "dt": 1521204600,
      "wind": {
        "speed": 9.3,
        "deg": 120,
        "gust": 18
      },
      "sys": {
        "country": ""
      },
      "rain": null,
      "snow": null,
      "clouds": {
        "all": 75
      },
      "weather": [
        {
          "id": 311,
          "main": "Drizzle",
          "description": "rain and drizzle",
          "icon": "09d"
        }
      ]
    },
    {
      "id": 2640030,
      "name": "Portlethen",
      "coord": {
        "lat": 57.0547,
        "lon": -2.1307
      },
      "main": {
        "temp": 275.15,
        "pressure": 1010,
        "humidity": 93,
        "temp_min": 275.15,
        "temp_max": 275.15
      },
      "dt": 1521204600,
      "wind": {
        "speed": 9.3,
        "deg": 120,
        "gust": 18
      },
      "sys": {
        "country": ""
      },
      "rain": null,
      "snow": null,
      "clouds": {
        "all": 75
      },
      "weather": [
        {
          "id": 311,
          "main": "Drizzle",
          "description": "rain and drizzle",
          "icon": "09d"
        }
      ]
    }
  ]
  }
                          
                        

Call for several city IDs

There is a possibility to get current weather data for several cities by making one API call.

API call

api.openweathermap.org/data/2.5/group?id={id,..,id}&appid={API key}
Parameters
id required City ID. List of city ID 'city.list.json.gz' can be downloaded here.

The limit of locations is 20.

appid required Your unique API key (you can always find it on your account page under the "API key" tab)
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 You can use this parameter to get the output in your language. Learn more

Examples of API calls

api.openweathermap.org/data/2.5/group?id=524901,703448,2643743&appid={API key}
                      
{
  "cnt": 3,
  "list": [
    {
      "coord": {
        "lon": 37.62,
        "lat": 55.75
      },
      "sys": {
        "country": "RU",
        "timezone": 10800,
        "sunrise": 1597889504,
        "sunset": 1597942460
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "few clouds",
          "icon": "02d"
        }
      ],
      "main": {
        "temp": 293.69,
        "feels_like": 291.27,
        "temp_min": 292.15,
        "temp_max": 295.37,
        "pressure": 1016,
        "humidity": 55
      },
      "visibility": 10000,
      "wind": {
        "speed": 4,
        "deg": 70
      },
      "clouds": {
        "all": 20
      },
      "dt": 1597928962,
      "id": 524901,
      "name": "Moscow"
    },
    {
      "coord": {
        "lon": 30.52,
        "lat": 50.43
      },
      "sys": {
        "country": "UA",
        "timezone": 10800,
        "sunrise": 1597892074,
        "sunset": 1597943297
      },
      "weather": [
        {
          "id": 802,
          "main": "Clouds",
          "description": "scattered clouds",
          "icon": "03d"
        }
      ],
      "main": {
        "temp": 304.7,
        "feels_like": 302.11,
        "temp_min": 304.15,
        "temp_max": 306.15,
        "pressure": 1007,
        "humidity": 23
      },
      "visibility": 10000,
      "wind": {
        "speed": 3,
        "deg": 150
      },
      "clouds": {
        "all": 50
      },
      "dt": 1597928982,
      "id": 703448,
      "name": "Kyiv"
    },
    {
      "coord": {
        "lon": -0.13,
        "lat": 51.51
      },
      "sys": {
        "country": "GB",
        "timezone": 3600,
        "sunrise": 1597899281,
        "sunset": 1597950800
      },
      "weather": [
        {
          "id": 801,
          "main": "Clouds",
          "description": "few clouds",
          "icon": "02d"
        }
      ],
      "main": {
        "temp": 298.02,
        "feels_like": 295.2,
        "temp_min": 297.04,
        "temp_max": 298.71,
        "pressure": 1004,
        "humidity": 50
      },
      "visibility": 10000,
      "wind": {
        "speed": 5.7,
        "deg": 220
      },
      "clouds": {
        "all": 20
      },
      "dt": 1597929061,
      "id": 2643743,
      "name": "London"
    }
  ]
  }
                      
                    
Please note that a single City ID counts as one API call. So, the above example is treated as a 3 API calls.

Bulk downloading

We provide number of bulk files with current weather and forecasts. The service allows you to regularly download current weather and forecast data in JSON format. There is no need to call an API to do this.

More information is on the Bulk 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 response
                          
{
  "coord": {
    "lon": -122.08,
    "lat": 37.39
  },
  "weather": [
    {
      "id": 800,
      "main": "Clear",
      "description": "clear sky",
      "icon": "01d"
    }
  ],
  "base": "stations",
  "main": {
    "temp": 282.55,
    "feels_like": 281.86,
    "temp_min": 280.37,
    "temp_max": 284.26,
    "pressure": 1023,
    "humidity": 100
  },
  "visibility": 16093,
  "wind": {
    "speed": 1.5,
    "deg": 350
  },
  "clouds": {
    "all": 1
  },
  "dt": 1560350645,
  "sys": {
    "type": 1,
    "id": 5122,
    "message": 0.0139,
    "country": "US",
    "sunrise": 1560343627,
    "sunset": 1560396563
  },
  "timezone": -25200,
  "id": 420006353,
  "name": "Mountain View",
  "cod": 200
  }                         
                        

Fields in API response

  • coord
    • coord.lon City geo location, longitude
    • coord.lat City geo location, latitude
  • weather (more info Weather condition codes)
    • weather.id Weather condition id
    • weather.main Group of weather parameters (Rain, Snow, Extreme etc.)
    • weather.description Weather condition within the group. You can get the output in your language. Learn more
    • weather.icon Weather icon id
  • base Internal parameter
  • main
    • main.temp Temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • main.feels_like Temperature. This temperature parameter accounts for the human perception of weather. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • main.pressure Atmospheric pressure (on the sea level, if there is no sea_level or grnd_level data), hPa
    • main.humidity Humidity, %
    • main.temp_min Minimum temperature at the moment. This is minimal currently observed temperature (within large megalopolises and urban areas). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • main.temp_max Maximum temperature at the moment. This is maximal currently observed temperature (within large megalopolises and urban areas). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.
    • main.sea_level Atmospheric pressure on the sea level, hPa
    • main.grnd_level Atmospheric pressure on the ground level, hPa
  • wind
    • wind.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.
    • wind.deg Wind direction, degrees (meteorological)
    • wind.gust Wind gust. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour
  • clouds
    • clouds.all Cloudiness, %
  • rain
    • rain.1h Rain volume for the last 1 hour, mm
    • rain.3h Rain volume for the last 3 hours, mm
  • snow
    • snow.1h Snow volume for the last 1 hour, mm
    • snow.3h Snow volume for the last 3 hours, mm
  • dt Time of data calculation, unix, UTC
  • sys
    • sys.type Internal parameter
    • sys.id Internal parameter
    • sys.message Internal parameter
    • sys.country Country code (GB, JP etc.)
    • sys.sunrise Sunrise time, unix, UTC
    • sys.sunset Sunset time, unix, UTC
  • timezone Shift in seconds from UTC
  • id City ID
  • name City name
  • cod Internal parameter

XML

Example of API response
                          
  <current>
  <city id="0" name="Mountain View">
    <coord lon="-122.09" lat="37.39" />
    <country>US</country>
    <timezone>-28800</timezone>
    <sun rise="2020-01-07T15:22:59" set="2020-01-08T01:05:37" />
  </city>
  <temperature value="278.07" min="273.15" max="282.59" unit="kelvin" />
  <feels_like value="275.88" unit="kelvin" />
  <humidity value="86" unit="%" />
  <pressure value="1026" unit="hPa" />
  <wind>
    <speed value="0.93" unit="m/s" name="Calm" />
    <gusts />
    <direction value="23" code="NNE" name="North-northeast" />
  </wind>
  <clouds value="1" name="clear sky" />
  <visibility value="16093" />
  <precipitation mode="no" />
  <weather number="800" value="clear sky" icon="01n" />
  <lastupdate value="2020-01-07T11:33:40" />
  </current>
  
  
Parameters:
  • city
    • city.id City ID
    • city.name City name
    • city.coord
      • city.coord.lon City geo location, longitude
      • city.coord.lat City geo location, latitude
    • city.country Country code (GB, JP etc.)
    • timezoneShift in seconds from UTC
    • city.sun
      • city.sun.rise Sunrise time
      • city.sun.set Sunset time
  • temperature
    • temperature.value Temperature
    • temperature.min Minimum temperature at the moment of calculation. This is minimal currently observed temperature (within large megalopolises and urban areas), use this parameter optionally.
    • temperature.max Maximum temperature at the moment of calculation. This is maximal currently observed temperature (within large megalopolises and urban areas), use this parameter optionally.
    • temperature.unit Unit of measurements. Possilbe valure is Celsius, Kelvin, Fahrenheit.
  • feels_like
    • feels_like.value Temperature. This temperature parameter accounts for the human perception of weather.
    • feels_like.unit Unit of measurements. Possilbe valure is Celsius, Kelvin, Fahrenheit. Unit Default: Kelvin
  • humidity
    • humidity.value Humidity value
    • humidity.unit Humidity units, %
  • pressure
    • pressure.value Pressure value
    • pressure.unit Pressure units, hPa
  • wind
    • wind.speed
      • wind.speed.value Wind speed
      • wind.speed.unit Wind speed units, m/s
      • wind.speed.name Type of the wind
    • wind.direction
      • wind.direction.value Wind direction, degrees (meteorological)
      • wind.direction.code Code of the wind direction. Possilbe value is WSW, N, S etc.
      • wind.direction.name Full name of the wind direction.
  • clouds
    • clouds.value Cloudiness
    • clouds.name Name of the cloudiness
  • visibility
    • visibility.value Visibility, meter
  • precipitation
    • precipitation.value Precipitation, mm
    • precipitation.mode Possible values are 'no", name of weather phenomena as 'rain', 'snow'
  • weather
    • weather.number Weather condition id
    • weather.value Weather condition name
    • weather.icon Weather icon id
  • lastupdate
    • lastupdate.value Last time when data was updated

List of weather 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 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 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.
  • In 16 Day forecast - min and max mean maximum and minimum temperature in the day.

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 look at 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

Response format. JSON format is used by default. To get data in XML format just set up mode = xml.

Parameters
mode optional Response format. Possible values are xml and html. If you don't use the mode parameter format is JSON by default.

Example 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
                           
                        

Units of measurement

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

Parameters
units optional standard, metric, imperial. When you do not use the units parameter, format is standard by default.

Temperature is available in Fahrenheit, Celsius and Kelvin units.

  • For temperature in Fahrenheit use units=imperial
  • For temperature in Celsius use units=metric
  • Temperature in Kelvin is used by default, no need to use units parameter in API call

List of all API parameters with units openweathermap.org/weather-data

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 the 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/weather?id=524901&appid={API key}&lang={lang}
Parameters
lang optional Language code

Examples of API calls

http://api.openweathermap.org/data/2.5/weather?id=524901&lang=fr&appid={API key}
                      

  {
  "coord": {
    "lon": 37.62,
    "lat": 55.75
  },
  "weather": [
    {
      "id": 501,
      "main": "Rain",
      "description": "pluie modérée",
      "icon": "10d"
    }
  ],
  "base": "stations",
  "main": {
    "temp": 295.48,
    "feels_like": 295.41,
    "temp_min": 295.15,
    "temp_max": 296.15,
    "pressure": 1018,
    "humidity": 60
  },
  "visibility": 10000,
  "wind": {
    "speed": 2,
    "deg": 260
  },
  "rain": {
    "1h": 1.23
  },
  "clouds": {
    "all": 100
  },
  "dt": 1599492273,
  "sys": {
    "type": 1,
    "id": 9029,
    "country": "RU",
    "sunrise": 1599446791,
    "sunset": 1599494929
  },
  "timezone": 10800,
  "id": 524901,
  "name": "Moscou",
  "cod": 200
  }
                      
                    

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
      }
   )