Search API Connector Documentation

Print

Import WeatherAPI Data to Google Sheets

In this guide, we’ll walk through how to pull realtime weather data from WeatherAPI.com directly into Google Sheets, using the API Connector add-on for Sheets.

We'll first get an API key from WeatherAPI, and then set up a request to pull in weather data from Weatherstack to your spreadsheet.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your WeatherAPI API Key

  1. If you haven't already, sign up for an account at https://www.weatherapi.com/signup.aspx. For this walkthrough, the free plan is fine.
  2. Click on the My Account tab in the main navigation bar, or navigate directly to https://www.weatherapi.com/my/
    weatherapi-myaccount
  3. You will see your API key at the top of the page. That's it! You now have access to WeatherAPI.
    weatherapi-key

Part 2: Pull WeatherAPI Data into Sheets

For this example, we'll get London weather on 2023-01-01. Substitute in your own API key where it says your_key.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttp://api.weatherapi.com/v1/history.json?key=your_key&q=London&dt=2023-01-01
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see the response populate your Google Sheet:
    weatherapi-response

Part 3: API Documentation

Official API documentation: https://www.weatherapi.com/docs/

Interactive request generator: https://www.weatherapi.com/api-explorer.aspx

Leave a Comment

Jump To