Weather - Get Daily Indices
Use when you want to know if the weather conditions are optimal for a specific activity such as outdoor sporting activities, construction, or farming (results includes soil moisture information).
The Get Daily Indices API is an HTTP GET request returns index values that provide guidance to help when planning future activities. For example, a health mobile application can notify users that today is good weather for running or for other outdoors activities like playing golf or flying a kite. Retail stores can optimize their digital marketing campaigns based on predicted index values. The service returns in daily indices values for current and next 5, 10 and 15 days starting from current day.
GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query={query}
GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query={query}&language={language}&duration={duration}&indexId={indexId}&indexGroupId={indexGroupId}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
format
|
path | True |
Desired format of the response. Only |
|
|
api-version
|
query | True |
string |
Version number of Azure Maps API. |
|
query
|
query | True |
number[] |
The applicable query specified as a comma separated string composed by latitude followed by longitude e.g. "47.641268,-122.125679". Weather information is generally available for locations on land, bodies of water surrounded by land, and areas of the ocean that are within approximately 50 nautical miles of a coastline. |
|
duration
|
query |
integer |
Specifies for how many days the daily indices are returned. By default, the indices data for the current day will be returned. When requesting future indices data, the current day is included in the response as day 1. Available values are
|
|
|
index
|
query |
integer |
Numeric index group identifier that can be used for restricting returned results to the corresponding subset of indices (index group). Cannot be paired with |
|
|
index
|
query |
integer |
Numeric index identifier that can be used for restricting returned results to the corresponding index type. Cannot be paired with |
|
|
language
|
query |
string |
Language in which search results should be returned. Should be one of supported IETF language tags, case insensitive. When data in specified language is not available for a specific field, default language is used. Please refer to Supported Languages for details. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| x-ms-client-id |
string |
Indicates the account intended for use with the Microsoft Entra ID security model. This unique ID for the Azure Maps account can be obtained from the Azure Maps management plane Account API. For more information on using Microsoft Entra ID security in Azure Maps, see Manage authentication in Azure Maps. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
OK |
|
| Other Status Codes |
An unexpected error occurred. |
Security
AADToken
These are the Microsoft Entra OAuth 2.0 Flows. When paired with Azure role-based access control it can be used to control access to Azure Maps REST APIs. Azure role-based access controls are used to designate access to one or more Azure Maps resource account or sub-resources. Any user, group, or service principal can be granted access via a built-in role or a custom role composed of one or more permissions to Azure Maps REST APIs.
To implement scenarios, we recommend viewing authentication concepts. In summary, this security definition provides a solution for modeling application(s) via objects capable of access control on specific APIs and scopes.
Notes
- This security definition requires the use of the
x-ms-client-idheader to indicate which Azure Maps resource the application is requesting access to. This can be acquired from the Maps management API.
The Authorization URL is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations.
*
The Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
*
Usage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.
- For more information on Microsoft identity platform, see Microsoft identity platform overview.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| https://atlas.microsoft.com/.default | https://atlas.microsoft.com/.default |
subscription-key
This is a shared key that is provisioned when you Create an Azure Maps account in the Azure portal or using PowerShell, CLI, Azure SDKs, or REST API.
With this key, any application can access all REST API. In other words, this key can be used as a master key in the account that they are issued in.
For publicly exposed applications, our recommendation is to use the confidential client applications approach to access Azure Maps REST APIs so your key can be securely stored.
Type:
apiKey
In:
query
SAS Token
This is a shared access signature token is created from the List SAS operation on the Azure Maps resource through the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.
With this token, any application is authorized to access with Azure role-based access controls and fine-grain control to the expiration, rate, and region(s) of use for the particular token. In other words, the SAS Token can be used to allow applications to control access in a more secured way than the shared key.
For publicly exposed applications, our recommendation is to configure a specific list of allowed origins on the Map account resource to limit rendering abuse and regularly renew the SAS Token.
Type:
apiKey
In:
header
Examples
Successfully retrieve daily indices values from current day
Sample request
GET https://atlas.microsoft.com/weather/indices/daily/json?api-version=1.1&query=43.84745,-79.37849&indexGroupId=11
Sample response
{
"results": [
{
"indexName": "Running Forecast",
"indexId": 1,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.2,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is an excellent day for outdoor running!"
},
{
"indexName": "Jogging Forecast",
"indexId": 2,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.4,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for jogging outdoors!"
},
{
"indexName": "Hiking Forecast",
"indexId": 3,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.8,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for hiking!"
},
{
"indexName": "Bicycling Forecast",
"indexId": 4,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.9,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for bicycling outdoors!"
},
{
"indexName": "Golf Weather Forecast",
"indexId": 5,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 10,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great day for golf."
},
{
"indexName": "Tennis Forecast",
"indexId": 6,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.2,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is an excellent day for playing tennis!"
},
{
"indexName": "Skateboarding Forecast",
"indexId": 7,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.9,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is an excellent day for skateboarding!"
},
{
"indexName": "Outdoor Concert Forecast",
"indexId": 8,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.7,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "Conditions are excellent for attending an outdoor concert!"
},
{
"indexName": "Kite Flying Forecast",
"indexId": 9,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.5,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditions are very good today for kite-flying."
},
{
"indexName": "Beach & Pool Forecast",
"indexId": 10,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.6,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditons will be very good for a visit to the beach or pool."
},
{
"indexName": "Sailing Forecast",
"indexId": 11,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.3,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditions will be very good for sailing."
},
{
"indexName": "Stargazing Forecast",
"indexId": 12,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.5,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great night to be stargazing!"
},
{
"indexName": "Fishing Forecast",
"indexId": 13,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 3.5,
"category": "Fair",
"categoryValue": 2,
"ascending": true,
"description": "Expect only fair conditions for fishing."
},
{
"indexName": "Ski Weather Forecast",
"indexId": 15,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 0,
"category": "Poor",
"categoryValue": 1,
"ascending": true,
"description": "Expect poor conditions for skiing."
},
{
"indexName": "Mosquito Activity Forecast",
"indexId": 17,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 7,
"category": "Very High",
"categoryValue": 4,
"ascending": true,
"description": "The weather is favorable for a very high level of mosquito activity. Plan activities and insect repellents accordingly."
},
{
"indexName": "Hunting Forecast",
"indexId": 20,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 4.5,
"category": "Fair",
"categoryValue": 2,
"ascending": true,
"description": "Expect only fair conditions for hunting."
},
{
"indexName": "Outdoor Barbecue",
"indexId": 24,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.8,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great day for an outdoor barbecue!"
},
{
"indexName": "Lawn Mowing Forecast",
"indexId": 28,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 9.6,
"category": "Excellent",
"categoryValue": 5,
"ascending": true,
"description": "This is a great day for lawn mowing!"
},
{
"indexName": "Outdoor Activity Forecast",
"indexId": 29,
"dateTime": "2020-07-14T07:00:00-04:00",
"value": 8.7,
"category": "Very Good",
"categoryValue": 4,
"ascending": true,
"description": "Conditions will be very good for outdoor activities."
}
]
}
Definitions
| Name | Description |
|---|---|
|
Daily |
The DailyIndex object helps users plan outdoor activities based on weather conditions by providing the activity name, such as 'Ski Weather Forecast'; a numerical rating from 0.0 to 10.0 indicating suitability; a text rating, such as 'Poor'; and a brief description of the conditions, such as 'Expect poor conditions for skiing.' |
|
Daily |
This object is returned from a successful Get Daily Indices call. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Json |
Desired format of the response. Only |
DailyIndex
The DailyIndex object helps users plan outdoor activities based on weather conditions by providing the activity name, such as 'Ski Weather Forecast'; a numerical rating from 0.0 to 10.0 indicating suitability; a text rating, such as 'Poor'; and a brief description of the conditions, such as 'Expect poor conditions for skiing.'
| Name | Type | Description |
|---|---|---|
| ascending |
boolean |
Indicates the direction of the |
| category |
string |
Provides a qualitative assessment of the index, describing the |
| categoryValue |
integer (int32) |
Provides a numeric representation of the category property, indicating the qualitative assessment of the index. Values range from 1 to 5 and should be used with the ascending flag, as they can differ among indices. For example, for Mosquito Activity: Low=1, Moderate=2, High=3, Very High=4, Extreme=5. |
| dateTime |
string (date-time) |
Date and time of the observation in ISO 8601 format (yyyy-mm-ddThh:mm:ss-hh:mm). For example, 2025-04-29T07:00:00-07:00. |
| description |
string |
Provides a brief, user-friendly explanation of the index value, helping users understand its significance in relation to specific weather conditions or activities. For example, if the index value for Outdoor Barbecue is 'Excellent', the description will be 'This is a great day for an outdoor barbecue!' |
| indexId |
integer (int32) |
A numeric identifier that uniquely represents a specific index type, distinguishing between different indices for various outdoor activities. For example, an 'indexId' of 1 corresponds to the 'Running' index, and an 'indexId' of 5 corresponds to the 'Golfing' index. For more information, see Index IDs in the Weather service in Azure Maps concepts article. |
| indexName |
string |
The name of the index, indicating the type of activity or condition it relates to, such as running, golfing, or other outdoor activities. For more information, see Index IDs in the Weather service in Azure Maps concepts article. |
| value |
number (float) |
A numerical index value ranging from 0.0 to 10.0 that quantifies the suitability of weather conditions for a specific activity or condition, such as running or golfing. Higher values typically indicate more favorable conditions, depending on the value of the |
DailyIndicesResult
This object is returned from a successful Get Daily Indices call.
| Name | Type | Description |
|---|---|---|
| results |
A list of all daily indices for the queried location. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
JsonFormat
Desired format of the response. Only json format is supported.
| Value | Description |
|---|---|
| json |