Skip to content

General info

The following Infocenter routes support querying for weather:

  • /areas/{id}
  • /civicStructures/{id}
  • /conditions/{id}
  • /events/{id}
  • /foodEstablishments/{id}
  • /localbusinesses/{id}
  • /lodgingbusinesses/{id}
  • /places/{id}
  • /tours/{id}
  • /webcams/{id}

Infocenter weather service uses Azure Maps Weather as background service to get and deliver weather. To find additional information like definitions for unitType and iconCode you should follow Microsoft weather services. A list of all weather icons can be found under references.

Weather

To get weather forecast apply /weather to the end of the route e.g. /places/{id}/weather

Query parameters:

Name Type Description
duration int Time frame of the returned weather conditions. By default, the most current weather conditions will be returned. The default value is 0. Supported values are: 0, 6 and 24 - return the most current weather conditions or from the past 6/24 hours.
details bool Return full details for the current conditions.

Sample response:

[
    {
        "dateTime": "2020-10-01T13:01:00+00:00",
        "phrase": "Sunny",
        "iconCode": 1,
        "hasPrecipitation": false,
        "isDayTime": true,
        "temperature": {
            "value": 12.6,
            "unit": "C",
            "unitType": 17
        }
    }
]

Also, you can find definitions for response properties by following this link: Microsoft weather services

Daily forecast

To get daily weather forecast apply /weather/forecast/daily to the end of the route e.g. /places/{id}/weather/forecast/daily

Query parameters:

Name Type Description
duration int Specifies for how many days the daily forecast responses are returned. Available values are: 1, 5, 10, 25, 45. The default value is 1.

Sample response:

[
    {
        "date": "2020-10-01T05:00:00+00:00",
        "temperature": {
            "minimum": {
                "value": 5.3,
                "unit": "C",
                "unitType": 17
            },
            "maximum": {
                "value": 13.1,
                "unit": "C",
                "unitType": 17
            }
        },
        "realFeelTemperature": {
            "minimum": {
                "value": 2.2,
                "unit": "C",
                "unitType": 17
            },
            "maximum": {
                "value": 14.3,
                "unit": "C",
                "unitType": 17
            }
        },
        "realFeelTemperatureShade": {
            "minimum": {
                "value": 2.2,
                "unit": "C",
                "unitType": 17
            },
            "maximum": {
                "value": 11.5,
                "unit": "C",
                "unitType": 17
            }
        },
        "hoursOfSun": 6.5,
        "degreeDaySummary": {
            "heating": {
                "value": 9.0,
                "unit": "C",
                "unitType": 17
            },
            "cooling": {
                "value": 0.0,
                "unit": "C",
                "unitType": 17
            }
        },
        "airAndPollen": [
            {
                "name": "AirQuality",
                "value": 18,
                "category": "Good",
                "categoryValue": 1,
                "type": "Particle Pollution"
            },
            {
                "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": 4,
                "category": "Moderate",
                "categoryValue": 2
            }
        ],
        "day": {
            "iconCode": 6,
            "iconPhrase": "Mostly cloudy",
            "hasPrecipitation": false,
            "shortPhrase": "Turning cloudy",
            "longPhrase": "Turning cloudy",
            "precipitationProbability": 25,
            "thunderstormProbability": 24,
            "rainProbability": 25,
            "snowProbability": 0,
            "iceProbability": 0,
            "wind": {
                "direction": {
                    "degrees": 204.0,
                    "localizedDescription": "SSW"
                },
                "speed": {
                    "value": 11.1,
                    "unit": "km/h",
                    "unitType": 7
                }
            },
            "windGust": {
                "direction": {
                    "degrees": 200.0,
                    "localizedDescription": "SSW"
                },
                "speed": {
                    "value": 20.4,
                    "unit": "km/h",
                    "unitType": 7
                }
            },
            "totalLiquid": {
                "value": 0.0,
                "unit": "mm",
                "unitType": 3
            },
            "rain": {
                "value": 0.0,
                "unit": "mm",
                "unitType": 3
            },
            "snow": {
                "value": 0.0,
                "unit": "cm",
                "unitType": 4
            },
            "ice": {
                "value": 0.0,
                "unit": "mm",
                "unitType": 3
            },
            "hoursOfPrecipitation": 0.0,
            "hoursOfRain": 0.0,
            "hoursOfSnow": 0,
            "hoursOfIce": 0,
            "cloudCover": 57
        },
        "night": {
            "iconCode": 12,
            "iconPhrase": "Showers",
            "hasPrecipitation": true,
            "precipitationType": "Rain",
            "precipitationIntensity": "Light",
            "shortPhrase": "Mostly cloudy, a little rain",
            "longPhrase": "Mostly cloudy with a little rain",
            "precipitationProbability": 63,
            "thunderstormProbability": 21,
            "rainProbability": 63,
            "snowProbability": 0,
            "iceProbability": 0,
            "wind": {
                "direction": {
                    "degrees": 180.0,
                    "localizedDescription": "S"
                },
                "speed": {
                    "value": 7.4,
                    "unit": "km/h",
                    "unitType": 7
                }
            },
            "windGust": {
                "direction": {
                    "degrees": 169.0,
                    "localizedDescription": "S"
                },
                "speed": {
                    "value": 16.7,
                    "unit": "km/h",
                    "unitType": 7
                }
            },
            "totalLiquid": {
                "value": 4.5,
                "unit": "mm",
                "unitType": 3
            },
            "rain": {
                "value": 4.5,
                "unit": "mm",
                "unitType": 3
            },
            "snow": {
                "value": 0.0,
                "unit": "cm",
                "unitType": 4
            },
            "ice": {
                "value": 0.0,
                "unit": "mm",
                "unitType": 3
            },
            "hoursOfPrecipitation": 2.0,
            "hoursOfRain": 2.0,
            "hoursOfSnow": 0,
            "hoursOfIce": 0,
            "cloudCover": 93
        },
        "sources": [
            "AccuWeather"
        ]
    }
]

Also, you can find definitions for response properties following this link: https://docs.microsoft.com/en-us/rest/api/maps/weather/getdailyforecastpreview#definitions

Hourly forecast

To get hourly weather forecast apply /weather/forecast/hourly to the end of the route e.g. /places/{id}/weather/forecast/hourly

Query parameters:

Name Type Description
duration int Time frame of the returned weather forecast. By default, the forecast data for the next hour will be returned. Available values are: 1, 12, 24, 72, 120, 240. The default value is 1.

Sample response:

[
    {
        "date": "2020-10-01T14:00:00+00:00",
        "iconCode": 4,
        "iconPhrase": "Intermittent clouds",
        "hasPrecipitation": false,
        "isDaylight": true,
        "temperature": {
            "value": 13.1,
            "unit": "C",
            "unitType": 17
        },
        "realFeelTemperature": {
            "value": 12.3,
            "unit": "C",
            "unitType": 17
        },
        "wetBulbTemperature": {
            "value": 8.6,
            "unit": "C",
            "unitType": 17
        },
        "dewPoint": {
            "value": 4.2,
            "unit": "C",
            "unitType": 17
        },
        "wind": {
            "direction": {
                "degrees": 200.0,
                "localizedDescription": "SSW"
            },
            "speed": {
                "value": 14.8,
                "unit": "km/h",
                "unitType": 7
            }
        },
        "windGust": {
            "speed": {
                "value": 18.5,
                "unit": "km/h",
                "unitType": 7
            }
        },
        "relativeHumidity": 55,
        "visibility": {
            "value": 16.1,
            "unit": "km",
            "unitType": 6
        },
        "cloudCover": 63,
        "ceiling": {
            "value": 6248.0,
            "unit": "m",
            "unitType": 5
        },
        "uvIndex": 2,
        "uvIndexPhrase": "Low",
        "precipitationProbability": 7,
        "rainProbability": 7,
        "snowProbability": 0,
        "iceProbability": 0,
        "totalLiquid": {
            "value": 0.0,
            "unit": "mm",
            "unitType": 3
        },
        "rain": {
            "value": 0.0,
            "unit": "mm",
            "unitType": 3
        },
        "snow": {
            "value": 0.0,
            "unit": "cm",
            "unitType": 4
        },
        "ice": {
            "value": 0.0,
            "unit": "mm",
            "unitType": 3
        }
    }
]

Also you can find definitions for response properties following this link: https://docs.microsoft.com/en-us/rest/api/maps/weather/gethourlyforecastpreview#definitions


Last update: June 21, 2021 12:41:50