Access current weather data for any location on Earth including over 200,000 cities! Current weather is frequently updated based on global models and data from more than 40,000 weather stations. Data is available in JSON, XML, or HTML format.
api.openweathermap.org/data/2.5/weather?q={city name}
api.openweathermap.org/data/2.5/weather?q={city name},{country code}
q city name and country code divided by comma, use ISO 3166 country codes
api.openweathermap.org/data/2.5/weather?q=London
api.openweathermap.org/data/2.5/weather?q=London,uk
You can call by city ID. API responds with exact result.
List of city ID city.list.json.gz can be downloaded here http://bulk.openweathermap.org/sample/
We recommend to call API by city ID to get unambiguous result for your city.
api.openweathermap.org/data/2.5/weather?id=2172797
api.openweathermap.org/data/2.5/weather?lat=35&lon=139
{"coord":{"lon":139,"lat":35},
"sys":{"country":"JP","sunrise":1369769524,"sunset":1369821049},
"weather":[{"id":804,"main":"clouds","description":"overcast clouds","icon":"04n"}],
"main":{"temp":289.5,"humidity":89,"pressure":1013,"temp_min":287.04,"temp_max":292.04},
"wind":{"speed":7.31,"deg":187.002},
"rain":{"3h":0},
"clouds":{"all":92},
"dt":1369824698,
"id":1851632,
"name":"Shuzenji",
"cod":200}
api.openweathermap.org/data/2.5/weather?zip=94040,us
zip zip code
{"coord":{"lon":-122.09,"lat":37.39},
"sys":{"type":3,"id":168940,"message":0.0297,"country":"US","sunrise":1427723751,"sunset":1427768967},
"weather":[{"id":800,"main":"Clear","description":"Sky is Clear","icon":"01n"}],
"base":"stations",
"main":{"temp":285.68,"humidity":74,"pressure":1016.8,"temp_min":284.82,"temp_max":286.48},
"wind":{"speed":0.96,"deg":285.001},
"clouds":{"all":0},
"dt":1427700245,
"id":0,
"name":"Mountain View",
"cod":200}
JSON returns the data from cities within the defined rectangle specified by the geographic coordinates.
bbox bounding box [lon-left,lat-bottom,lon-right,lat-top]
callback javascript functionName
cluster use server clustering of points. Possible values are [yes, no]
lang language [ru, en ... ]
JSON 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. The default number of cities is 10, the maximum is 50.
lat latitude
lon longitude
callback functionName for JSONP callback.
cluster use server clustering of points. Possible values are [yes, no]
lang language [en , ru ... ]
cnt number of cities around the point that should be returned
http://api.openweathermap.org/data/2.5/find?lat=55.5&lon=37.5&cnt=10
http://api.openweathermap.org/data/2.5/group?id=524901,703448,2643743&units=metric
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.
If you do not see some of the parameters in your API respond 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 respond.
{"coord":
{"lon":145.77,"lat":-16.92},
"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],
"base":"cmc stations",
"main":{"temp":293.25,"pressure":1019,"humidity":83,"temp_min":289.82,"temp_max":295.37},
"wind":{"speed":5.1,"deg":150},
"clouds":{"all":75},
"rain":{"3h":3},
"dt":1435658272,
"sys":{"type":1,"id":8166,"message":0.0166,"country":"AU","sunrise":1435610796,"sunset":1435650870},
"id":2172797,
"name":"Cairns",
"cod":200}
coord
coord.lon City geo location, longitudecoord.lat City geo location, latitudeweather (more info Weather condition codes)
weather.id Weather condition idweather.main Group of weather parameters (Rain, Snow, Extreme etc.)weather.description Weather condition within the groupweather.icon Weather icon idbase Internal parameter
main
main.temp Temperature. 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), hPamain.humidity Humidity, %main.temp_min Minimum temperature at the moment. This is deviation from current temp that is possible for large cities and megalopolises geographically expanded (use these parameter optionally). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.main.temp_max Maximum temperature at the moment. This is deviation from current temp that is possible for large cities and megalopolises geographically expanded (use these parameter optionally). Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit.main.sea_level Atmospheric pressure on the sea level, hPamain.grnd_level Atmospheric pressure on the ground level, hPawind
wind.speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour.wind.deg Wind direction, degrees (meteorological)clouds
clouds.all Cloudiness, %rain
rain.3h Rain volume for the last 3 hourssnow
snow.3h Snow volume for the last 3 hoursdt Time of data calculation, unix, UTC
sys
sys.type Internal parametersys.id Internal parametersys.message Internal parametersys.country Country code (GB, JP etc.)sys.sunrise Sunrise time, unix, UTCsys.sunset Sunset time, unix, UTCid City ID
name City name
cod Internal parameter
<current>
<city id="2643741" name="City of London">
<coord lon="-0.09" lat="51.51">
<country>GB</country>
<sun rise="2015-06-30T03:46:57" set="2015-06-30T20:21:12">
</city>
<temperature value="72.34" min="66.2" max="79.88" unit="fahrenheit"/>
<humidity value="43" unit="%">
<pressure value="1020" unit="hPa">
<wind>
<speed value="7.78" name="Moderate breeze">
<direction value="140" code="SE" name="SouthEast">
</wind>
<clouds value="0" name="clear sky">
<visibility value="10000">
<precipitation mode="no">
<weather number="800" value="Sky is Clear" icon="01d">
<lastupdate value="2015-06-30T08:36:14">
</current>
city
city.id City IDcity.name City namecity.coord
city.coord.lon City geo location, longitudecity.coord.lat City geo location, latitudecity.country Country code (GB, JP etc.)city.sun
city.sun.rise Sunrise timecity.sun.set Sunset timetemperature
temperature.value Temperaturetemperature.min Minimum temperature at the moment of calculation. This is deviation from 'temp' that is possible for large cities and megalopolises geographically expanded (use these parameter optionally).temperature.max Maximum temperature at the moment of calculation. This is deviation from 'temp' that is possible for large cities and megalopolises geographically expanded (use these parameter optionally).temperature.unit Unit of measurements. Possilbe valure is Celsius, Kelvin, Fahrenheit.humidity
humidity.value Humidity valuehumidity.unit %pressure
pressure.value Pressure valuepressure.unit hPawind
wind.speed
wind.speed.value Wind speed, mpswind.speed.name Type of the windwind.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 Cloudinessclouds.name Name of the cloudinessvisibility
visibility.value Visibility, meterprecipitation
precipitation.value Precipitation, mmprecipitation.mode Possible values are 'no", name of weather phenomena as 'rain', 'snow'weather
weather.number Weather condition idweather.value Weather condition nameweather.icon Weather icon idlastupdate
lastupdate.value Last time when data was updatedList of weather condition codes with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere including extreme conditions like tornado, hurricane etc.)
Please, do not confuse min/max parameters in current weather API and forecast API. In current weather 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.
"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
},
"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
JSON format is used by default. To get data in XML or HTML formats just set up mode = xml or html.
JSON api.openweathermap.org/data/2.5/weather?q=London
XML api.openweathermap.org/data/2.5/weather?q=London&mode=xml
HTML api.openweathermap.org/data/2.5/weather?q=London&mode=html
You can use our geocoding system to find cities by name, country, zip-code or geographic coordinates. You can call also by part of the city name. To make the result more accurate just put the city name and country divided by comma.
To set the accuracy level either use the 'accurate' or 'like' type parameter.
'accurate' returns exact match values. 'like' returns results by searching for
that substring.
like close result
accurate accurate result
Like api.openweathermap.org/data/2.5/find?q=London&type=like&mode=xml
Accurate api.openweathermap.org/data/2.5/find?q=London&type=accurate&mode=xml
Standard, metric, and imperial units are available.
units metric, imperial. When you do not use units parameter, format is Standard by default.
Temperature is available in Fahrenheit, Celsius and Kelvin units.
List of all API parameters with units openweathermap.org/weather-data
standard api.openweathermap.org/data/2.5/find?q=London
metric api.openweathermap.org/data/2.5/find?q=London&units=metric
imperial api.openweathermap.org/data/2.5/find?q=London&units=imperial
You can use lang parameter to get the output in your language. We support the following languages that you can use with the corresponded lang values:
English - en, Russian - ru, Italian - it, Spanish - es (or sp),
Ukrainian - uk (or ua), German - de, Portuguese - pt, Romanian - ro,
Polish - pl, Finnish - fi, Dutch - nl, French - fr,
Bulgarian - bg, Swedish - sv (or se), Chinese Traditional - zh_tw, Chinese Simplified - zh (or zh_cn),
Turkish - tr, Croatian - hr, Catalan - ca
To use JavaScript code you can transfer callback functionName to JSONP callback.