Weatherstack is a weather API from the API provider Apilayer. The Weatherstack API is designed to provide weather updates for anyone who needs them. We can use the Weatherstack API to display current, past, and predicted weather data in Google Sheets. In this tutorial, we’ll show you how to connect the Weatherstack REST API to Google Sheets in 5 steps:
To pull data from the Weatherstack API into Google Sheets, first install and open the Apipheny Google Sheets add-on.
Apipheny is a no-code API integrator for Google Sheets that you can use to make unlimited API requests, connect to unlimited APIs, save API requests, schedule API requests, and more.
1. Install Apipheny by clicking here on desktop and then clicking the Install button on the next page
2. After you’ve installed Apipheny, open a Google Sheet and then click on the Add-Ons or Extensions option in the top menu. In the add-ons menu, you should see Apipheny.
Click Apipheny > Import API to open the Apipheny sidebar in your Google Sheets:
After signing up for the Weatherstack API, a page containing your API Access Key will be displayed:
Copy and paste your API Access Key in a safe location because you’ll need it in the next steps.
In this section, we’ll show you how to browse the Weatherstack API documentation to find an API endpoint that retrieves the specific information you need from the Weatherstack API. If you already know your API URL, or you want to use the same example URL as us, just skip to Step 4.
First, open the Weatherstack API documentation page: https://weatherstack.com/documentation
The menu on the left contains general information about the Weatherstack API and a list of API endpoints:
In this example, we will describe the Historical Weather endpoint, that is used to look up historical weather data all the way back to 2008. The whole URL for this endpoint is:
The documentation for this endpoint contains a short description of the endpoint’s purpose, the accepted path parameters and the responses it can return:
All API calls to the Weatherstack API should be made to the http://api.weatherstack.com/ base domain. All endpoints and parameters should be appended to this base domain.
Okay, we’re in the home stretch. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import Tab open, enter these details into the add-on:
API URL: In Step 3, we explained how you can find the Weatherstack API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path, followed by any GET parameters required for your query.
For this example, we are using the Current weather endpoint that returns the current weather for a specific city. The corresponding URL for this endpoint is:
If you use this same URL, don’t forget to replace ACCESS_KEY with the value you previously obtained in Step 2, and replace CITY with a real city name.
Headers are not required for this API request, so you can leave this section blank in Apipheny.
Here’s what our request looked like when entered into Apipheny.
The last step is to click the Run button at the bottom of the Apipheny add-on and then your Weatherstack data will be imported into your Google Sheet, like so:
After making a successful request to the Weatherstack API, try querying a different Weatherstack API endpoint, or try using one of the more advanced features in the Apipheny add-on, such as: