Weather - Get Daily Historical Records
Use to get climatology data such as past daily record temperatures,
precipitation and snowfall at a given location.
The Get Daily Historical Records API is an HTTP GET request that returns
climatology data such as past daily record temperatures, precipitation and
snowfall at a given coordinate location. Availability of records data will vary
by location. Generally, historical data may be available as far back as the
last 5 to 40+ years, depending on the location.
GET {endpoint}/weather/historical/records/daily/json?api-version=1.1&query={query}&startDate={startDate}&endDate={endDate}
GET {endpoint}/weather/historical/records/daily/json?api-version=1.1&query={query}&startDate={startDate}&endDate={endDate}&unit={unit}
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string |
|
|
format
|
path | True |
Desired format of the response. Only |
|
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
|
end
|
query | True |
string (date) |
End date in ISO 8601 format, for example, 2019-10-28. The date range supported is 1 to 31 calendar days, so be sure to specify a startDate and endDate that does not exceed a maximum of 31 days (i.e.: startDate=2012-01-01&endDate=2012-01-31). |
|
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. |
|
start
|
query | True |
string (date) |
Start date in ISO 8601 format, for example, 2019-10-27. The date range supported is 1 to 31 calendar days, so be sure to specify a startDate and endDate that does not exceed a maximum of 31 days (i.e.: startDate=2012-01-01&endDate=2012-01-31). |
|
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 |
The request has succeeded. |
|
| Other Status Codes |
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.\n\nTo 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.\n\n#### Notes\n* 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.\n* \nThe Authorization URL is specific to the Azure public cloud instance. Sovereign clouds have unique Authorization URLs and Microsoft Entra ID configurations. \n* \nThe Azure role-based access control is configured from the Azure management plane via Azure portal, PowerShell, CLI, Azure SDKs, or REST APIs.\n* \nUsage of the Azure Maps Web SDK allows for configuration based setup of an application for multiple use cases.\n* 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.\n\n 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.\n\n 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.\n\n 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.\n\n 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
Successful Daily Historical Records Request
Sample request
GET {endpoint}/weather/historical/records/daily/json?api-version=1.1&query=39.952583,-75.165222&startDate=2012-01-20&endDate=2012-01-22
Sample response
{
"results": [
{
"date": "2012-01-20T00:00:00-04:00",
"precipitation": {
"maximum": {
"unit": "mm",
"unitType": 3,
"value": 48,
"year": 1978
}
},
"snowfall": {
"maximum": {
"unit": "cm",
"unitType": 4,
"value": 12.19,
"year": 1978
}
},
"temperature": {
"average": {
"unit": "C",
"unitType": 17,
"value": -0.6
},
"maximum": {
"unit": "C",
"unitType": 17,
"value": 18.3,
"year": 1951
},
"minimum": {
"unit": "C",
"unitType": 17,
"value": -19.4,
"year": 1984
}
}
},
{
"date": "2012-01-21T00:00:00-04:00",
"precipitation": {
"maximum": {
"unit": "mm",
"unitType": 3,
"value": 33.5,
"year": 1979
}
},
"snowfall": {
"maximum": {
"unit": "cm",
"unitType": 4,
"value": 34.29,
"year": 2014
}
},
"temperature": {
"average": {
"unit": "C",
"unitType": 17,
"value": -2.2
},
"maximum": {
"unit": "C",
"unitType": 17,
"value": 16.7,
"year": 1959
},
"minimum": {
"unit": "C",
"unitType": 17,
"value": -21.1,
"year": 1985
}
}
},
{
"date": "2012-01-22T00:00:00-04:00",
"precipitation": {
"maximum": {
"unit": "mm",
"unitType": 3,
"value": 26.2,
"year": 1987
}
},
"snowfall": {
"maximum": {
"unit": "cm",
"unitType": 4,
"value": 22.35,
"year": 1987
}
},
"temperature": {
"average": {
"unit": "C",
"unitType": 17,
"value": -0.3
},
"maximum": {
"unit": "C",
"unitType": 17,
"value": 21.1,
"year": 1906
},
"minimum": {
"unit": "C",
"unitType": 17,
"value": -21.7,
"year": 1984
}
}
}
]
}
Definitions
| Name | Description |
|---|---|
|
Daily |
Daily historical weather records. |
|
Daily |
Provides an array of historical Daily Historical Records for specified dates and locations, each with aggregate detailed climatology data for the requested day, such as record temperatures, precipitation, and snowfall. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.). |
|
Json |
Desired format of the response. Only |
|
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 |
Unit of measurement for weather data. |
|
Weather |
Specific value of a given unit related to weather. |
|
Weather |
Weather value with associated year of occurrence. |
|
Weather |
Returned temperature values. |
|
Weather |
Returned temperature values. |
DailyHistoricalRecords
Daily historical weather records.
| Name | Type | Description |
|---|---|---|
| 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. |
| precipitation |
The amount of precipitation accumulated over the specified day, measured in millimeters (mm) or inches (in), based on the specified unit in the request. |
|
| snowfall |
Returns the year in which the record high snowfall occurred on a specified date, along with the recorded amounts, measured in centimeters (cm) or inches (in), based on the unit specified in the request. |
|
| temperature |
Returns the year in which both the minimum and the maximum temperatures occurred on a specified day, along with the recorded amounts. Also returns the average temperature for the given date. Measured in degrees Celsius (C) or Fahrenheit (F), depending on the unit specified in the request. |
DailyHistoricalRecordsResult
Provides an array of historical Daily Historical Records for specified dates and locations, each with aggregate detailed climatology data for the requested day, such as record temperatures, precipitation, and snowfall.
| Name | Type | Description |
|---|---|---|
| nextLink |
string |
Contains the URL to fetch the next page of results if the response is paginated. This is useful when the response is too large to be returned in a single call, allowing users to navigate through multiple pages of results. |
| results |
Aggregates detailed climatology data for each requested day, including record temperatures, precipitation, snowfall, snow depth, and degree day summaries. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
|
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
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 |
The error object. |
JsonFormat
Desired format of the response. Only json format is supported.
| Value | Description |
|---|---|
| json |
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
Unit of measurement for weather data.
| 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. |
WeatherValue
Specific value of a given unit related to weather.
| Name | Type | Description |
|---|---|---|
| unit |
string |
Type of unit for the returned value. |
| 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 |
number (float) |
Rounded value. |
WeatherValueYear
Weather value with associated year of occurrence.
| Name | Type | Description |
|---|---|---|
| unit |
string |
Type of unit for the returned value. |
| unitType |
integer (int32) |
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 (float) |
Rounded value. |
| year |
integer (int32) |
Year the value occurred. |
WeatherValueYearMax
Returned temperature values.
| Name | Type | Description |
|---|---|---|
| maximum |
Maximum temperature for the time period. |
WeatherValueYearMaxMinAvg
Returned temperature values.
| Name | Type | Description |
|---|---|---|
| average |
Average temperature for the time period. |
|
| maximum |
Maximum temperature for the time period. |
|
| minimum |
Minimum temperature for the time period. |