Search API Connector Documentation

Print

Import AccuWeather Data to Google Sheets

In this guide, we will walk through how to pull data from the AccuWeather API directly into Google Sheets, using the API Connector add-on for Sheets. We will first get an API key from AccuWeather and then set up a request to pull in data to your spreadsheet.

CONTENTS

BEFORE YOU BEGIN

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

PART 1: GET YOUR ACUUWEATHER API KEY

Before we start pulling data from AccuWeather API, we will need to register on their site, choose a subscription plan and obtain our personal API key. Go to developer.accuweather.com/apis and click on the register button in the upper right corner. You will get a pop-up window shown below. Populate the textboxes with information. If you don’t have a business or business name, just put something random.

After that step, you will receive an email with a confirmation link, click on it! Next, click on the Packages & Pricing section to choose your subscription plan. If you want a free one, click on Get started now! under the Limited trial section.

In order to get API key, we will need to create an application. Click on My Apps section, and after on Add a new App button.

Create a new app as shown in the example below.

Once we created the app, go to the My Apps section, click on the created application and your API key will appear below, as depicted in the picture.

PART 2: CREATE YOUR API REQUEST URL

We will create AccuWeather API requests based on the official documentation. Navigate yourself here to find a bunch of different APIs. If you click on some from the list, you will get already constructed API requests. Every designed request is followed by a short description of what you will get when you run it.

  • API root: http://dataservice.accuweather.com/
  • APIs:
    • locations/v1/
    • forecasts/v1/
    • currentconditions/v1/
    • indices/v1/
    • alarms/v1/
    • alerts/v1/
    • imagery/v1/
    • tropical/v1/
    • translations/v1/

PART 3: PULL ACCUWEATHER API DATA INTO GOOGLE SHEETS

In this section we will use locations and forecasts APIs, to get a location’s key and weather forecast for it.

Locations API

  1. Open up Google Sheets and click Add-ons > API Connector > Open.
  2. In the Create tab, construct a link like this to get information for the top 50 cities worldwide in the English language (for language options, please have a look here):
http://dataservice.accuweather.com/locations/v1/topcities/50?apikey=YOUR-API-KEY&language=en-us

3. Now create a new tab, give it a name and click Set current to use that tab as your data destination.

4. Give a name to your request and click run!

5. Now the pulled data will appear in your sheets. We got the top 50 cities worldwide with their keys that we will use in a Forecast API request.

FORECASTS API

To get a one day of daily forecast for Athens city, we will use key from the results we got in the previous request, and create an API link as shown below:

http://dataservice.accuweather.com/forecasts/v1/daily/1day/182536?apikey=YOUR-API-KEY&language=en-us

Following guidelines provided above, we will get a forecast for Athens.

PART 4: MORE EXAMPLE API URLS

Here we will present more API URL examples. We encourage you to go through the AccuWeather documentation for constructing even more requests!

  • Get information about administrative areas in the US:
http://dataservice.accuweather.com/locations/v1/adminareas/us?apikey=YOUR-API-KEY&language=en-us&offset=100
  • Get hourly forecast for the next 12 hours in Athens:
http://dataservice.accuweather.com/forecasts/v1/hourly/12hour/28143?apikey
=YOUR-API-KEY
  • Get current weather conditions in Athens:
http://dataservice.accuweather.com/currentconditions/v1/28143?apikey=YOUR-API-KEY
  • Get current weather conditions data for 150 cities worldwide:
http://dataservice.accuweather.com/currentconditions/v1/topcities/150?apikey=YOUR-API-KEY
  • Get severe weather alerts from official Government Meteorological Agencies and leading global weather alert providers for Athens:
http://dataservice.accuweather.com/alerts/v1/28143?apikey=YOUR-API-KEY
  • Get 1 day of weather alarms for Athens:
http://dataservice.accuweather.com/alarms/v1/1day/28143?apikey=YOUR-API-KEY
  • Get government issued storm information for a 2020:
http://dataservice.accuweather.com/tropical/v1/gov/storms/2020?apikey=YOUR-API-KEY
Next Import ActiveCampaign Data to Google Sheets

Leave a Comment