In this article
Get Forecasts
This endpoint will get forecast data using the Open Weather Map API.
URL
https://{{HOST}}/weather/openweathermap/data/2.5/forecast/daily?q={query}
Method
GET
Required IMS Scopes
- weatherapi_all
URL Query Params
| Name | Description | Schema |
|---|---|---|
| q optional |
city name and IS0O 3166 country code divided by a comma | string |
| id optional |
city id | number |
| lat optional |
latitude coordinates | number |
| lon optional |
longitude coordinates | number |
| cnt optional |
number of days returned (1 to 16) | number |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authentication | Bearer {access_token} required |
IMS access token |
Example
Request
curl -X GET
'https://{{HOST}}/weather/openweathermap/data/2.5/forecast/daily?q=53202'
-H 'Authorization: Bearer {{access_token}}'
Response
{
"city": {
"id": 420041234,
"name": "Milwaukee",
"coord": {
"lon": -87.9225,
"lat": 43.035
},
"country": "US",
"population": 0
},
"cod": "200",
"message": 0.0532654,
"cnt": 7,
"list": [
{
"dt": 1524675600,
"temp": {
"day": 283.4,
"min": 272.36,
"max": 285.17,
"night": 272.36,
"eve": 284.06,
"morn": 283.4
},
"pressure": 1000.85,
"humidity": 44,
"weather": [
{
"id": 800,
"main": "Clear",
"description": "sky is clear",
"icon": "01d"
}
],
"speed": 5.76,
"deg": 10,
"clouds": 0
},
{
"dt": 1524762000,
"temp": {
"day": 290.61,
"min": 273.44,
"max": 292.41,
"night": 280.53,
"eve": 290.97,
"morn": 273.44
},
"pressure": 993.78,
"humidity": 36,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"speed": 5.02,
"deg": 248,
"clouds": 32,
"rain": 2.1
},
{
"dt": 1524848400,
"temp": {
"day": 280.85,
"min": 273.96,
"max": 285.13,
"night": 273.96,
"eve": 282.87,
"morn": 274.4
},
"pressure": 992.89,
"humidity": 86,
"weather": [
{
"id": 600,
"main": "Snow",
"description": "light snow",
"icon": "13d"
}
],
"speed": 3.68,
"deg": 270,
"clouds": 100,
"rain": 3.02,
"snow": 0.27
},
{
"dt": 1524934800,
"temp": {
"day": 279.13,
"min": 272.79,
"max": 279.81,
"night": 275.11,
"eve": 279.81,
"morn": 272.79
},
"pressure": 1007.43,
"humidity": 0,
"weather": [
{
"id": 800,
"main": "Clear",
"description": "sky is clear",
"icon": "01d"
}
],
"speed": 5.04,
"deg": 4,
"clouds": 0
},
{
"dt": 1525021200,
"temp": {
"day": 280.4,
"min": 273.87,
"max": 280.71,
"night": 273.87,
"eve": 280.71,
"morn": 274.59
},
"pressure": 1012.82,
"humidity": 0,
"weather": [
{
"id": 800,
"main": "Clear",
"description": "sky is clear",
"icon": "01d"
}
],
"speed": 2.2,
"deg": 56,
"clouds": 0
},
{
"dt": 1525107600,
"temp": {
"day": 286.38,
"min": 274.88,
"max": 286.38,
"night": 282.59,
"eve": 286.06,
"morn": 274.88
},
"pressure": 1009.31,
"humidity": 0,
"weather": [
{
"id": 500,
"main": "Rain",
"description": "light rain",
"icon": "10d"
}
],
"speed": 4.33,
"deg": 177,
"clouds": 8,
"rain": 0.77
},
{
"dt": 1525194000,
"temp": {
"day": 290.62,
"min": 282.35,
"max": 291.58,
"night": 286.46,
"eve": 291.58,
"morn": 282.35
},
"pressure": 1001.41,
"humidity": 0,
"weather": [
{
"id": 501,
"main": "Rain",
"description": "moderate rain",
"icon": "10d"
}
],
"speed": 6.26,
"deg": 175,
"clouds": 12,
"rain": 3.01
}
]
}