Weather - Get Quarter Day Forecast

Use to get a Quarter-Day Forecast for the next 1, 5, 10, or 15 days.

The Get Quarter-Day Forecast API is an HTTP GET request that returns a detailed weather forecast by quarter-day for the next 1, 5, 10, or 15 days for a given location. Response data is presented by quarters of the day - morning, afternoon, evening, and overnight. Details such as temperature, humidity, wind, precipitation, and UV index are returned.

GET https://atlas.microsoft.com/weather/forecast/quarterDay/json?api-version=1.1&query={query}
GET https://atlas.microsoft.com/weather/forecast/quarterDay/json?api-version=1.1&query={query}&unit={unit}&duration={duration}&language={language}

URI Parameters

Name In Required Type Description
format
path True

JsonFormat

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

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 quester-day forecast responses are returned. Supported values are:

  • 1 - Return forecast data for the next day. Returned by default.
  • 5 - Return forecast data for the next 5 days.
  • 10 - Return forecast data for next 10 days.
  • 15 - Return forecast data for the next 15 days.
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

WeatherDataUnit

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

Specifies which account is intended for usage in conjunction with the Microsoft Entra ID security model. It represents a unique ID for the Azure Maps account and can be retrieved from the Azure Maps management plane Account API. To use Microsoft Entra ID security in Azure Maps see the following articles for guidance.

Responses

Name Type Description
200 OK

QuarterDayForecastResult

OK

Other Status Codes

ErrorResponse

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-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.

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 weather forecast by a given location

Sample request

GET https://atlas.microsoft.com/weather/forecast/quarterDay/json?api-version=1.1&query=47.632346,-122.138874&duration=1

Sample response

{
  "forecasts": [
    {
      "date": "2019-11-14T00:00:00-08:00",
      "effectiveDate": "2019-11-14T07:00:00-08:00",
      "quarter": 0,
      "iconCode": 12,
      "iconPhrase": "Showers",
      "phrase": "Mostly cloudy with a shower in spots",
      "temperature": {
        "minimum": {
          "value": 6.9,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 11.1,
          "unit": "C",
          "unitType": 17
        }
      },
      "realFeelTemperature": {
        "minimum": {
          "value": 7.9,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 11.2,
          "unit": "C",
          "unitType": 17
        }
      },
      "dewPoint": {
        "value": 7.5,
        "unit": "C",
        "unitType": 17
      },
      "relativeHumidity": 90,
      "wind": {
        "direction": {
          "degrees": 206,
          "localizedDescription": "SSW"
        },
        "speed": {
          "value": 3.7,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "windGust": {
        "direction": {
          "degrees": 192,
          "localizedDescription": "SSW"
        },
        "speed": {
          "value": 9.3,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "visibility": {
        "value": 2,
        "unit": "km",
        "unitType": 6
      },
      "cloudCover": 99,
      "hasPrecipitation": true,
      "precipitationType": "Rain",
      "precipitationIntensity": "Light",
      "precipitationProbability": 55,
      "thunderstormProbability": 20,
      "totalLiquid": {
        "value": 0.6,
        "unit": "mm",
        "unitType": 3
      },
      "rain": {
        "value": 0.6,
        "unit": "mm",
        "unitType": 3
      },
      "snow": {
        "value": 0,
        "unit": "cm",
        "unitType": 4
      },
      "ice": {
        "value": 0,
        "unit": "mm",
        "unitType": 3
      }
    },
    {
      "date": "2019-11-14T00:00:00-08:00",
      "effectiveDate": "2019-11-14T13:00:00-08:00",
      "quarter": 1,
      "iconCode": 12,
      "iconPhrase": "Showers",
      "phrase": "Mostly cloudy with a shower in spots",
      "temperature": {
        "minimum": {
          "value": 11.3,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 13.7,
          "unit": "C",
          "unitType": 17
        }
      },
      "realFeelTemperature": {
        "minimum": {
          "value": 11.3,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 14.7,
          "unit": "C",
          "unitType": 17
        }
      },
      "dewPoint": {
        "value": 8.4,
        "unit": "C",
        "unitType": 17
      },
      "relativeHumidity": 76,
      "wind": {
        "direction": {
          "degrees": 296,
          "localizedDescription": "WNW"
        },
        "speed": {
          "value": 3.7,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "windGust": {
        "direction": {
          "degrees": 206,
          "localizedDescription": "SSW"
        },
        "speed": {
          "value": 9.3,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "visibility": {
        "value": 8,
        "unit": "km",
        "unitType": 6
      },
      "cloudCover": 96,
      "hasPrecipitation": true,
      "precipitationType": "Rain",
      "precipitationIntensity": "Light",
      "precipitationProbability": 50,
      "thunderstormProbability": 20,
      "totalLiquid": {
        "value": 0.3,
        "unit": "mm",
        "unitType": 3
      },
      "rain": {
        "value": 0.3,
        "unit": "mm",
        "unitType": 3
      },
      "snow": {
        "value": 0,
        "unit": "cm",
        "unitType": 4
      },
      "ice": {
        "value": 0,
        "unit": "mm",
        "unitType": 3
      }
    },
    {
      "date": "2019-11-14T00:00:00-08:00",
      "effectiveDate": "2019-11-14T19:00:00-08:00",
      "quarter": 2,
      "iconCode": 7,
      "iconPhrase": "Cloudy",
      "phrase": "Cloudy",
      "temperature": {
        "minimum": {
          "value": 9.8,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 10.4,
          "unit": "C",
          "unitType": 17
        }
      },
      "realFeelTemperature": {
        "minimum": {
          "value": 8.5,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 9.8,
          "unit": "C",
          "unitType": 17
        }
      },
      "dewPoint": {
        "value": 7,
        "unit": "C",
        "unitType": 17
      },
      "relativeHumidity": 81,
      "wind": {
        "direction": {
          "degrees": 172,
          "localizedDescription": "S"
        },
        "speed": {
          "value": 9.3,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "windGust": {
        "direction": {
          "degrees": 174,
          "localizedDescription": "S"
        },
        "speed": {
          "value": 13,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "visibility": {
        "value": 10,
        "unit": "km",
        "unitType": 6
      },
      "cloudCover": 93,
      "hasPrecipitation": false,
      "precipitationProbability": 25,
      "thunderstormProbability": 0,
      "totalLiquid": {
        "value": 0,
        "unit": "mm",
        "unitType": 3
      },
      "rain": {
        "value": 0,
        "unit": "mm",
        "unitType": 3
      },
      "snow": {
        "value": 0,
        "unit": "cm",
        "unitType": 4
      },
      "ice": {
        "value": 0,
        "unit": "mm",
        "unitType": 3
      }
    },
    {
      "date": "2019-11-14T00:00:00-08:00",
      "effectiveDate": "2019-11-15T01:00:00-08:00",
      "quarter": 3,
      "iconCode": 12,
      "iconPhrase": "Showers",
      "phrase": "Cloudy with a little rain",
      "temperature": {
        "minimum": {
          "value": 8.9,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 9.9,
          "unit": "C",
          "unitType": 17
        }
      },
      "realFeelTemperature": {
        "minimum": {
          "value": 6.2,
          "unit": "C",
          "unitType": 17
        },
        "maximum": {
          "value": 8.6,
          "unit": "C",
          "unitType": 17
        }
      },
      "dewPoint": {
        "value": 6.9,
        "unit": "C",
        "unitType": 17
      },
      "relativeHumidity": 84,
      "wind": {
        "direction": {
          "degrees": 164,
          "localizedDescription": "SSE"
        },
        "speed": {
          "value": 9.3,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "windGust": {
        "direction": {
          "degrees": 165,
          "localizedDescription": "SSE"
        },
        "speed": {
          "value": 14.8,
          "unit": "km/h",
          "unitType": 7
        }
      },
      "visibility": {
        "value": 9,
        "unit": "km",
        "unitType": 6
      },
      "cloudCover": 99,
      "hasPrecipitation": true,
      "precipitationType": "Rain",
      "precipitationIntensity": "Light",
      "precipitationProbability": 59,
      "thunderstormProbability": 0,
      "totalLiquid": {
        "value": 1.4,
        "unit": "mm",
        "unitType": 3
      },
      "rain": {
        "value": 1.4,
        "unit": "mm",
        "unitType": 3
      },
      "snow": {
        "value": 0,
        "unit": "cm",
        "unitType": 4
      },
      "ice": {
        "value": 0,
        "unit": "mm",
        "unitType": 3
      }
    }
  ]
}

Definitions

Name Description
DayQuarter

Quarter of the day.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IconCode

Numeric value representing an image that displays the iconPhrase. Please refer to Weather services in Azure Maps for details.

JsonFormat

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

PrecipitationType

Specifies the type of precipitation ("Rain" "Snow" "Ice" or "Mix"). If dbz is zero, precipitationType is not present in the response.

QuarterDayForecast
QuarterDayForecastResult
UnitType

Numeric ID value associated with the type of unit being displayed. Can be used for unit translation. Please refer to Weather services in Azure Maps for details.

WeatherDataUnit

Specifies to return the data in either metric units or imperial units. Default value is metric.

WeatherUnit

Specific value of a given unit related to weather.

WeatherUnitRange

Returned temperature values.

WindDetails

Wind details being returned including speed and direction.

WindDirection

Wind direction

DayQuarter

Quarter of the day.

Name Type Description
0

Integer

1

Integer

2

Integer

3

Integer

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

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

Error response

Name Type Description
error

ErrorDetail

The error object.

IconCode

Numeric value representing an image that displays the iconPhrase. Please refer to Weather services in Azure Maps for details.

Name Type Description
1

Integer

10

Integer

11

Integer

12

Integer

13

Integer

14

Integer

15

Integer

16

Integer

17

Integer

18

Integer

19

Integer

2

Integer

20

Integer

21

Integer

22

Integer

23

Integer

24

Integer

25

Integer

26

Integer

27

Integer

28

Integer

29

Integer

3

Integer

30

Integer

31

Integer

32

Integer

33

Integer

34

Integer

35

Integer

36

Integer

37

Integer

38

Integer

39

Integer

4

Integer

40

Integer

41

Integer

42

Integer

43

Integer

44

Integer

5

Integer

6

Integer

7

Integer

8

Integer

9

Integer

JsonFormat

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

Name Type Description
json

string

The JavaScript Object Notation Data Interchange Format

PrecipitationType

Specifies the type of precipitation ("Rain" "Snow" "Ice" or "Mix"). If dbz is zero, precipitationType is not present in the response.

Name Type Description
Ice

string

Ice

Mix

string

Mix

Rain

string

Rain

Snow

string

Snow

QuarterDayForecast

Name Type Description
cloudCover

integer

Percent representing cloud cover.

date

string

Date of the forecast as example, 2019-10-27T00:00:00

dewPoint

WeatherUnit

The dewpoint temperature in specified unit. The dewpoint temperature is the temperature that the air must be cooled to in order to reach saturation.

effectiveDate

string

Date and time of the beginning of the forecast quarter displayed in ISO 8601 format, for example, 2019-10-27T19:39:57-08:00.

hasPrecipitation

boolean

Indicates the presence or absence of precipitation. True indicates the presence of precipitation, false indicates the absence of precipitation.

ice

WeatherUnit

Ice

iconCode

IconCode

Numeric value representing an image that displays the iconPhrase. Please refer to Weather services in Azure Maps for details.

iconPhrase

string

Phrase description of the icon. Displayed in specified language. For example, 'Sunny'.

phrase

string

Short summary phrase summary for quarter.

precipitationIntensity

string

Description of the intensity.

precipitationProbability

integer

Percent representing the probability of precipitation. For example, '20'.

precipitationType

PrecipitationType

Specifies the type of precipitation ("Rain" "Snow" "Ice" or "Mix"). If dbz is zero, precipitationType is not present in the response.

quarter

DayQuarter

Quarter of the day.

rain

WeatherUnit

Rain

realFeelTemperature

WeatherUnitRange

RealFeelâ„¢ Temperature values for the quarter.

relativeHumidity

integer

Relative humidity is the amount of water vapor present in air expressed as a percentage of the amount needed for saturation at the same temperature.

snow

WeatherUnit

Snow

temperature

WeatherUnitRange

Temperature values for the quarter.

thunderstormProbability

integer

Percent representing the probability of a thunderstorm. For example, '10'.

totalLiquid

WeatherUnit

Total liquid equivalent of precipitation during the forecast period.

visibility

WeatherUnit

Visibility in specified unit. A measure of the distance at which an object or light can be clearly discerned.

wind

WindDetails

Wind details being returned including speed and direction.

windGust

WindDetails

Wind gust. Wind gust is a sudden, brief increase in speed of the wind.

QuarterDayForecastResult

Name Type Description
forecasts

QuarterDayForecast[]

Forecast data for each quarter in the response.

UnitType

Numeric ID value associated with the type of unit being displayed. Can be used for unit translation. Please refer to Weather services in Azure Maps for details.

Name Type Description
0

Integer

1

Integer

10

Integer

11

Integer

12

Integer

13

Integer

14

Integer

15

Integer

16

Integer

17

Integer

18

Integer

19

Integer

2

Integer

20

Integer

21

Integer

22

Integer

3

Integer

31

Integer

4

Integer

5

Integer

6

Integer

7

Integer

8

Integer

9

Integer

WeatherDataUnit

Specifies to return the data in either metric units or imperial units. Default value is metric.

Name Type Description
imperial

string

Return data in imperial units. Some example units of imperial system are Fahrenheit and mile.

metric

string

Return data in metric units. Some example units of metric system are Celsius and kilometer.

WeatherUnit

Specific value of a given unit related to weather.

Name Type Description
unit

string

Type of unit for the returned value.

unitType

UnitType

Numeric ID value associated with the type of unit being displayed. Can be used for unit translation. Please refer to Weather services in Azure Maps for details.

value

number

Rounded value.

WeatherUnitRange

Returned temperature values.

Name Type Description
maximum

WeatherUnit

Maximum temperature for the time period

minimum

WeatherUnit

Minimum temperature for the time period.

WindDetails

Wind details being returned including speed and direction.

Name Type Description
direction

WindDirection

Wind direction

speed

WeatherUnit

Speed of the wind in specified unit.

WindDirection

Wind direction

Name Type Description
degrees

integer

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.