Replacing the Google Weather API

Although Google disabled their weather API years ago (except on their Android platform), many users and developers continue to struggle to find a good weather API option that is both free for basic and personal use cases and has the power of a full 15-day forecast and rich history API that can pull from decades of historical weather records. Thanks to Visual Crossing Weather’s Timeline Weather API, there is an easy-to-use option for anyone looking for the Google Weather API. With a single call you can request an entire range of dates including past observations, present conditions, and future forecast data. This makes the Timeline API one of the easiest and most flexible weather APIs available. While it is completely free for simple use cases, it is powerful enough for use in the most demanding business applications.

Quick Steps to Get Started

  1. Sign up for a free Visual Crossing Weather account here : https://www.visualcrossing.com/weather/weather-data-services
  2. Use our web-based Query Builder to explore the available weather data.
  3. Download data in CSV format for immediate use in any analysis tool such as Excel or copy the query URL for use in your application.

Quick Steps to Replace the Google Weather API

  1. After signing up for a Visual Crossing Weather Account, make sure that you are logged in.
  2. Click the Account button in the upper right.
  3. On the Account screen, copy your API Key, and save it for step 5.
  4. Find your existing code where it calls the Google Weather API for forecast.
  5. Replace the Google Weather URL with a URL of the following form: https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/<YOUR_TARGET_LOCATION>?key=<YOUR_API_KEY>
  6. Parse the forecast results in JSON format described here: https://www.visualcrossing.com/resources/documentation/weather-data/weather-data-documentation/ and here https://www.visualcrossing.com/resources/documentation/weather-api/weather-api-json-result-structure/ (If you prefer to work with a CSV table result, use the parameter “contentType=csv” in the query URL in step 5.)
  7. If you have code that uses history queries, change the query parameters as described in the article below.

For more details, please continue reading this article.

What makes the Timeline API an Ideal Choice for those Looking for the Google Weather API?

The Timeline Weather API offers several key features that make it ideal for those looking for an improved Google Weather API.

Cost

One of the main features that people consider when they look for a Google Weather API is cost. To many people, Google represents a source of free, or at least extremely low cost, and accurate data from web stats, to maps, to search results. And although Google 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 Visual Crossing Weather Timeline API follows this model exactly. All users get 1000 records per day completely free. This is enough for most individual users such as those who want to track their favorite sports teams, plan 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 serious data users can get hundreds of thousands of weather records for only a few dollars. For even more economical weather data access, heavy users can opt for a monthly plan that includes the query power of millions of weather records per month starting at only $35.

Ease-of-use

Another hallmark of Google APIs and services is their ease-of-use. The Timeline Weather API was designed specifically with ease-of-use as its driving goal. One simple API call can retrieve weather data covering an entire range of dates including historical data from 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 modern 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

Google is the world leader in managing huge data stores. From their core web search business to APIs such as maps, Google APIs are known for making data accessible in ways that hides the enormous volume and complexity behind the scenes. The Timeline Weather API follows this same mission by offering instant access to 50+ years of historical weather data from thousands of reporting stations around the world. This truly global weather database means that you don’t need to worry where on the globe your target location lies or when in the temporal timeline you wish to query. 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 other weather APIs offer, the Timeline API provides a full 15-day standard forecast.

For dates beyond the traditional 15-day forecast window, the Visual Crossing 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 reports and climate 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 Query Builder 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.

By way of a final, more complex query example, we can request the weather for the entire year 2023. Since I’m executing this query in early February 2023, the Timeline weather engine has a lot of complex work to do, but my actual query is quite simple to understand and execute.

https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/timeline/Washington,DC/2023-01-01/2023-12-31?key= <YOUR_API_KEY>

Notice that the query specifies two times. The first is the start time 1/1/2023 and the second is the end time 12/31/2023. This queries the daily and hourly records for the entire year of 2023.

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 early February) will be retrieved from historical station observations. The data for the next 15-days, as of the time of my query execution (early February through mid February), will be pulled from the 15-day forecast.

Since the remainder of the requested period (Mid February through December) falls outside the standard forecast window, the weather engine will use the historical weather database to model the expected conditions for each day throughout the rest of the year at the requested location, and provide those summary results. Finally, the results will include the current conditions at the requested 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 Google Weather API. It follows the week-known Google patterns of providing access to details within huge volumes of worldwide and historical data. It combines enormous volumes of weather data from many disparate sources and makes that data easily accessible via a simple API as well as the web-based Query Builder interface. And it provides all of this at a cost that is free for most individual users and is extremely cost-effective for businesses 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.