In this post, we’re going to review two popular weather service APIs:
Dark Sky vs OpenWeatherMap.
For each API, we’re going to look at:
- API Endpoints
- API Stats
- Pricing
- Unique Features
Make sure to read this entire API showdown until the very end. That way, you can ensure that you make the right decision when choosing a weather service.
The Weather APIs
Before I get into the review itself, I want to quickly let you know some important info on each API.
Dark Sky
Let’s start with the Dark Sky API.
Some key features of the API that make it a top-tier weather API include:
- Forecasts and current conditions
- Global coverage
- Historical data
- Severe weather alerts
OpenWeatherMap
On the other side, we have the OpenWeatherMap API.
- Current weather data
- Hourly forecast
- 16 day / daily forecast
- Climate forecast for 30 days
- Bulk downloading
- 5 day / 3-hour forecast data
- and much more
Which API is best for Real-Time Weather Data?
First, we decided to see which API was better for getting accurate real-time data.
Let’s see who comes out on top.
Dark Sky
We’ll start with the Dark Sky API.
To get the current weather conditions, Dark Sky offers a GET endpoint called Forecast, which returns:
the current weather conditions, a minute-by-minute forecast for the next hour (where available), an hour-by-hour forecast for the next 48 hours, and a day-by-day forecast for the next week.
Optionally, we can specify which measurement of units we’d like the stats to be returned in. See more details here.
Let’s see how San Francisco is doing.
- time
- summary
- precipitation
- temperature
- dewpoint
- humidity
- wind
- UV index
- visibility
- ozone
- and more
but the endpoint also provides forecast:
- minutely
- hourly
- and daily
Let’s compare this to what Google thinks:
Google vs Dark Sky Current Weather Comparison
Dark Sky | ||
---|---|---|
Temperature | 59°C | 59.07°C |
Humidity | 61% | 59% |
Wind | 10 MPH | 12.17 MPH (converted from 5.44 Meters per second) |
As you can see in the table above, the Dark Sky returns similar results to what we see from Google’s real-time weather estimates.
OpenWeatherMap
Now let’s see how OMW compares.
To begin, we’ll need to use the Current Weather Data endpoint.
We’ll try the API with the same lat/long coordinates we used with the Dark Sky API:
Not only does the OpenWeatherMap API provide the current temperature, but also what it “feels like.”
Along with temp, it also returns:
- visibility
- wind stats
- cloud data
- sunrise/sunset times
- and more
How does it compare to Dark Sky and Google?
Dark Sky | OpenWeatherMap (OMW) | ||
---|---|---|---|
Temperature | 59°C | 59.07°C | 62.02°C |
Humidity | 61% | 59% | 62% |
Wind | 10 MPH | 12.17 MPH (converted from 5.44 Meters per second) | 11.41 MPH |
As you can see here, OMW is comparable to Dark Sky and provides similar data.
When it comes to real-time/current weather data, it really depends on your preference. There are pros and cons to each one, but overall, I think OpenWeatherMap slightly takes the cake. Dark sky does provide a lot of data for any given latitude and longitude. But OpenWeatherMap provides slightly more data points such as the “feels like” temperature, cloud data, and more.
Which Service is better for Weather Forecasts?
Now let’s move onto weather forecasts.
We’ll start with Dark Sky again.
Dark Sky
To begin, we’ll be using the same API endpoint as before (GET Forecast).
This time, let’s look at the forecast data:
The Dark Sky Forecast endpoint provides a forecast by:
- minutes
- hours
- days
Let’s take a peek at each.
By the Minute
If you’re looking for really granular forecast data, Dark Sky provides a minute-by-minute forecast up to 60 minutes from the time you call this endpoint.
At a glance, you can see the forecast returns a summary of “Partly cloudy for the hour.”
For each minute, the response returns the:
- time
- precipitation intensity (Millimeters per hour)
- precipitation probability (between 0 and 1)
By the Hour
The hourly weather forecast is provided up to 48 hours from the current time.
As with the minutely response, the hourly forecast also provides a summary: “Mostly cloudy throughout the day.”
However, the hourly data is slightly more comprehensive:
- time
- summary
- precipitation data
- temperature
- dew point
- humidity
- pressure
- wind data
- cloud cover
- uv index
- visibility
- ozone (Dobson units)
By the Day
The daily forecast provided is up to 7 days from the current time.
The daily weather data is a little more comprehensive than the minutely and hourly data:
- time
- summary
- sunrise and sunset times
- moon phase
- precipitation
- temperature
- dew point
- humidity
- pressure
- wind data
- cloud cover
- uv data
- ozone
- visibility
- max and min temperatures
- and more
That’s quite a bit of data if you’re looking for minute-by-minute, hour-by-hour, and day-by-day weather forecasts.
OpenWeatherMap
On to OpenWeatherMap.
The OMW provides a 5 day / 3 hour forecast endpoint and a 16 day / daily forecast endpoint.
Let’s take a look at each.
5 day / 3 hour forecast data
We’ll start with the 5 day / 3 hour forecast data endpoint.
This endpoint provides a 5-day weather forecast for any city/location in 3-hour increments:
- Time (dt) – in unix, UTC
- weather data
- temperature
- “feels like”
- pressure
- sea level
- ground level
- humidity
- and more
- cloud data (%)
- wind
- speed
- direction (degrees)
- rain (if any)
- snow (if any)
Compared to Dark Sky’s hourly forecast, the data that this endpoint returns is quite comparable.
Unlike the Dark Sky hourly forecast which provides data such as ozone, visibility, dew point, the OMW forecast data gives unique data such as pressure, sea level, and ground level.
In addition, OpenWeatherMap provides some supplemental data about the current location such as timezone and city populations.
16 day / daily forecast data
Another forecast API endpoint OpenWeatherMap provides is a daily (up to) 16-day weather forecast:
- city name
- lat / long
- zip code (and country)
Some optional parameters to manipulate the data include:
- cnt – (count) or amount of days in the future to forecast (no more than 17)
- units – metric or imperial
- mode – JSON or XML format (by default it returns JSON data)
- lang – language
For each day, the API returns:
- temperature
- during the day
- min and max
- during the night
- evening temp
- morning temp
- feels like
- day
- night
- evening
- morning
- pressure
- humidity
- weather
- conditions
- description
- wind
- speed
- direction
- cloud (%)
- rain
- snow
That is a whole lot of data to work with no matter what project you’re working on.
Which Tool is better for Historical Weather Data?
We have looked at current weather data and forecasted data, but what about historical weather data?
Dark Sky
One of the coolest features of the Dark Sky API is its “Time Machine” endpoint.
A Time Machine Request returns the observed (in the past) or forecasted (in the future) hour-by-hour weather and daily weather conditions for a particular date.
Let’s try it out.
What was the weather like last year?
Not only does the Time Machine endpoint provide the same data as seen in the weather forecasts earlier, but it also has hourly data for the specified day:
- time
- temp
- apparent temperature
- dewpoint
- humidity
- pressure
- wind speed
- wind bearing
- cloud cover
- UV index
How does OMW stack up?
OpenWeatherMap
While the OpenWeatherMap API on RapidAPI doesn’t provide Historical data, you can subscribe to their historical weather APIs directly on their site, which includes:
- Historical weather API
- Statistical weather data API
Here’s what their pricing for each API/dataset looks like:
{ "message": "Count: 24", "cod": "200", "city_id": 4298960, "calctime": 0.00297316, "cnt": 24, "list": [ { "dt": 1578384000, "main": { "temp": 275.45, "feels_like": 271.7, "pressure": 1014, "humidity": 74, "temp_min": 274.26, "temp_max": 276.48 }, "wind": { "speed": 2.16, "deg": 87 }, "clouds": { "all": 90 }, "weather": [ { "id": 501, "main": "Rain", "description": "moderate rain", "icon": "10n" } ], "rain": { "1h": 0.9 } }, ....
and a sample from their Statistical weather data API, which allows you to get statistical data by main weather parameters for a specific date or month of the year, or for the entire year.
{ "cod":200, "city_id":5400075, "calctime":3.105838634, "result":[ { "month": 1, "day": 1, "temp":{ "record_min":274.44, "record_max":290.45, "average_min":276.79, "average_max":286.5, "median":281.26, "mean":281.29, "p25":278.57, "p75":283.83, "st_dev":3.69, "num":136 }, "pressure":{ "min":1014, "max":1026, "median":1021, "mean":1020.5, "p25":1019, "p75":1023, "st_dev":3.25, "num":135 }, "humidity":{ "min":23, "max":100, "median":70, "mean":65.88, "p25":47, "p75":82, "st_dev":20.63, "num":133 }, "wind":{ "min":0, "max":10, "median":1, "mean":2.36, "p25":1, "p75":3, "st_dev":2.3, "num":136 }, "precipitation":{ "min":0, "max":0.3, "median":0, "mean":0.01, "p25":0, "p75":0, "st_dev":0.04, "num":136 }, "clouds":{ "min":0, "max":90, "median":1, "mean":20.18, "p25":1, "p75":40, "st_dev":31.91, "num":136 } }, ..... ] }
Similarly, OpenWeatherMap provides hourly data and just as much granular data as Dark Sky including:
- temperature
- “feels like”
- pressure
- humidity
- min and max
- wind speed & direction
- clouds
- rain or snow
When it comes to historical weather data, OpenWeatherMap is again the winner here. While Dark Sky provides the hourly data for a given day, OMW provides hourly data as well as aggregated data for days, months, and years. However, using OpenWeatherMap may break the bank. Dark Sky is a great OpenWeatherMap alternative for historical weather data if you don’t need aggregated data.
Which API has the Best Overall Value?
Now let’s dive into the real question:
“Which API is going to give me the most bang for my buck?”.
Let’s look at each API.
Dark Sky
Here’s a screenshot from Dark Sky’s pricing page:
However, following that initial 100 API calls/month, you’ll be charged $0.001 per additional call.
OpenWeatherMap
Here’s what the OpenWeatherMap API pricing looks like on RapidAPI:
However, OpenWeatherMap’s Basic plan is rate-limited at 10 requests/minute and also has a hard limit of 100 requests/day.
In addition, they also offer a Pro paid plan for unlimited API calls for just $10/month, which is rate-limited at 100 requests/minute.
When it comes to pure value, OpenWeatherMap API on RapidAPI wins. That’s mostly because you get more API requests (100 per day vs 100 per month) for the basic freemium plan, and also OMW offers an unlimited Pro plan while you’ll end up breaking the bank with Dark Sky’s pay per request ($0.001 after the initial 100/month) if you’re scaling API calls.
Summary: OpenWeatherMap vs Dark Sky
Honestly, you can’t go wrong with each API and they might even complement each other depending on the project you’re working on.
To come up with an overall winner, we discussed:
- Overall weather data
- Real-time weather
- Comparison to other weather services (Google)
- Forecasts (by minute, hour, and day)
- Historical data
- Overall value
So if you could only pick ONE API to use for weather data, we’d have to go with the OpenWeatherMap API.
This was a hard choice, but from each of the factors discussed above, I’m sure you’d agree with us.
If you’re only making a few requests, Dark Sky might be worth it for you.
But if you’re a power user and scaling out requests, we would highly recommend OpenWeatherMap.
Here’s a table summary of what we discussed:
Dark Sky | OpenWeatherMap | |
---|---|---|
API Endpoints | 2 | 4 |
Popularity | 9.5/10 | 9.9/10 |
Latency | 378ms | 101ms |
Success Rate | 99% | 97% |
Pricing | Freemium - 100 requests/month, then $0.001 per call | Freemium - 100 requests/day (hard limit) Pro Plan - $10/month for unlimited calls. |
Historical Data | Yes, via "Time Machine" | Yes, but not available on RapidAPI |
Forecast Data | Minutely, hourly and daily | 5 day (3 hour increments) and 16 day (daily) |
Connect to API | Connect to API |
Weather API Tutorials
Whichever API you decide to use, we’d like to help you out. Here are a few tutorials by API that might help get you started.
Dark Sky Tutorials
OpenWeatherMap Tutorials
- RapidQL Tutorial: MySQL + OpenWeatherMap + Twilio SMS
- OpenWeatherMap API and React
- OpenWeatherMap API and Node.js
- OpenWeatherMap API and Python
Now It’s Your Turn
And now it’s time to hear from you, the developers.
When it comes to OMW vs Dark Sky, which API do you prefer?
Or is there another Weather API that trumps these two for you?
Let us know in the comments below.
David Headrick says
Something that no longer makes DarkSky attractive to me is that they have been bought by Apple. This means that they might close down the public API at their discretion in the future.
https://blog.darksky.net/
They are no longer accepting new registrations for their API and existing API users can use it until the end of 2021 (If Apple doesn’t change their minds).
RapidAPI Staff says
Hi David,
Thanks for dropping by. If you’re looking to transition from DarkSky check out this article: https://rapidapi.com/blog/dark-sky-deprecation-and-alternatives/
Rombout Versluijs says
WHy are these being compared? I mean you currently cant do much with DarkSky unbless you already where a owner. The API cant be setup, again only if you already were a owner.
Ive been comparing data from lots of weather data providers. I wonder why there is such a big difference in there data. IE i see wind speed difference for 10 mph. Thats quite a lot, at least i think its a lot
kingof9x says
The key bit of info that is left out is how horrible openweathermap is with technical support, customer support, and weather. They are usually between 10 and 20 degrees off. I have never seen open weather provide a forecast or current conditions that are correct.