Index Values

Overview

The Indices API allows us to retrieve index values for a particular location. It provides detailed information, including the name of the index, its time, its value, and its category.

Endpoints for getting index values

In this lesson, we learn how to retrieve the index data of a particular location for a single day and for a period of 5 days. These endpoints provide the index data for all indices for the specified location.

Note: The availability of index values varies by location.

Index values for a single day

To get the index values for a single day for a location of our choice, we make a GET request to the following URL:

http://dataservice.accuweather.com/indices/v1/daily/1day/{locationKey}

Index values for 5 days

Similarly, we make a GET request to the following URL to get the index data for a period of 5 days for a particular location:

http://dataservice.accuweather.com/indices/v1/daily/5day/{locationKey}

Input parameters

The table below shows the list of input parameters for the aforementioned endpoints.

Get hands-on with 1200+ tech skills courses.