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:
Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser:
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.
Make a GET request
Make a POST request
PUT, PATCH, & DELETE Requests
Save requests for later
Schedule requests for automatic updates
Reference cell values in requests
=APIPHENY custom function
Stack multiple URLs in a single request
Run all saved requests at once
Modify your request settings
Import & export saved API settings
Crypto API tutorials and more:
Alpha Vantage API
Constant Contact API
Facebook Graph API
Facebook Ads API
Google SERP API
Linkedin Ads API
Product Hunt API
Reddit Ads API
Riot Games API