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 a free API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to API data sources, easily.
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: sheet.new
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:
http://api.weatherstack.com/historical?access_key=YOUR_ACCESS_KEY&query=CITY&historical_date=DATE&hourly=1
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:
Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) as required by your Weatherstack API endpoint. For this example, we are using the GET method.
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:
http://api.weatherstack.com/current?access_key=ACCESS_KEY&query=CITY
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.