Visual Crossing is the perfect replacement for the Yahoo Weather API offering up to 1000 free results a day and full access to forecast historical data.
Since Yahoo has turned off their weather API and many developers are struggling to find a good replacement option that is both free for standard users and has a forecast API with global coverage. With the release of Visual Crossing Weather’s Timeline Weather API, there is now an easy, direct replacement for the Yahoo Weather API. Just like the Yahoo Weather API, you can easily get the weather forecast for any location worldwide. In addition to the forecast, however, with a single call you can request an entire range of dates including past observations, present conditions, and future forecast data. However, you don’t need to worry about past and far future weather unless you want to. By default the API gives you a single location forecast just like Yahoo Weather. And as an added benefit, you never need to look up a “woeid” again.
Quick Yahoo Weather API Replacement Steps
- Sign up for a Visual Crossing Weather Account here : https://www.visualcrossing.com/weather/weather-data-services
- Log in to your new account, click the orange Account button in the upper right.
- On the Account screen, copy your API Key, and save it for step 5.
- Go into your existing code where it calls the Yahoo Weather API.
- Replace the Yahoo Weather URL with a URL of the following form: https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/<YOUR_TARGET_LOCATION>?key=<YOUR_API_KEY>
- Parse the forecast results based on the JSON format here: https://www.visualcrossing.com/resources/documentation/weather-api/timeline-weather-api/
For more details, please continue reading this article.
What makes the Timeline API an ideal Yahoo Weather API replacement?
The Timeline Weather API offers several key features that make it ideal for everyone looking to upgrade their Yahoo Weather API application.
Cost
One of the main features that people consider when they look for a Yahoo Weather API replacement is cost. To many people, Yahoo represents a source of free, or at least extremely low cost services such as email and search results. And although Yahoo services are not always free, even the ones that are not free typically have a free tier that covers most individual users and then an extremely low price-point where business and bulk users can purchase access very economically.
The Timeline API follows this model exactly. Users can get up to 1000 records per day completely free. This is enough for most individual users such as those who want to track their sports teams, plan their travel, or build a weather project using Raspberry Pi. For those who need more weather data for business intelligence applications, data science, research, and analysis purposes, Visual Crossing offers a Pay-as-you-go plan for only $0.0001 per record after the first 1000. This means that even heavy data users can get hundreds of thousands of weather records for only a few dollars.
Ease to access and easy to use
Another hallmark of Yahoo APIs and services is that they are typically easy to access and easy to use. The Timeline Weather API was designed specifically with ease-of-use as its driving goal and a free account is available to everyone who has a valid email address. Requesting a 15-day forecast is as easy as specifying your location in a URL. Beyond that simple use case, one single API call can retrieve weather data covering an entire range of dates including times in the past and the weather forecast for the future. Also the API supplies current conditions and can even accommodate requests for ultra-long range forecasts by using historical averages to describe the likely conditions next month or even next year.
The Timeline API provides both hourly and daily result data using a single call. That simplifies the creation of interfaces and use cases where daily overview data is instantly expanded to show hourly details. No additional API round-trip or query cost required.
In addition, API features such as time period placeholders make it easy to request the weather conditions for “yesterday”, “tomorrow”, the “next7days”, or the “last7days” without having to worry about specifying an exact date range. Then, every time the query is rerun, the results will dynamically update to match the requested date window.
The output is available in an easy-to-parse JSON format that is suitable for use in any scripting or coding environment. Most languages such as Python, JavaScript, Java, etc. automatically handle the result parsing and turn the weather data records into ready-to-use native objects. This simple, coherent JSON format applies to all query results including historical and forecast data. (Note that if you want CSV output instead to drive a business tool or spreadsheet, CSV downloads are available via the web-based weather query interface.)
Deep and powerful data sources
Yahoo has always been known for making data accessible in ways that hides the enormous volume and complexity behind the scenes. They were original innovators in the free email and search arena and gave millions their first helpful guide on the internet. The Timeline Weather API follows this same mission by offering instant access to global weather forecasts and 50+ years of historical weather data from thousands of reporting stations around the world. This truly global reach means that you don’t need to worry where on the globe your target location lies. The Timeline API will use its vast pool of reporting stations and the most accurate interpolation algorithms to find the best weather results.
The same applies to current conditions and weather forecasts. Current conditions are updated from the reporting stations every few minutes where available. Weather forecasts employ various global and local models to determine the most reliable forecast for every worldwide location. Beyond the basic 5 or 7-day forecast that many APIs offer, the Timeline API provides a full 15-day standard forecast.
For dates beyond the traditional 15-day forecast window, the weather engine uses decades of historical weather data to provide an ultra-long-range “statistical forecast.” It does this by building a weather model based on the specific location, time, and date using historical data. It considers not only the specific date requested, but also nearby dates with similar weather patterns. The engine can then calculate an expected range of conditions for any date in the future.
In addition, the Timeline API offers other valuable data features such as weather alerts, astronomical data, and more. Weather alerts provide data on storms and other important weather conditions that affect a specific locations. Astronomical data includes sun rise and set times as well as phases of moon. These metrics can be valuable in various recreational activities such as star gazing and sports schedules as well as agricultural growing period calculations and evening business activities.
Get started in the next 5 minutes
You can get started making your first weather query in less than 5 minutes. Simply sign up for a free account, enter your account details, and you’ll be ready to get 1000 free results right away, every day. It is as simple as that. You can begin by using the web-based weather query UI to run a few example queries and even download sample datasets based on your own query parameters.
The real value, however, is in using the API to make automated queries in your own application, webpage, or app. Simply follow the documentation, and you can formulate any type of weather query that you need. For example, this simple API query will give you Washington DC’s weather for yesterday in both daily and hourly resolutions.
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Washington,DC/yesterday?key=<YOUR_API_KEY>
Just replace <YOUR_API_KEY> with the API key found in your Visual Crossing Weather account details.
If you want the forecast for the next 15-days, it is even easier.
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Washington,DC?key=<YOUR_API_KEY>
Notice that for the standard forecast, you can omit the time parameter entirely. If you don’t specify any date, the weather engine assumes that you want the 15-day forecast. This default forecast query is exactly what you need if you want a direct replacement for the Yahoo Weather API.
By way of a final, more complex query example, we can request the weather for the entire year 2020. Since I’m executing this query in mid-November 2020, the Timeline weather engine has a lot of complex work to do, but the actual query is quite simple to understand and execute.
https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Washington,DC/2020-01-01/2020-12-31?key= <YOUR_API_KEY>
Notice that the query specifies two times. The first is the start time 1/1/2020 and the second is the end time 12/31/2020. This queries the daily and hourly records for the entire year of 2020.
Although the results will arrive as a single JSON, the weather engine must pull data from both the historical records, current conditions, the 15-day forecast, and the “statistical forecast” to produce the result. The first portion of the data (January through mid-November) will be retrieved from historical station observations. The data for the next 15-days, as of the time of my query execution (mid-November through the end of the month), will be pulled from the 15-day forecast.
Since the remainder of the requested period (December 2020) falls outside the standard forecast window, the weather engine will use the historical weather database to model the expected conditions for each day in December at the requested location, and provide those summary results. Finally, the results will include the current conditions at my location. These values are provided by the most recent observations (usually in the last few minutes) at weather stations near the location.
This example shows how one, simple weather query can combine the power of various weather sources to supply a lot of valuable weather data for any worldwide location. Of course, this is just the beginning of the clever and useful queries that you will run using the Timeline Weather API.
Summary
The Visual Crossing Weather Timeline API is the best weather data API for those seeking a replacement for the Yahoo Weather API. It provides an easy and free way to obtain weather forecasts for any location worldwide. Beyond that, the Timeline API can also provide historical weather data, current conditions, and ultra-long-range forecasts. This goes above and beyond what the Yahoo Weather API could do and can give your weather applications a huge new set of functionality. And it provides all of this at a cost that is free for most individual users and is extremely cost-effective for commercial and bulk data users.
Questions or need help?
If you have a question or need help, please post on our actively monitored forum for the fastest replies. You can also contact us via our support site or drop us an email at support@visualcrossing.com.