Search API Connector Documentation

Print

Import Weatherstack Data to Google Sheets

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

We’ll first get an API key from Weatherstack, 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 Weatherstack API Key

  1. If you haven’t already, sign up for an account at https://weatherstack.com/product. For this walkthrough, the free plan is fine.
  2. You will automatically be directed to a quickstart page containing your API key. Keep it handy as we’ll need it shortly. That’s it! You now have access to the Weatherstack API.
    weatherstack-apikey

Part 2: Create Your Weatherstack API Request URL

We’ll first get current weather for a specific location.

  • API root: http://api.weatherstack.com
  • Endpoint: /current
  • Query String: ?access_key=YOUR_API_KEY&query=Los Angeles

Putting it all together, we get the full API Request URL:

http://api.weatherstack.com/current?access_key=1111111&query=Los Angeles

Just substitute in your own API key and location of interest.

Part 3: Pull Weatherstack API Data into Sheets

Now let’s copy that URL into API Connector.

  1. Open up Google Sheets and click Extensions > API Connector > Open.
  2. In the Create screen, enter the Request URL we just created
    weatherstack-url
  3. We don’t need OAuth, so just leave that set to None. We don’t need headers either so just skip that section.
  4. Create a new tab and click Set current to use that tab as your data destination.
  5. Name your request and click Run. A moment later you’ll see weather data populate the Weatherstack tab in your Google Sheet:
    weatherstack-results

Part 4: Weatherstack API Notes

  1. Locations can be identified by their name (query=New York), zip code (query=10001), latitude/longitude (query=40.7831,-73.9712), or IP address (query=153.65.8.20).
  2. Append query strings units=m for metrics, units=s for scientific, and units=f for Fahrenheit. For example:
    http://api.weatherstack.com/current?access_key=YOUR_KEY&query=London&units=m
  3. Other types of weather data, including historical weather, historical time-series, and weather forecasts are available via Weatherstack’s paid plans.

Part 5: API Documentation

Official API documentation: https://weatherstack.com/documentation

Previous Import WazirX Data to Google Sheets
Next Import Webflow Data to Google Sheets

Leave a Comment

Table of Contents