Get Started with AccuWeather APIs
Learn how to set up a developer account and an application to use AccuWeather APIs.
We'll cover the following
AccuWeather supports a number of weather APIs that provide us with up-to-date and highly accurate forecasts around the globe. It provides utility APIs that lets users retrieve unique identifiers and geographical coordinates for various locations. This information is useful because most of the APIs we cover in this course require the locationKey
of a location, rather than its name, as a parameter.
The following illustration explains the flow of the AccuWeather APIs that we follow in this course.
Types of APIs
AccuWeather offers two types of APIs: Core weather API and MinuteCast API. The Core weather API provides endpoints to get daily and hourly weather forecasts, current conditions, and daily index data, among others. Moreover, it provides endpoints to search for locations all around the world, including cities and countries. The MinuteCast API allows us to get a 120-minute precipitation forecast for a specific location.
Both APIs provide a range of subscription packages to meet the exact needs of customers. In this course, we use the free subscription package for the Core weather API.
Now, let’s look at the steps we need to take to call the AccuWeather APIs.
Set up a developer account
To call the AccuWeather APIs, we need to register and create a developer account. Follow the steps below to create a developer account.
Step 1: Go to the AccuWeather developer portal and click the "REGISTER" button at the top.
Step 2: This opens a new user registration form in a modal window. Fill out the form and click the "CREATE NEW ACCOUNT" button.
Step 3: An automatic confirmation email is sent to your registered email address. Click the confirmation link given in the email.
Step 4: You are redirected to the password reset page. Click the "LOG IN" button.
Step 5: You are redirected to the "Edit Profile" page. Fill out the form to change the account's password and click the "SAVE" button.
Create an application
After setting up our developer account and logging in, we need to create an application. This allows us to get our API key that enables us to call the AccuWeather APIs. Follow the steps below to create an application and get the API key.
Step 1: Click the user email from the top menu bar. From the dropdown menu, select "My Apps." You may click "MY APPS" from the menu bar just below the AccuWeather APIs logo.
Step 2: Click the "Add a new App" button to create a new application.
Step 3: You are redirected to the “Add App” form. Enter the application name. Fill out the rest of the form as follows:
- For "Core Weather" under "Products," select "Limited Trial."
- For "MinuteCast" under "Products," do not select any option.
- For "Where will the API be used?," select "Desktop Website" from the dropdown list.
- For "What will you be creating with this API?," select "Internal App."
- For "What programming language is your APP written in?," select "Python" from the dropdown list.
- For "Is this for Business to Business or Business to Consumer use?," select "Business to Consumer."
- For "Is this Worldwide or Country specific use?," select "Worldwide."
Step 4: Click the "CREATE APP" button.
You can now see your application on the "My Apps" page.
Get the API key
Now that we’ve created an application, we can get the API key that enables us to make calls to the AccuWeather APIs. Follow the steps below to get the API key.
Step 1: Click on the application you just created.
Step 2: Under the "Keys" tab, you can find the "API Key." Copy the API key and paste it somewhere safe.
Click the "Edit" button in the widget below and enter your "API key" in the API_KEY
textbox. Click the "Save" button. This automatically saves your API key throughout the course.
# Testing the API Keys!
Note: In case the API key verification fails in the code widget above, you can recheck the application settings. Head over to the "MY APPS" page, click the application you’ve created and switch to the Edit <APP_NAME> tab in the application panel. You will be redirected to the "Edit app" page. Make sure that for "Core Weather," you select "Limited Trial" and for "MinuteCast," you don’t select any option. Click the "SAVE APP" button and try again by clicking the "Run" button in the widget above.
Now that we’ve created our developer account, registered a new application, and generated the API_KEY
, we are ready to go!