How to migrate from Dark Sky API to OpenWeather One Call API
With our One Call API you can easily migrate from the Dark Sky API and get free access to main weather data such as current weather, forecast and historical weather with only one call to the API.
Features of OpenWeather One Call API
-
One Call API is included in the Free subscription with 1,000 API calls per day. Many other products are available in the same Free subscription, such as Weather Maps, Weather Alerts, etc.
-
Essential weather data with one API call
One Call API provides you with the following weather data for any location:
- Current weather
- Minute forecast data for the next 1 hour
- Hourly forecast data for the next 48 hours
- Daily forecast data for the next 7 days
- Historical weather data for 5 previous days
- National weather alerts
-
Matching parameters of Dark Sky API and OpenWeather One Call API
To match Dark Sky API parameters to the equivalent OpenWeather One Call API parameters, please use this table.
How to start using One Call API
There are 3 simple steps:
-
You will receive a welcome email that contains endpoints and instructions.
-
Get API key
On the account page find the "API key" tab and get the API key. Please use your API key in each API call.
-
Call API
-
Getting current, minute, hourly and daily forecast weather data
https://api.openweathermap.org/data/2.5/onecall?lat={lat}&lon={lon}&appid={API key}
-
Getting historical weather data for 5 previous days
https://api.openweathermap.org/data/2.5/onecall/timemachine?lat={lat}&lon={lon}&dt={time}&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) |
dt |
optional | Date from the 5 previous days (unix time, UTC time zone), e.g. dt=1586468027 |
Matching parameters
One Call API | Dark Sky API | Description |
---|---|---|
timezone |
timezone |
Time zone name of the requested location |
Current weather (parameters of current weather and historical weather are the same) |
||
dt |
time |
UTC time zone |
sunrise |
sunriseTime |
Sunrise time, unix, UTC |
sunset |
sunsetTime |
Sunset time, unix, UTC |
temp |
temperature |
Temperature. Unit Default: Kelvin. How to change units format |
feels_like |
apparentTemperature |
Feels like. Unit Default: Kelvin. How to change units format |
pressure |
pressure |
Atmospheric pressure on the sea level, hPa |
humidity |
humidity |
Humidity, % |
dew_point |
dewPoint |
Dew point. Unit Default: Kelvin. How to change units format |
clouds |
cloudCover |
Cloudiness, % |
wind_speed |
windSpeed |
Wind speed. Unit Default: meter/sec. How to change units format |
wind_gust |
windGust |
Wind gust. Unit Default: meter/sec. How to change units format |
wind_deg |
windBearing |
Wind direction, degrees (meteorological) |
weather.description |
summary |
Weather condition within the group. Full list of weather conditions You can get the output in your language. Learn more |
weather.icon |
icon |
Weather icon id. How to get icons |
rain |
precipIntensity |
Precipitation volume, mm |
snow |
precipIntensity |
Snow volume, mm |
uvi |
uvIndex |
UV index |
visibility |
visibility |
Average visibility, meters |
Minute forecast for 1 hour | ||
dt |
time |
Time of forecasted data, unix, UTC |
precipitation |
precipIntensity |
Precipitation volume, mm |
Hourly forecast for 48 hours (parameters of hourly forecast and historical weather are the same) |
||
dt |
time |
Time of forecasted data, unix, UTC |
temp |
temperature |
Temperature. Unit Default: Kelvin. How to change units format |
feels_like |
apparentTemperature |
Feels like. Unit Default: Kelvin. How to change units format |
pressure |
pressure |
Atmospheric pressure on the sea level, hPa |
humidity |
humidity |
Humidity, % |
dew_point |
dewPoint |
Dew point. Unit Default: Kelvin. How to change units format |
clouds |
cloudCover |
Cloudiness, % |
wind_speed |
windSpeed |
Wind speed. Unit Default: meter/sec. How to change units format |
wind_gust |
windGust |
Wind gust. Unit Default: meter/sec. How to change units format |
wind_deg |
windBearing |
Wind direction, degrees (meteorological) |
weather.description |
summary |
Weather condition within the group. Full list of weather conditions You can get the output in your language. Learn more |
weather.icon |
icon |
Weather icon id. How to get icons |
rain |
precipIntensity |
Precipitation volume, mm |
snow |
precipIntensity |
Snow volume, mm |
visibility |
visibility |
Average visibility, meters |
Daily forecast for 7 days | ||
dt |
time |
Time of data forecasted, unix, UTC |
sunrise |
sunriseTime |
Sunrise time, unix, UTC |
sunset |
sunsetTime |
Sunset time, unix, UTC |
temp.day |
temperatureHigh |
Day temperature. Unit Default: Kelvin. How to change units format |
temp.night |
temperatureLow |
Night temperature. Unit Default: Kelvin. How to change units format |
temp.morn |
- | Morning temperature. Unit Default: Kelvin. How to change units format |
temp.eve |
- | Evening temperature. Unit Default: Kelvin. How to change units format |
temp.min |
temperatureMin |
Unit Default: Kelvin. How to change units format |
temp.max |
temperatureMax |
Unit Default: Kelvin. How to change units format |
feels_like.day |
apparentTemperatureHigh |
Unit Default: Kelvin. How to change units format |
feels_like.night |
apparentTemperatureLow |
Unit Default: Kelvin. How to change units format |
feels_like.morn |
- | Unit Default: Kelvin. How to change units format |
feels_like.eve |
- | Unit Default: Kelvin. How to change units format |
pressure |
pressure |
Atmospheric pressure on the sea level, hPa |
humidity |
humidity |
Humidity, % |
dew_point |
dewPoint |
Unit Default: Kelvin. How to change units format |
clouds |
cloudCover |
Cloudiness, % |
wind_speed |
windSpeed |
Wind speed. Unit Default: meter/sec. How to change units format |
wind_gust |
windGust |
Wind gust. Unit Default: meter/sec. How to change units format |
wind_deg |
windBearing |
Wind direction, degrees (meteorological) |
weather.description |
summary |
Weather condition within the group. Full list of weather conditions You can get the output in your language. Learn more |
weather.icon |
icon |
Weather icon id. How to get icons |
rain |
precipIntensity |
Precipitation volume, mm |
snow |
precipIntensity |
Snow volume, mm |
uvi |
uvIndex |
UV index |
visibility |
visibility |
Average visibility, meters |