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 {endpoint}/weather/indices/daily/json?api-version=1.1&query={query}
GET {endpoint}/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
endpoint
path True

string (uri)

The Azure Maps service hostname. Use https://atlas.microsoft.com for the Azure public cloud. To target a specific Azure Maps geography or a sovereign cloud, see Azure Maps geographic scope.

format
path True

JsonFormat

Desired format of the response. Only json format is supported.

api-version
query True

string

minLength: 1

The API version to use for this operation.

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 (int32)

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

  • 1 - Return daily index data for the current day. Default value.
  • 5 - Return 5 days of daily index data starting from the current day.
  • 10 - Return 10 days of daily index data starting from the current day.
  • 15 - Return 15 days of daily index data starting from the current day.
indexGroupId
query

integer (int32)

Numeric index group identifier that can be used for restricting returned results to the corresponding subset of indices (index group). Cannot be paired with indexId. Please refer to Weather services in Azure Maps for details and to see the supported index groups.

indexId
query

integer (int32)

Numeric index identifier that can be used for restricting returned results to the corresponding index type. Cannot be paired with indexGroupId. Please refer to Weather services in Azure Maps for details and to see the supported indices.

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

DailyIndicesResult

The request has succeeded.

Other Status Codes

ErrorResponse

An unexpected error response.

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.

Note

  • This security definition requires the use of the x-ms-client-id header 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

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: header

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": [
    {
      "description": "This is an excellent day for outdoor running!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 1,
      "indexName": "Running Forecast",
      "value": 9.2
    },
    {
      "description": "Conditions are excellent for jogging outdoors!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 2,
      "indexName": "Jogging Forecast",
      "value": 9.4
    },
    {
      "description": "Conditions are excellent for hiking!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 3,
      "indexName": "Hiking Forecast",
      "value": 9.8
    },
    {
      "description": "Conditions are excellent for bicycling outdoors!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 4,
      "indexName": "Bicycling Forecast",
      "value": 9.9
    },
    {
      "description": "This is a great day for golf.",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 5,
      "indexName": "Golf Weather Forecast",
      "value": 10
    },
    {
      "description": "This is an excellent day for playing tennis!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 6,
      "indexName": "Tennis Forecast",
      "value": 9.2
    },
    {
      "description": "This is an excellent day for skateboarding!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 7,
      "indexName": "Skateboarding Forecast",
      "value": 9.9
    },
    {
      "description": "Conditions are excellent for attending an outdoor concert!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 8,
      "indexName": "Outdoor Concert Forecast",
      "value": 9.7
    },
    {
      "description": "Conditions are very good today for kite-flying.",
      "ascending": true,
      "category": "Very Good",
      "categoryValue": 4,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 9,
      "indexName": "Kite Flying Forecast",
      "value": 8.5
    },
    {
      "description": "Conditons will be very good for a visit to the beach or pool.",
      "ascending": true,
      "category": "Very Good",
      "categoryValue": 4,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 10,
      "indexName": "Beach & Pool Forecast",
      "value": 8.6
    },
    {
      "description": "Conditions will be very good for sailing.",
      "ascending": true,
      "category": "Very Good",
      "categoryValue": 4,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 11,
      "indexName": "Sailing Forecast",
      "value": 8.3
    },
    {
      "description": "This is a great night to be stargazing!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 12,
      "indexName": "Stargazing Forecast",
      "value": 9.5
    },
    {
      "description": "Expect only fair conditions for fishing.",
      "ascending": true,
      "category": "Fair",
      "categoryValue": 2,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 13,
      "indexName": "Fishing Forecast",
      "value": 3.5
    },
    {
      "description": "Expect poor conditions for skiing.",
      "ascending": true,
      "category": "Poor",
      "categoryValue": 1,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 15,
      "indexName": "Ski Weather Forecast",
      "value": 0
    },
    {
      "description": "The weather is favorable for a very high level of mosquito activity. Plan activities and insect repellents accordingly.",
      "ascending": true,
      "category": "Very High",
      "categoryValue": 4,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 17,
      "indexName": "Mosquito Activity Forecast",
      "value": 7
    },
    {
      "description": "Expect only fair conditions for hunting.",
      "ascending": true,
      "category": "Fair",
      "categoryValue": 2,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 20,
      "indexName": "Hunting Forecast",
      "value": 4.5
    },
    {
      "description": "This is a great day for an outdoor barbecue!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 24,
      "indexName": "Outdoor Barbecue",
      "value": 9.8
    },
    {
      "description": "This is a great day for lawn mowing!",
      "ascending": true,
      "category": "Excellent",
      "categoryValue": 5,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 28,
      "indexName": "Lawn Mowing Forecast",
      "value": 9.6
    },
    {
      "description": "Conditions will be very good for outdoor activities.",
      "ascending": true,
      "category": "Very Good",
      "categoryValue": 4,
      "dateTime": "2020-07-14T07:00:00-04:00",
      "indexId": 29,
      "indexName": "Outdoor Activity Forecast",
      "value": 8.7
    }
  ]
}

Definitions

Name Description
DailyIndex

A single index rating in the DailyIndicesResult.results array, scoring how well one day's weather conditions are suited to a particular outdoor activity such as running, golfing, kite flying, or barbecuing. Each entry includes the activity name (for example, Ski Weather Forecast), the date it applies to, a numeric value from 0.0 to 10.0, a matching qualitative category label (for example, Poor), and a short description of the conditions (for example, Expect poor conditions for skiing.). A response may contain many entries - one per day per index - covering each day in the requested duration and each requested index.

DailyIndicesResult

The response returned by the Get Daily Indices operation, providing activity-suitability ratings for the specified location. The results array contains one DailyIndex entry per day per index, each scoring the day's weather conditions for an outdoor activity such as running, golfing, kite flying, or barbecuing.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

JsonFormat

Desired format of the response. Only json format is supported.

DailyIndex

A single index rating in the DailyIndicesResult.results array, scoring how well one day's weather conditions are suited to a particular outdoor activity such as running, golfing, kite flying, or barbecuing. Each entry includes the activity name (for example, Ski Weather Forecast), the date it applies to, a numeric value from 0.0 to 10.0, a matching qualitative category label (for example, Poor), and a short description of the conditions (for example, Expect poor conditions for skiing.). A response may contain many entries - one per day per index - covering each day in the requested duration and each requested index.

Name Type Description
ascending

boolean

Indicates which end of the 0.0-10.0 value scale (and the 1-5 categoryValue scale) is the most favorable, since the direction varies by index:

  • true: higher is better - 10.0 is the best value, 0.0 the worst (for example, Running Forecast, Golf Weather Forecast).
  • false: lower is better - 0.0 is the best value, 10.0 the worst (for example, Mosquito Activity, where the rating measures a hazard rather than a benefit).

Use this flag whenever comparing value or categoryValue across indices.

category

string

A short qualitative label describing value and categoryValue - for example, Excellent, Very Good, Good, Fair, Poor, or Very Poor. The exact set of labels depends on the index (for example, Mosquito Activity uses Low, Moderate, High, Very High, Extreme). Returned in the language specified in the request.

categoryValue

integer (int32)

A 1-5 numeric rating that pairs with category, suitable for stable, language-independent comparisons. The mapping between the number and the qualitative label depends on ascending:

  • When ascending is true, 5 is the best rating and 1 the worst (for example, 5 = Excellent).
  • When ascending is false, 1 is the best rating and 5 the worst (for example, for Mosquito Activity: 1 = Low, 2 = Moderate, 3 = High, 4 = Very High, 5 = Extreme).
dateTime

string (date-time)

The date the index applies to, expressed as midnight local time at the forecast location in ISO 8601 format (yyyy-mm-ddThh:mm:ss±hh:mm) - for example, 2020-07-14T07:00:00-04:00. The time component is always 00:00:00 in the location's local offset; treat this as the calendar day the value and category cover, not as an observation timestamp.

description

string

A short, human-readable explanation of the rating for this day, suitable for display in a UI - for example, This is an excellent day for outdoor running!, This is a great day for golf., or Conditions are very good today for kite-flying. Returned in the language specified in the request.

indexId

integer (int32)

The numeric identifier of the index, suitable for stable, language-independent lookup of the activity that pairs with indexName. For example, 1 identifies Running Forecast, 5 identifies Golf Weather Forecast, and 9 identifies Kite Flying Forecast. For the complete mapping, see Index IDs in the Weather service in Azure Maps concepts article.

indexName

string

The display name of the index, identifying the activity or condition it rates - for example, Running Forecast, Golf Weather Forecast, Kite Flying Forecast, or Beach & Pool Forecast. Returned in the language specified in the request. For the full list of supported indices, see Index IDs in the Weather services in Azure Maps concepts article.

value

number (float)

The numeric suitability score for the activity on this day, from 0.0 to 10.0. By default 10.0 indicates the most favorable conditions and 0.0 the least favorable, but a few indices invert the scale - check ascending before interpreting the value. For example, a value of 9.2 for the Running Forecast with ascending = true means very good running weather. For the per-index value-to-category ranges, see Daily index range sets in the Weather services in Azure Maps concepts article.

DailyIndicesResult

The response returned by the Get Daily Indices operation, providing activity-suitability ratings for the specified location. The results array contains one DailyIndex entry per day per index, each scoring the day's weather conditions for an outdoor activity such as running, golfing, kite flying, or barbecuing.

Name Type Description
results

DailyIndex[]

The daily index ratings for the queried location, in chronological order starting with the current day. The array contains one DailyIndex entry per day per index, with the number of days controlled by the requested duration (1, 5, 10, or 15 days).

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

maps.weather.getdailyindices

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.).

Name Type Description
error

ErrorDetail

The error object.

JsonFormat

Desired format of the response. Only json format is supported.

Value Description
json

The JavaScript Object Notation Data Interchange Format