Meet the Google Weather API: Real time weather for maps

Learn how to use the new Google Weather API to integrate real time weather data and forecasts into your apps and maps.

Meet the Google Weather API: Real time weather for maps

At Google Next 2025, Google launched the new Google Weather API, which provides detailed real time and predicted weather data for any location worldwide. The Weather API is part of the growing environmental category within the Google Maps Platform, introduced in late 2023. This category also includes APIs like Air Quality & Pollen, which can serve as valuable complements to the Weather API across a wide range of use cases.

In this tutorial series, I’ll explore the Weather API's potential use cases, discuss pricing (spoiler: it's free for now) and talk about how it fits in the Google Maps API ecosystem. I’ll also show you how to build three helpful apps with it.

Part 1: Meet the Google Weather API: Real time weather for maps (this article)
Part 2: Build a weather app with the Google Weather API
Part 3: Google Maps weather along route: Weather aware route planner
Part 4: Plan better delivery routes with the Google Weather API

First, we’ll create a simple weather app that displays current and forecasted conditions for any location in the world. Next, we’ll build a route planner that provides weather forecasts along your route. Finally, we’ll develop a delivery management tool that shows the expected weather at each stop. As always, I'll include working code that you can use in your own projects.

Google Weather API calendar app
How to use the Google Weather API to build a calendar app
Weather Along Route
Check weather conditions along your route

What is the Google Weather API?

The Google Weather API is a web service that delivers real-time, hyperlocal weather data, both current and forecasted, for any location worldwide. Simply provide a latitude and longitude, and the API returns detailed weather conditions for that point, now and in the near future. The response includes data such as temperature, precipitation, humidity, wind speed, and descriptive conditions like clear skies or thunderstorms. It also provides ready to use weather icons that visually represent the forecast, making it easy to display conditions in your app or on your map.

How does the Google Weather API work?

Just like with the Google Maps Route Optimization API, the Google Weather API is based on incredible research and AI work done at Google Research and commercialized through the Google Maps engineering and product teams. This is in itself an amazing achievement. It's not easy to take a research idea and turn it into a commercially viable (more on that later) product.

🌐
You can read the full paper, Probabilistic weather forecasting with machine learning for free on the Nature website.

What's even more impressive is that traditionally, weather forecasts have been based on numerical weather prediction, which relies on physics based simulations of the atmosphere. Google's weather model on the other hand, utilizes pattern matching to generate a probabilistic weather forecast that takes seconds instead of hours to generate.

Google claims that its weather model significantly outperforms ENS, the leading ensemble forecast from the European Centre for Medium-Range Weather Forecasts. In an era marked by climate change, the model offers improved accuracy in predicting both the timing and impact of extreme weather events. For instance, it successfully forecasted the path of Hurricane Milton 4 to 7 days in advance and identified the formation of Hurricane Helene a full two weeks before landfall.

The API has two main endpoints:

  1. Current Conditions, which returns information about current weather conditions at a specific location.
  2. Forecast, which returns up to 10 days of weather forecast information for a specific location, starting with the current day.

There's a third endpoint, History, but it's rarely used. It returns up to 24 hours of hourly historical weather data at a given location, starting from the last hour.

What can the Google Weather API be used for?

Well, it can obviously be used to tell the weather. The documentation is straightforward and the API itself is easy enough to use. With a few lines of code (or a carefully worded Gemini prompt), you can build a basic weather app like the one below:

A basic calendar app built using the Google Weather API
A basic calendar app built using the API

But Google's ambition for the Weather API goes far beyond simple weather apps. It envisions the Weather API as a key component in building predictive, weather aware solutions by combining it with other Google Maps APIs. For instance, when used alongside the Routes API or GMPRO, it can power route planning tools that adjust in real time based on current weather conditions. We'll build an example of this later in the tutorial series.

How much does the Google Weather API cost?

The API is currently in Preview (pre-GA), so there’s no charge for usage at this time (source). While API calls will still appear on your Cloud Console billing page, the cost will be $0. There's a free usage cap of 10,000 API calls per month and past that, calls are billed at $0.15 CPM, officially making it the least expensive Google Maps API, ever. For comparison, Google's most widely used API, the Geocoding API, costs $5 CPM. The full pricing table for the Weather API (see official price sheet) is shown below:

0 - 10,000 10,000 - 100k 100k - 500k 500k - 1M 1M - 5M 5M+
Weather API FREE $0.15 $0.12 $0.09 $0.06 $0.04

As with other Google Maps services, working with a Google Maps Partner can provide access to discounted pricing at higher volumes.

How good is the Google Weather API?

Good is subjective. To evaluate the Google Weather API, I'm going to head outside and in a totally unscientific way, see what's the weather like and compare that to what the API tells me (Google has been using the Weather API in its search results for over a year. For example, a simple search like "Vancouver weather" will show you real time weather data powered by the API).

It's currently raining outside (I live in Vancouver, Canada, so this is a totally normal for a wet spring day) and feels a little chilly. What does the Google say?

Great! Sounds about right. Now, let's see how the 7 day weather forecast returned by the Google compares to the what I consider to be the gold standard of Western Canada weather forecasting, the Environment Canada weather app at https://weather.gc.ca/.

Environment Canada vs Google Weather API
Environment Canada vs Google Weather API

Not bad - the daily high and low temperatures are pretty consistent, and the overall weather conditions align well. That said, Environment Canada is forecasting a sunnier week so I'm hoping for that, while Google is predicting a bit more cloud cover.

Google Weather API alternatives

Competition? There's plenty. Most governments view accurate weather data as a public good because of its importance in air travel, commercial shipping and general public safety (think about the impact hurricanes have on Florida). As a result, agencies like the Environment Canada and the National Weather Service offer real time weather conditions and forecasts for free, including access through public APIs.

In addition to public agencies, many private companies offer virtually identical weather APIs for free or at very low cost. Examples include:

  • OpenWeather, one of the most widely used weather APIs globally,
  • AccuWeather, popular with airlines, news organizations and the insurance industry,
  • Open Meteo, an open source weather API that offers free access for non-commercial use.

In my view, Google’s best opportunity lies in positioning the Weather API for casual, non mission critical use cases, especially when integrated with other Google Maps APIs. For example, a travel agency could recommend destinations based on forecasted weather, like promoting "sunny beach getaways this weekend". Similarly, an online grocery service might use the API to monitor weather along a driver’s route and proactively notify customers of potential delivery delays.

Why would these companies choose Google over a cheaper or free alternative? For convenience, mostly. Many of them are already using other Google Maps APIs, so it’s easier to justify sticking with a single provider for multiple services.

Google Weather API key

To get started with the Weather API, you'll need to first enable it in the Google Cloud Console. Once you've created a Google Cloud project, find your way to the APIs & Services page and search for "weather". The "Weather API" should show up as the first result. Click [Enable] to get access.

Enabling the Google Weather API in the Cloud Console
Enabling the API in the Cloud Console

Google Weather API example

Here's a simple example that shows how to fetch the current weather for Vancouver, Canada (49.246292, -123.116226) to display on a website.

Current weather conditions retrieved from the Google Weather API
Current weather conditions retrieved from Google Weather

Endpoint: GET

https://weather.googleapis.com/v1/currentConditions:lookup?key={YOUR_API_KEY}
&location.latitude={LATITUDE}
&location.longitude={LONGITUDE}

{YOUR_API_KEY} This is your Google Maps API key with the Google Weather API enabled.

{LATITUDE} The latitude coordinates of the location you want to get weather for.

{LONGITUDE} The longitude coordinates of the location you want to get weather for.

Using 49.246292, -123.116226 for latitude and longitude gives us:

Response

{
    "currentTime": "2025-04-20T08:47:01.340744445Z",
    "timeZone": {
        "id": "America/Vancouver"
    },
    "isDaytime": false,
    "weatherCondition": {
        "iconBaseUri": "https://maps.gstatic.com/weather/v1/mostly_cloudy_night",
        "description": {
            "text": "Mostly cloudy",
            "languageCode": "en"
        },
        "type": "MOSTLY_CLOUDY"
    },
    "temperature": {
        "degrees": 7.2,
        "unit": "CELSIUS"
    },
    "feelsLikeTemperature": {
        "degrees": 7.2,
        "unit": "CELSIUS"
    },
    "dewPoint": {
        "degrees": 5.4,
        "unit": "CELSIUS"
    },
    "heatIndex": {
        "degrees": 7.2,
        "unit": "CELSIUS"
    },
    "windChill": {
        "degrees": 7.2,
        "unit": "CELSIUS"
    },
    "relativeHumidity": 90,
    "uvIndex": 0,
    "precipitation": {
        "probability": {
            "percent": 9,
            "type": "RAIN"
        },
        "snowQpf": {
            "quantity": 0,
            "unit": "MILLIMETERS"
        },
        "qpf": {
            "quantity": 0,
            "unit": "MILLIMETERS"
        }
    },
    "thunderstormProbability": 0,
    "airPressure": {
        "meanSeaLevelMillibars": 1022.11
    },
    "wind": {
        "direction": {
            "degrees": 315,
            "cardinal": "NORTHWEST"
        },
        "speed": {
            "value": 3,
            "unit": "KILOMETERS_PER_HOUR"
        },
        "gust": {
            "value": 5,
            "unit": "KILOMETERS_PER_HOUR"
        }
    },
    "visibility": {
        "distance": 16,
        "unit": "KILOMETERS"
    },
    "cloudCover": 69,
    "currentConditionsHistory": {
        "temperatureChange": {
            "degrees": -1.9,
            "unit": "CELSIUS"
        },
        "maxTemperature": {
            "degrees": 12.2,
            "unit": "CELSIUS"
        },
        "minTemperature": {
            "degrees": 6.8,
            "unit": "CELSIUS"
        },
        "snowQpf": {
            "quantity": 0,
            "unit": "MILLIMETERS"
        },
        "qpf": {
            "quantity": 3.8201,
            "unit": "MILLIMETERS"
        }
    }
}

The weatherCondition object provides details about the weather condition for a given location. It includes:

  • iconBaseUri, the URL of the weather icon associated with the specific weather condition. You can append a ".png" or ".svg" to the URL to retrieve the icon directly e.g. https://maps.gstatic.com/weather/v1/mostly_cloudy_night.png.
  • description, which provides a textual description for the associated weather condition e.g. "MOSTLY_CLOUDY"

temperature tells us the temperature for the given location in degrees celsius (switch units to degrees Fahrenheit by adding unitsSystem=IMPERIAL to the request).

precipitation represents a set of precipitation values at a given location. It contains:

  • probability, the probability of precipitation of a certain type ("RAIN", "SNOW", "FREEZING_RAIN" etc) at that location. When a weather forecast says there’s a 50% chance of rain, it usually means that, "There is a 50% probability that measurable rain will occur at a given location during the forecast period".

    Forecasters often use the formula: PoP (Probability of Precipitation) = Confidence × Areal Coverage. So, a 50% chance could mean one of two things:

    Google is 100% confident it will rain, but only half the area will get it or, Google is 50% confident it will rain everywhere in the area.

wind gives the direction (direction from which the wind originates, measured in degrees from North) and speed (measured in km/h) for the prevailing wind.

cloudCover shows the current percentage of the sky covered by clouds (values from 0 to 100).

currentConditionsHistory provides the minimum and maximum temperatures recorded in the past 24 hours. These values are commonly shown in weather apps to help users understand the daily variation in temperature.

🌐
The documentation for Current Conditions endpoint of the Weather API is informative and well written. Check it out.

My thoughts on the Google Weather API

Many of Google’s newer APIs are very niche, but they excel at solving the specific problems they’re designed for. The Places Insights API is a good example of this. It provides the density, distribution, and availability of places within a specified area. It's useful if you are trying to find a good location to set up a new cafe or restaurant, but not much else.

Weather APIs on the other hand have a huge total addressable market (everyone checks the weather at some point during the day) but one that is hard to make money from - "Large TAM, low willingness to pay".

Most people don’t pay for weather forecasts, unless there’s a clear financial or practical benefit to making informed decisions based on the weather. I’m actually one of the exceptions. As an avid skier, I subscribe to OpenSnow during ski season for its highly accurate and specialized snow forecasts. Forecasting mountainside snow conditions is notoriously difficult. Small changes in wind or elevation can cause huge shifts in local weather - rain on one side of a hill, sun on the other. Models often can't resolve these microclimates well enough. OpenSnow hires professional weather forecasters who also ski. They are familiar with the terrain at many ski resorts, and combine computer generated forecasts with their local knowledge of each ski area to predict how much snow is going to fall and where. This is super helpful and worth paying for if you are driving across Utah trying to decide which resort to hit next, or thinking about hopping on a last minute flight to Japan to catch an upcoming storm cycle.

In my view, unless Google's weather forecasts prove to be noticeably more accurate than existing models, particularly in predicting extreme weather events like atmospheric rivers, heat domes and bomb cyclones, it will be difficult to convince established companies and brands to switch. These organizations are already paying for high-quality, industry specific weather data (e.g. most airlines happily pay for high altitude weather data so that they can route planes around storms and turbulence) from trusted vendors they've relied on for years. At the same time, attracting startups is not easy either, as many are looking for free or extremely low cost API solutions.

What's next in this tutorial series

The rest of this tutorial series will be mostly hands on. You’ll learn how to build three different apps that showcase the capabilities of Google Weather combined with other Google Maps Platform APIs:

  1. A simple weather app that displays current and forecasted conditions for any location in the world,
  2. A route planner that provides weather forecasts along your route,
  3. A delivery management tool that shows the expected weather at each stop

The best way to follow along is to fork each repository and run the apps locally. Experiment by making small changes to see how things work. If you’d rather not pull code from GitHub, no problem - each blog post includes a live demo you can explore directly.

Next: Part 2: Building a simple weather app with the Google Weather API