Weather - Get Daily Forecast
Use to get a daily detailed weather forecast for the next 1, 5, 10, 15, 25, or 45 days.
The Get Daily Forecast API is an HTTP GET request that returns detailed weather forecast such as temperature and wind by day for the next 1, 5, 10, 15, 25, or 45 days for a given coordinate location. The response includes details such as temperature, wind, precipitation, air quality, and UV index. For more information, see Request daily weather forecast data.
If you are using the Gen1 S0 pricing tier, you can request daily forecast for the next 1, 5, 10, and 15 days. If you are using Gen1 S1 or Gen2 pricing tier, you can also request daily forecast for the next 25 days, and 45 days.
GET https://atlas.microsoft.com/weather/forecast/daily/json?api-version=1.1&query={query}
GET https://atlas.microsoft.com/weather/forecast/daily/json?api-version=1.1&query={query}&unit={unit}&duration={duration}&language={language}
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 forecast responses are returned. Available values are
|
|
|
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. |
|
|
unit
|
query |
Specifies to return the data in either metric units or imperial units. Default value is metric. |
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 detailed daily weather forecast for a given coordinate location
Sample request
GET https://atlas.microsoft.com/weather/forecast/daily/json?api-version=1.1&query=62.6490341,30.0734812&duration=5
Sample response
{
"summary": {
"startDate": "2019-11-17T09:00:00-08:00",
"endDate": "2019-11-17T15:00:00-08:00",
"severity": 5,
"phrase": "Rain Sunday evening",
"category": "rain"
},
"forecasts": [
{
"date": "2019-11-13T21:00:00-08:00",
"temperature": {
"minimum": {
"value": 0.8,
"unit": "C",
"unitType": 17
},
"maximum": {
"value": 5.3,
"unit": "C",
"unitType": 17
}
},
"realFeelTemperature": {
"minimum": {
"value": -3.4,
"unit": "C",
"unitType": 17
},
"maximum": {
"value": 1.3,
"unit": "C",
"unitType": 17
}
},
"realFeelTemperatureShade": {
"minimum": {
"value": -3.4,
"unit": "C",
"unitType": 17
},
"maximum": {
"value": 1.6,
"unit": "C",
"unitType": 17
}
},
"hoursOfSun": 1.1,
"degreeDaySummary": {
"heating": {
"value": 15,
"unit": "C",
"unitType": 17
},
"cooling": {
"value": 0,
"unit": "C",
"unitType": 17
}
},
"airAndPollen": [
{
"name": "AirQuality",
"value": 0,
"category": "Good",
"categoryValue": 1,
"type": "Ozone"
},
{
"name": "Grass",
"value": 0,
"category": "Low",
"categoryValue": 1
},
{
"name": "Mold",
"value": 0,
"category": "Low",
"categoryValue": 1
},
{
"name": "Ragweed",
"value": 0,
"category": "Low",
"categoryValue": 1
},
{
"name": "Tree",
"value": 0,
"category": "Low",
"categoryValue": 1
},
{
"name": "UVIndex",
"value": 0,
"category": "Low",
"categoryValue": 1
}
],
"day": {
"iconCode": 12,
"iconPhrase": "Showers",
"hasPrecipitation": true,
"precipitationType": "Rain",
"precipitationIntensity": "Light",
"shortPhrase": "Cloudy with a few showers",
"longPhrase": "Cloudy with a couple of showers, mainly later",
"precipitationProbability": 75,
"thunderstormProbability": 20,
"rainProbability": 75,
"snowProbability": 40,
"iceProbability": 0,
"wind": {
"direction": {
"degrees": 160,
"localizedDescription": "SSE"
},
"speed": {
"value": 16.7,
"unit": "km/h",
"unitType": 7
}
},
"windGust": {
"direction": {
"degrees": 160,
"localizedDescription": "SSE"
},
"speed": {
"value": 48.2,
"unit": "km/h",
"unitType": 7
}
},
"totalLiquid": {
"value": 6.1,
"unit": "mm",
"unitType": 3
},
"rain": {
"value": 6.1,
"unit": "mm",
"unitType": 3
},
"snow": {
"value": 0,
"unit": "cm",
"unitType": 4
},
"ice": {
"value": 0,
"unit": "mm",
"unitType": 3
},
"hoursOfPrecipitation": 3.5,
"hoursOfRain": 3.5,
"hoursOfSnow": 0,
"hoursOfIce": 0,
"cloudCover": 100
},
"night": {
"iconCode": 12,
"iconPhrase": "Showers",
"hasPrecipitation": true,
"precipitationType": "Rain",
"precipitationIntensity": "Light",
"shortPhrase": "Breezy early; cloudy",
"longPhrase": "Breezy this evening; otherwise, low clouds",
"precipitationProbability": 65,
"thunderstormProbability": 0,
"rainProbability": 64,
"snowProbability": 40,
"iceProbability": 0,
"wind": {
"direction": {
"degrees": 181,
"localizedDescription": "S"
},
"speed": {
"value": 20.4,
"unit": "km/h",
"unitType": 7
}
},
"windGust": {
"direction": {
"degrees": 170,
"localizedDescription": "S"
},
"speed": {
"value": 42.6,
"unit": "km/h",
"unitType": 7
}
},
"totalLiquid": {
"value": 4,
"unit": "mm",
"unitType": 3
},
"rain": {
"value": 4,
"unit": "mm",
"unitType": 3
},
"snow": {
"value": 0,
"unit": "cm",
"unitType": 4
},
"ice": {
"value": 0,
"unit": "mm",
"unitType": 3
},
"hoursOfPrecipitation": 2.5,
"hoursOfRain": 2.5,
"hoursOfSnow": 0,
"hoursOfIce": 0,
"cloudCover": 98
},
"sources": [
"AccuWeather"
]
}
]
}
Definitions
| Name | Description |
|---|---|
|
Air |
The AirAndPollen object provides comprehensive environmental data. It identifies various pollen types such as tree, grass, ragweed, and mold, and pollutants including PM2.5, PM10, O3, NO2, SO2, and CO. Additionally, it reports the UV Index on a scale from 1 to 10, offers qualitative descriptions of air quality or pollen levels, and provides numerical measurements of the concentration of pollutants or pollen in the air. This detailed information helps users assess air quality and pollen conditions along their travel route. |
|
Daily |
Provides detailed weather information for a specific day, such as temperature, wind, precipitation, air quality, and UV index. |
|
Daily |
|
|
Daily |
Summary for the main conditions for the requested time period. Notice that summary can cover only part of the time period. |
|
Day |
|
|
Degree |
|
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Icon |
Numeric value representing an image that corresponds to the current weather condition described by the |
|
Json |
Desired format of the response. Only |
|
Local |
Local weather data provider information. |
|
Precipitation |
Specifies the type of precipitation. Valid values are Rain, Snow, Ice, or Mix. This property is included in the response when dBZ is greater than zero. |
|
Unit |
An integer representing the unit type. For example, 17 for Celsius, 18 for Fahrenheit. Can be used for unit translation. For a complete list, see Weather services in Azure Maps. |
|
Weather |
Specifies to return the data in either metric units or imperial units. Default value is metric. |
|
Weather |
Specific value of a given unit related to weather. |
|
Weather |
Returned temperature values. |
|
Wind |
Wind details being returned including speed and direction. |
|
Wind |
Wind direction |
AirAndPollen
The AirAndPollen object provides comprehensive environmental data. It identifies various pollen types such as tree, grass, ragweed, and mold, and pollutants including PM2.5, PM10, O3, NO2, SO2, and CO. Additionally, it reports the UV Index on a scale from 1 to 10, offers qualitative descriptions of air quality or pollen levels, and provides numerical measurements of the concentration of pollutants or pollen in the air. This detailed information helps users assess air quality and pollen conditions along their travel route.
| Name | Type | Description |
|---|---|---|
| category |
string |
Provides a one-word qualitative description of the air quality or pollen level for the forecast period in the specified language. This property categorizes the air quality or pollen count into different levels, such as low, high, good, moderate, unhealthy, hazardous giving users an easy-to-understand assessment of the current conditions. |
| categoryValue |
integer (int32) |
Provides a numerical representation of the air quality or pollen level. This value corresponds to the qualitative |
| name |
string |
For pollen: Returns the name of the pollen, such as tree, grass, ragweed, or mold. For pollutants:
When the For UV Index:
When the
|
| type |
string |
Specifies the type of air pollutant being measured. Only used when the |
| value |
integer (int32) |
Provides a numerical measurement of the concentration of pollutants or pollen in the air. This value is typically expressed in units relevant to the type of pollutant or pollen being measured, such as micrograms per cubic meter (µg/m³) for particulate matter or parts per billion (ppb) for gases like ozone. Both air quality and UV are indices, so they are unitless. |
DailyForecast
Provides detailed weather information for a specific day, such as temperature, wind, precipitation, air quality, and UV index.
| Name | Type | Description |
|---|---|---|
| airAndPollen |
A list containing pollutants, pollen levels, and the UV index for the daily forecast. Each list item includes forecasted amounts and categories (e.g., low, high, good, moderate, unhealthy, hazardous) to assess potential health risks. |
|
| date |
string (date-time) |
Date and time of the current observation, displayed in ISO 8601 format (yyyy-mm-ddThh:mm:ss-hh:mm). For example, 2025-04-29T07:00:00-07:00. |
| day |
Provides detailed weather information for the daytime weather forecast, including temperature, precipitation, wind, and other key attributes. |
|
| degreeDaySummary |
Provides a summary of heating and cooling degree days. Heating Degree Days (HDD) measure the demand for energy to heat a building, calculated based on the degrees a day's average temperature is below 65°F/18°C. Cooling Degree Days (CDD) measure the demand for energy to cool a building, calculated based on the degrees a day's average temperature is above 65°F/18°C. This summary aids in energy management and planning. |
|
| hoursOfSun |
number (float) |
Provides the expected number of hours of sunshine for the specified day. |
| night |
Provides detailed weather information for the nighttime weather forecast, including temperature, precipitation, wind, and other key attributes. |
|
| realFeelTemperature |
Provides RealFeel™ Temperature values for the specified day, measured in degrees Celsius (C) or Fahrenheit (F), depending on the unit specified in the request. This metric, developed by AccuWeather, incorporates over a dozen factors, including humidity, wind speed, cloud cover, and sun intensity, to offer a comprehensive measure of how the weather actually feels. |
|
| realFeelTemperatureShade |
Provides RealFeel™ Temperature values for the specified day in shaded areas. This metric, developed by AccuWeather, incorporates over a dozen factors, including humidity, wind speed, cloud cover, and sun intensity, to offer a comprehensive measure of how the weather actually feels in the shade. |
|
| sources |
string[] |
A list of sources contributing to the weather forecast data. |
| temperature |
Provides the forecasted high and low temperatures for the day, in degrees Celsius (C) or Fahrenheit (F), depending on the |
DailyForecastResult
| Name | Type | Description |
|---|---|---|
| forecasts |
Forecast data for each requested day. |
|
| summary |
Summary for the main conditions for the requested time period. Notice that summary can cover only part of the time period. |
DailyForecastSummary
Summary for the main conditions for the requested time period. Notice that summary can cover only part of the time period.
| Name | Type | Description |
|---|---|---|
| category |
string |
Provides a one or two-word summary of the forecasted weather conditions, such as Sunny, Partly Cloudy, Rain, or Snow. |
| endDate |
string (date-time) |
The end date and time for the forecast summary, in ISO 8601 format (yyyy-mm-ddThh:mm:ss-hh:mm). For example, 2025-04-29T07:00:00-07:00. |
| phrase |
string |
Provides a brief textual summary of the daily weather conditions, displayed in the specified language. |
| severity |
integer (int32) |
Indicates the severity of the forecasted weather as an integer. Lower numbers represent higher severity: 0 = Unknown, 1 = Significant, 2 = Major, 3 = Moderate, 4 = Minor, 5 = Minimal, 6 = Insignificant, 7 = Informational. |
| startDate |
string (date-time) |
The start date and time for the forecast summary, in ISO 8601 format (yyyy-mm-ddThh:mm:ss-hh:mm). For example, 2025-04-29T07:00:00-07:00. |
DayOrNight
| Name | Type | Description |
|---|---|---|
| cloudCover |
integer (int32) |
Percent representing cloud cover. |
| hasPrecipitation |
boolean |
A boolean value that indicates whether precipitation (rain, snow, sleet, or hail) is expected during the specified timeframe. Returns true if precipitation is expected, otherwise false. |
| hoursOfIce |
number (float) |
Hours of ice. |
| hoursOfPrecipitation |
number (float) |
Hours of precipitation |
| hoursOfRain |
number (float) |
Hours of rain. |
| hoursOfSnow |
number (float) |
Hours of snow. |
| ice |
Ice |
|
| iceProbability |
integer (int32) |
Percent representing the probability of ice. For example, '30'. |
| iconCode |
Icon |
Numeric value representing an image that corresponds to the current weather condition described by the |
| iconPhrase |
string |
Phrase description of the icon. Displayed in specified language. For example, 'Sunny'. |
| localSource |
Local weather data provider information. |
|
| longPhrase |
string |
Phrase description of the forecast in specified language. Azure Maps attempts to keep this phrase under 100 characters in length, but some languages/weather events may result in a longer phrase length, exceeding 100 characters. |
| precipitationIntensity |
string |
Description of the intensity. |
| precipitationProbability |
integer (int32) |
Percent representing the probability of precipitation. For example, '20'. |
| precipitationType |
Specifies the type of precipitation. Valid values are Rain, Snow, Ice, or Mix. This property is included in the response when dBZ is greater than zero. |
|
| rain |
Rain |
|
| rainProbability |
integer (int32) |
Percent representing the probability of rain. For example, '40'. |
| shortPhrase |
string |
Phrase description of the forecast in specified language. Azure Maps attempts to keep this phrase under 30 characters in length, but some languages/weather events may result in a longer phrase length, exceeding 30 characters. |
| snow |
Snow |
|
| snowProbability |
integer (int32) |
Percent representing the probability of snow. For example, '30'. |
| thunderstormProbability |
integer (int32) |
Percent representing the probability of a thunderstorm. For example, '80'. |
| totalLiquid |
Total liquid equivalent of precipitation during the forecast period. |
|
| wind |
Wind details being returned including speed and direction. |
|
| windGust |
Wind gust. Wind gust is a sudden, brief increase in speed of the wind. |
DegreeDaySummary
| Name | Type | Description |
|---|---|---|
| cooling |
Number of degrees that the mean temperature is above 65 degrees F/ 18 degree C. |
|
| heating |
Number of degrees that the mean temperature is below 65 degrees F/ 18 degree C. |
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. |
IconCode
Numeric value representing an image that corresponds to the current weather condition described by the Phrase property. For more information, see Weather services in Azure Maps. May be NULL.
| Value | Description |
|---|---|
| 1 |
Sunny |
| 2 |
Mostly Sunny |
| 3 |
Partly Sunny |
| 4 |
Intermittent Clouds |
| 5 |
Hazy Sunshine |
| 6 |
Mostly Cloudy |
| 7 |
Cloudy |
| 8 |
Dreary (Overcast) |
| 9 | |
| 10 | |
| 11 |
Fog |
| 12 |
Showers |
| 13 |
Mostly Cloudy with Showers |
| 14 |
Partly Sunny with Showers |
| 15 |
Thunderstorms |
| 16 |
Mostly Cloudy with Thunderstorms |
| 17 |
Partly Sunny with Thunderstorms |
| 18 |
Rain |
| 19 |
Flurries |
| 20 |
Mostly Cloudy with Flurries |
| 21 |
Partly Sunny with Flurries |
| 22 |
Snow |
| 23 |
Mostly Cloudy with Snow |
| 24 |
Ice |
| 25 |
Sleet |
| 26 |
Freezing Rain |
| 27 | |
| 28 | |
| 29 |
Rain and Snow |
| 30 |
Hot |
| 31 |
Cold |
| 32 |
Windy |
| 33 |
Clear |
| 34 |
Mostly Clear |
| 35 |
Partly Cloudy |
| 36 |
Intermittent Clouds (Night) |
| 37 |
Hazy Moonlight |
| 38 |
Mostly Cloudy (Night) |
| 39 |
Partly Cloudy with Showers |
| 40 |
Mostly Cloudy with Showers (Night) |
| 41 |
Partly Cloudy with Thunderstorms |
| 42 |
Mostly Cloudy with Thunderstorms (Night) |
| 43 |
Mostly Cloudy with Flurries (Night) |
| 44 |
Mostly Cloudy with Snow (Night) |
JsonFormat
Desired format of the response. Only json format is supported.
| Value | Description |
|---|---|
| json |
LocalSource
Local weather data provider information.
| Name | Type | Description |
|---|---|---|
| id |
integer (int32) |
Numeric identifier, unique to the local data provider. |
| name |
string |
Name of the local data provider. Name is displayed in the language specified by language code in URL, if available. Otherwise, Name is displayed in English or the language in which the name was provided. |
| weatherCode |
string |
Weather code provided by the local data provider. This weather code allows the forecast to be matched to icons provided by the local data provider instead of Azure Maps icons. |
PrecipitationType
Specifies the type of precipitation. Valid values are Rain, Snow, Ice, or Mix. This property is included in the response when dBZ is greater than zero.
| Value | Description |
|---|---|
| Ice |
Ice |
| Mix |
Mix |
| Rain |
Rain |
| Snow |
Snow |
UnitType
An integer representing the unit type. For example, 17 for Celsius, 18 for Fahrenheit. Can be used for unit translation. For a complete list, see Weather services in Azure Maps.
| Value | Description |
|---|---|
| 0 |
feet |
| 1 |
inches |
| 2 |
miles |
| 3 |
millimeter |
| 4 |
centimeter |
| 5 |
meter |
| 6 |
kilometer |
| 7 |
kilometersPerHour |
| 8 |
knots |
| 9 |
milesPerHour |
| 10 |
metersPerSecond |
| 11 |
hectoPascals |
| 12 |
inchesOfMercury |
| 13 |
kiloPascals |
| 14 |
millibars |
| 15 |
millimetersOfMercury |
| 16 |
poundsPerSquareInch |
| 17 |
Celsius |
| 18 |
Fahrenheit |
| 19 |
kelvin |
| 20 |
percent |
| 21 |
float |
| 22 |
integer |
| 31 |
MicrogramsPerCubicMeterOfAir |
WeatherDataUnit
Specifies to return the data in either metric units or imperial units. Default value is metric.
| Value | Description |
|---|---|
| imperial |
Return data using imperial units such as Fahrenheit (F) for temperature and mile (mi) for distance. |
| metric |
Return data using metric units such as Celsius (C) for temperature and kilometer (km) for distance. |
WeatherUnit
Specific value of a given unit related to weather.
| Name | Type | Description |
|---|---|---|
| unit |
string |
Type of unit for the returned value. |
| unitType |
Unit |
An integer representing the unit type. For example, 17 for Celsius, 18 for Fahrenheit. Can be used for unit translation. For a complete list, see Weather services in Azure Maps. |
| value |
number (float) |
Rounded value. |
WeatherUnitRange
Returned temperature values.
| Name | Type | Description |
|---|---|---|
| maximum |
Maximum temperature for the time period |
|
| minimum |
Minimum temperature for the time period. |
WindDetails
Wind details being returned including speed and direction.
| Name | Type | Description |
|---|---|---|
| direction |
Wind direction |
|
| speed |
Speed of the wind in specified unit. |
WindDirection
Wind direction
| Name | Type | Description |
|---|---|---|
| degrees |
integer (int32) |
Wind direction in Azimuth degrees, starting at true North and continuing in clockwise direction. North is 0 degrees, east is 90 degrees, south is 180 degrees, west is 270 degrees. Possible values 0-359. |
| localizedDescription |
string |
Direction abbreviation in the specified language. |