One Call API 2.5
One Call API 2.5
The One Call API 2.5 has been deprecated on June 2024. Please read the detailed guide for transitioning to the more advanced One Call API 3.0 which includes several useful upgrades like 47+ years of history archive, daily aggregation and human-readable daily summary in comparison with the One Call API 2.5 version. Read more about One Call API 3.0 on the product documentation page and FAQ.
Make just one API call and get all your essential weather data for a specific location with our new OpenWeather One Call API 2.5. Easy migration from the Dark Sky API.
The One Call API 2.5 provides the following weather data for any geographical coordinates:
Current and forecast weather data
To get access to current weather, minute forecast for 1 hour, hourly forecast for 48 hours, daily forecast for 7 days and government weather alerts, please use this section of the documentation.
If you are interested in historical weather data, please read the "Historical weather data" section.
https://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&exclude={part}&appid={API key}Parameters | ||
|---|---|---|
| required | Geographical coordinates (latitude, longitude) |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | By using this parameter you can exclude some parts of the weather data from the API response. It should be a comma-delimited list (without spaces). Available values: |
| optional | Units of measurement. |
| optional | You can use the |
https://api.openweathermap.org/data/2.5/onecall?lat=33.44&lon=-94.04&exclude=hourly,daily&appid={API key}To view the API response, expand the example by clicking the triangle.lat Geographical coordinates of the location (latitude)lon Geographical coordinates of the location (longitude)timezone Timezone name for the requested locationtimezone_offset Shift in seconds from UTCcurrent Current weather data API responsecurrent.dt Current time, Unix, UTCcurrent.sunrise Sunrise time, Unix, UTCcurrent.sunset Sunset time, Unix, UTCcurrent.temp Temperature. Units - default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units usedcurrent.feels_like Temperature. This temperature parameter accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.current.pressure Atmospheric pressure on the sea level, hPacurrent.humidity Humidity, %current.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.current.clouds Cloudiness, %current.uvi Current UV indexcurrent.visibility Average visibility, metres. The maximum value of the visibility is 10kmcurrent.wind_speed Wind speed. Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedcurrent.wind_gust (where available) Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedcurrent.wind_deg Wind direction, degrees (meteorological)current.raincurrent.rain.1h (where available) Rain, mm/hcurrent.snowcurrent.snow.1h (where available) Precipitation, mm/hcurrent.weathercurrent.weather.id Weather condition idcurrent.weather.main Group of weather parameters (Rain, Snow, Extreme etc.)current.weather.description Weather condition within the group (full list of weather conditions). Get the output in your languagecurrent.weather.icon Weather icon id. How to get iconsminutely Minute forecast weather data API responseminutely.dt Time of the forecasted data, unix, UTCminutely.precipitation Precipitation, mm/hhourly Hourly forecast weather data API responsehourly.dt Time of the forecasted data, Unix, UTChourly.temp Temperature. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units usedhourly.feels_like Temperature. This accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.hourly.pressure Atmospheric pressure on the sea level, hPahourly.humidity Humidity, %hourly.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.hourly.uvi UV indexhourly.clouds Cloudiness, %hourly.visibility Average visibility, metres. The maximum value of the visibility is 10kmhourly.wind_speed Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour.How to change units usedhourly.wind_gust (where available) Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedchourly.wind_deg Wind direction, degrees (meteorological)hourly.pop Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%hourly.rainhourly.rain.1h (where available) Rain, mm/hhourly.snowhourly.snow.1h (where available) Precipitation, mm/hhourly.weatherhourly.weather.id Weather condition idhourly.weather.main Group of weather parameters (Rain, Snow, Extreme etc.)hourly.weather.description Weather condition within the group (full list of weather conditions). Get the output in your languagehourly.weather.icon Weather icon id. How to get iconsdaily Daily forecast weather data API responsedaily.dt Time of the forecasted data, Unix, UTCdaily.sunrise Sunrise time, Unix, UTCdaily.sunset Sunset time, Unix, UTCdaily.moonrise The time of when the moon rises for this day, Unix, UTCdaily.moonset The time of when the moon sets for this day, Unix, UTCdaily.moon_phase Moon phase. 0 and 1 are 'new moon', 0.25 is 'first quarter moon', 0.5 is 'full moon' and 0.75 is 'last quarter moon'. The periods in between are called 'waxing crescent', 'waxing gibous', 'waning gibous', and 'waning crescent', respectively.daily.temp Units – default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units useddaily.temp.morn Morning temperature.daily.temp.day Day temperature.daily.temp.eve Evening temperature.daily.temp.night Night temperature.daily.temp.min Min daily temperature.daily.temp.max Max daily temperature.daily.feels_like This accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units useddaily.feels_like.morn Morning temperature.daily.feels_like.day Day temperature.daily.feels_like.eve Evening temperature.daily.feels_like.night Night temperature.daily.pressure Atmospheric pressure on the sea level, hPadaily.humidity Humidity, %daily.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.daily.wind_speed Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units useddaily.wind_gust (where available) Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units useddaily.wind_deg Wind direction, degrees (meteorological)daily.clouds Cloudiness, %daily.uvi The maximum value of UV index for the daydaily.pop Probability of precipitation. The values of the parameter vary between 0 and 1, where 0 is equal to 0%, 1 is equal to 100%daily.rain (where available) Rain volume, mmdaily.snow (where available) Snow volume, mmdaily.weatherdaily.weather.id Weather condition iddaily.weather.main Group of weather parameters (Rain, Snow, Extreme etc.)daily.weather.description Weather condition within the group (full list of weather conditions). Get the output in your languagedaily.weather.icon Weather icon id. How to get iconsalerts National weather alerts data from major national weather warning systemsalerts.sender_name Name of the alert source. Please read here the full list of alert sourcesalerts.event Alert event namealerts.start Date and time of the start of the alert, Unix, UTCalerts.end Date and time of the end of the alert, Unix, UTCalerts.description Description of the alertalerts.tags Type of severe weatherNational weather alerts are provided in English by default. Please note that some agencies provide the alert’s description only in a local language.
Historical weather data
To learn about how get access to historical weather data for the previous 5 days, please use this section of the documentation.
If you are interested in current weather data, forecasts and weather alerts please read the "Current and forecast weather data" section.
https://api.openweathermap.org/data/2.5/onecall/timemachine?lat={lat}&lon={lon}&dt={time}&appid={API key}Parameters | ||
|---|---|---|
| required | Geographical coordinates (latitude, longitude) |
| required | Date from the previous five days (Unix time, UTC time zone), e.g. dt=1586468027 |
| required | Your unique API key (you can always find it on your account page under the "API key" tab) |
| optional | By using this parameter you can exclude full historical weather data for the specified day, but received the data for only the specified timestamp. If the user specifies this parameter, then the API response will contain only the |
| optional | Units of measurement. |
| optional | You can use the |
Please note that in order to get historical data for the last five days, you need to make five API calls (one call for each day).
In case you need historical data only for the specified timestamp (not the whole day), we strongly recommend you to use the parameter only_current={true}.
Example of the API call to get all historical weather data for a day, covered by specified timestamp:
http://api.openweathermap.org/data/2.5/onecall/timemachine?lat=60.99&lon=30.9&dt=1586468027&appid={API key}Example of the API call to get historical weather data only for the specified timestamp:
https://api.openweathermap.org/data/2.5/onecall/timemachine?lat=60&lon=30&dt=1650445666&appid={API key}&only_current={true}To view the API response, expand the example by clicking the triangle.To view the API response, expand the example by clicking the triangle.lat Geographical coordinates of the location (latitude)lon Geographical coordinates of the location (longitude)timezone Timezone name for the requested locationtimezone_offset Shift in seconds from UTCcurrent Data point dt refers to the requested time, rather than the current timecurrent.dt Requested time, Unix, UTCcurrent.sunrise Sunrise time, Unix, UTCcurrent.sunset Sunset time, Unix, UTCcurrent.temp Temperature. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units usedcurrent.feels_like Temperature. This accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.current.pressure Atmospheric pressure on the sea level, hPacurrent.humidity Humidity, %current.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.current.clouds Cloudiness, %current.uvi Midday UV indexcurrent.visibility Average visibility, metres. The maximum value of the visibility is 10kmcurrent.wind_speed Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedcurrent.wind_gust (where available) Wind gust. Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedcurrent.wind_deg Wind direction, degrees (meteorological)current.rain (where available) Precipitation, mm/hcurrent.snow (where available) Precipitation, mm/hcurrent.weathercurrent.weather.id Weather condition idcurrent.weather.main Group of weather parameters (Rain, Snow, Extreme etc.)current.weather.description Weather condition within the group (full list of weather conditions). Get the output in your languagecurrent.weather.icon Weather icon id. How to get iconshourly Data block contains hourly historical data starting at 00:00 on the requested day and continues until 23:59 on the same day (UTC time)hourly.dt Time of historical data, Unix, UTChourly.temp Temperature. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit. How to change units usedhourly.feels_like Temperature. This accounts for the human perception of weather. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.hourly.pressure Atmospheric pressure on the sea level, hPahourly.humidity Humidity, %hourly.dew_point Atmospheric temperature (varying according to pressure and humidity) below which water droplets begin to condense and dew can form. Units – default: kelvin, metric: Celsius, imperial: Fahrenheit.hourly.clouds Cloudiness, %hourly.visibility Average visibility, metres. The maximum value of the visibility is 10kmhourly.wind_speed Wind speed. Wind speed. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedhourly.wind_gust (where available) Wind gust. Units – default: metre/sec, metric: metre/sec, imperial: miles/hour. How to change units usedchourly.wind_deg Wind direction, degrees (meteorological)hourly.rain (where available) Precipitation, mm/hhourly.snow (where available) Precipitation, mm/hhourly.weatherhourly.weather.id Weather condition idhourly.weather.main Group of weather parameters (Rain, Snow, Extreme etc.)hourly.weather.description Weather condition within the group (full list of weather conditions). Get the output in your languagehourly.weather.icon Weather icon id. How to get iconsList of weather condition codes with icons (range of thunderstorm, drizzle, rain, snow, clouds, atmosphere including extreme conditions like tornado, hurricane etc.)
Other features
standard, metric and imperial units are available.
Parameter | Description | Standard | Metric | Imperial |
|---|---|---|---|---|
| City geo location, latitude | - | - | - |
| City geo location, longitude | - | - | - |
| Timezone name for the requested location | - | - | - |
| Shift in seconds from UTC | - | - | - |
Current weather | ||||
| Current time | unix, UTC | unix, UTC | unix, UTC |
| Sunrise time | unix, UTC | unix, UTC | unix, UTC |
| Sunset time | unix, UTC | unix, UTC | unix, UTC |
| Temperature | Kelvin | Celsius | Fahrenheit |
| Feels like temperature | Kelvin | Celsius | Fahrenheit |
| Humidity | % | % | % |
| Atmospheric pressure on the sea level | hPa | hPa | hPa |
| Atmospheric temperature below which water droplets begin to condense and dew can form | Kelvin | Celsius | Fahrenheit |
| Cloudiness | % | % | % |
| UV index | - | - | - |
| Average visibility | Metres | Metres | Metres |
| Wind speed | metre/sec | metre/sec | miles/hour |
| Wind gust | metre/sec | metre/sec | miles/hour |
| Wind direction | degrees (meteorological) | degrees (meteorological) | degrees (meteorological) |
| Rain | mm/h | mm/h | mm/h |
| Snow | mm/h | mm/h | mm/h |
| ||||
| Weather condition id | - | - | - |
| Group of weather parameters (Rain, Snow, Extreme etc.) | - | - | - |
| Weather condition within the group | - | - | - |
| Weather icon id | - | - | - |
Minute forecast | ||||
| Current time | unix, UTC | unix, UTC | unix, UTC |
| Precipitation | mm/h | mm/h | mm/h |
Hourly forecast | ||||
| Time of the forecasted data | unix, UTC | unix, UTC | unix, UTC |
| Temperature | Kelvin | Celsius | Fahrenheit |
| Feels like temperature | Kelvin | Celsius | Fahrenheit |
| Atmospheric pressure on the sea level | hPa | hPa | hPa |
| Humidity | % | % | % |
| Atmospheric temperature below which water droplets begin to condense and dew can form | Kelvin | Celsius | Fahrenheit |
| Cloudiness | % | % | % |
| UV index | - | - | - |
| Average visibility | Metres | Metres | Metres |
| Wind speed | metre/sec | metre/sec | miles/hour |
| Wind gust | metre/sec | metre/sec | miles/hour |
| Wind direction | degrees (meteorological) | degrees (meteorological) | degrees (meteorological) |
| Probability of precipitation | % | % | % |
| Rain | mm/h | mm/h | mm/h |
| Snow | mm/h | mm/h | mm/h |
| ||||
| Weather condition id | - | - | - |
| Group of weather parameters (Rain, Snow, Extreme etc.) | - | - | - |
| Weather condition within the group | - | - | - |
| Weather icon id | - | - | - |
Daily forecast | ||||
| Time of the forecasted data | unix, UTC | unix, UTC | unix, UTC |
| Sunrise time | unix, UTC | unix, UTC | unix, UTC |
| Sunset time | unix, UTC | unix, UTC | unix, UTC |
| The time of when the moon rises for this day | unix, UTC | unix, UTC | unix, UTC |
| The time of when the moon sets for this day | unix, UTC | unix, UTC | unix, UTC |
| Moon phase | - | - | - |
| ||||
| Morning temperature | Kelvin | Celsius | Fahrenheit |
| Day temperature | Kelvin | Celsius | Fahrenheit |
| Evening temperature | Kelvin | Celsius | Fahrenheit |
| Night temperature | Kelvin | Celsius | Fahrenheit |
| Min daily temperature | Kelvin | Celsius | Fahrenheit |
| Max daily temperature | Kelvin | Celsius | Fahrenheit |
| ||||
| Morning temperature | Kelvin | Celsius | Fahrenheit |
| Day temperature | Kelvin | Celsius | Fahrenheit |
| Evening temperature | Kelvin | Celsius | Fahrenheit |
| Night temperature | Kelvin | Celsius | Fahrenheit |
| Atmospheric pressure on the sea level | hPa | hPa | hPa |
| Humidity | % | % | % |
| Atmospheric temperature below which water droplets begin to condense and dew can form | Kelvin | Celsius | Fahrenheit |
| Cloudiness | % | % | % |
| UV index | - | - | - |
| Average visibility | Metres | Metres | Metres |
| Wind speed | metre/sec | metre/sec | miles/hour |
| Wind gust | metre/sec | metre/sec | miles/hour |
| Wind direction | degrees (meteorological) | degrees (meteorological) | degrees (meteorological) |
| Probability of precipitation | % | % | % |
| Rain | mm | mm | mm |
| Snow | mm | mm | mm |
| ||||
| Weather condition id | - | - | - |
| Group of weather parameters (Rain, Snow, Extreme etc.) | - | - | - |
| Weather condition within the group | - | - | - |
| Weather icon id | - | - | - |
Alerts | ||||
| Name of the alert source | - | - | - |
| Alert event name | - | - | - |
| Date and time of the start of the alert | unix, UTC | unix, UTC | unix, UTC |
| Date and time of the end of the alert | unix, UTC | unix, UTC | unix, UTC |
| Description of the alert | - | - | - |
| Type of severe weather | - | - | - |
http://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&units={units}Parameters | ||
|---|---|---|
| optional | Units of measurement. |
Wind speed is available in miles/hour and metre/sec.
Standard (default)
api.openweathermap.org/data/2.5/onecall?lat=30.489772&lon=-99.771335Metric
api.openweathermap.org/data/2.5/onecall?lat=30.489772&lon=-99.771335&units=metricImperial
api.openweathermap.org/data/2.5/onecall?lat=30.489772&lon=-99.771335&units=imperialYou can use lang parameter to get the output in your language.
The contents of the description field will be translated.
http://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&lang={lang}Parameters | ||
|---|---|---|
| optional | You can use the |
http://api.openweathermap.org/data/2.5/onecall?lat=30.489772&lon=-99.771335&lang=zh_cnWe support the following languages. To select one, you can use the corresponding language code:
af Afrikaansal Albanianar Arabicaz Azerbaijanibg Bulgarianca Catalancz Czechda Danishde Germanel Greeken Englisheu Basquefa Persian (Farsi)fi Finnishfr Frenchgl Galicianhe Hebrewhi Hindihr Croatianhu Hungarianid Indonesianit Italianja Japanesekr Koreanla Latvianlt Lithuanianmk Macedonianno Norwegiannl Dutchpl Polishpt Portuguesept_br Português Brasilro Romanianru Russiansv, se Swedishsk Slovaksl Sloveniansp, es Spanishsr Serbianth Thaitr Turkishua, uk Ukrainianvi Vietnamesezh_cn Chinese Simplifiedzh_tw Chinese Traditionalzu ZuluCountry | Agency |
|---|---|
Afghanistan | National Disaster Management Authority |
Albania | Institute of GeoSciences, Energy, Water and Environment |
Algeria | National Meteorological Office |
Anguilla | Disaster Management Anguilla |
Antigua and Barbuda | Meteorological Services |
Argentina | Servicio Meteorologico Nacional |
Aruba | Meteorological Department of Aruba |
Austria | Central Institute for Meteorology and Geodynamics Water Balance Department |
Barbados | Department of Emergency Management |
Belgium | Royal Meteorological Institute |
Bosnia and Herzegovin | Federal Hydrometeorological Institute of BiH Republic Hydrometeorological Institute |
Botswana | Department of Meteorological Services |
Brazil | National Meteorological Institute - INMET |
Bulgaria | National Institute of Meteorology and Hydrology - Plovdiv branch |
Canada | Alberta Emergency Management Agency (Government of Alberta, Ministry of Municipal Affairs) Meteorological Service of Canada Quebec Ministry of Public Safety |
Colombia | UNGRD (National Unit for Disaster Risk Management) |
Croatia | State Hydrometeorological Institute (DHMZ) |
Cyprus | Meteorological Service |
Czech Republic | Czech Hydrometeorological Institute |
Denmark | Danmarks Meteorologiske Instituts |
Estonia | State Weather Service |
Federated States of Micronesia | Weather Service Office Chuuk Weather Service Office Pohnpei Weather Service Office Yap |
Finland | Finnish Meteorological Institute |
France | Meteo-France |
Germany | German Meteorological Office |
Greece | Hellenic National Meteorological Service |
Guyana | Hydrometeorological Service |
Hungary | Hungarian Meteorological Service |
Iceland | Icelandic Meteorological Office |
India | Meteorological Department |
Indonesia | Agency for Meteorology Climatology and Geophysics of Republic Indonesia (BMKG) InaTEWS BMKG, Earthquake with magnitude 5.0 above |
Ireland | Met Eireann - Irish Meteorological Service |
Israel | Meteorological Service |
Italy | National Center of Meteorology and Aeronautical Climatology (CNMCA) |
Jamaica | Meteorological Service |
Kenya | Meteorological Department |
Kuwait | Meteorological Department |
Latvia | Latvian Environment, Geology and Meteorology Center |
Lithuania | Lithuanian Hydrometeorological Service |
Luxembourg | Luxembourg Airport Administration |
Madagascar | Operational Meteorology |
Malawi | Meteorological Services |
Malta | Meteorological Office |
Marshall Islands | Majuro Weather Service Office |
Mexico | CONAGUA - National Meteorological Service of Mexico |
Moldova | State Hydrometeorological Service |
Mongolia | National Agency for Meteorology and Environmental Monitoring |
Montenegro | Institute of Hydrometeorology and Seismology |
Myanmar | Department of Meteorology and Hydrology |
Netherlands | Royal Netherlands Meteorological Institute |
New Zealand | GNS Science MetService National Emergency Management Agency |
North Macedonia | Republic Hydrometeorological Organization |
Norway | Norwegian Meteorological Institute Norwegian Water Resources and Energy Directorate |
Oman | Directorate General of Meteorology |
Palau | Weather Service Office |
Papua New Guinea | Papua New Guinea Meteorological Service |
Paraguay | Directorate of Meteorology and Hydrology |
Philippines | Philippine Atmospheric Geophysical and Astronomical Services Administration |
Poland | Institute of Meteorology and Water Management |
Portugal | Portuguese Institute of Sea and Atmosphere, I.P. |
Romania | National Meteorological Administration |
Russia | Russian Federal Service for Hydrometeorology and Environmental Monitoring |
Saint Lucia | Meteorological Services |
Saint Vincent and the Grenadines | Meteorological Services |
Samoa | Meteorology Division |
Senegal | National Agency of Civil Aviation and Meteorology |
Serbia | Republic Hydrometeorological Institute |
Slovakia | Slovak Hydrometeorological Institute |
Slovenia | National Meteorological Service |
Solomon Islands | Meteorological Service |
South Africa | South Africa Weather Service |
Spain | Meteorology Statal Agency |
Suriname | Suriname Meteorological Service |
Sweden | Swedish Meteorological and Hydrological Institute |
Switzerland | MeteoSwiss, Bundesamt für Meteorologie und Klimatologie |
Tanzania | Meteorological Authority |
Thailand | Thai Meteorological Department |
Tonga | Tonga Meteorological Service |
Trinidad and Tobago | Trinidad and Tobago Meteorological Service |
United Kingdom of Great Britain and Northern Ireland | Met Office |
United States | Environmental Protection Agency (EPA), Air Quality Alerts Integrated Public Alerrt and Warning System (IPAWS) National Oceanic and Atmospheric Administration (NOAA), National Tsunami Warning Center National Oceanic and Atmospheric Administration (NOAA), National Weather Service National Oceanic and Atmospheric Administration (NOAA), National Weather Service - Marine Zones U.S. Geological Survey (USGS), Volcano Hazard Program |
Vanuatu | Meteorological Services |
Zimbabwe | Meteorological Services Department |
Please note that some agencies from the list may cease to provide us the weather alert information. In case you don’t receive alerts from any agency, please contact us. We constantly work on our product’s improvement and keep expanding the list of partner agencies.
To use JavaScript code you can transfer callback functionName to JSONP callback.
To view the API response, expand the example by clicking the triangle.