English
English
简体中文
Contact Us
Register
Log In
Cloud Services API ReferenceBasic APIsWeather ServiceWeatherGet Weather History for the Past 24 Hours

Get Weather History for the Past 24 Hours

Last Updated on : 2022-07-27 05:40:42

Get the weather history for the past 24 hours. The returned result is the weather conditions for the past 24 hours from the current nearest hour.

API address

GET: /v2.0/iot-03/weather/history24

Request parameter

Parameter nameTypeINRequiredDescription
latStringquerytrueThe latitude.
lonStringquerytrueThe longitude.

Return parameter

Parameter nameTypeDescription
resultHistoryWeatherResultDTOThe returned result.

Description of result

Parameter nameTypeDescription
history_weather_mapMapThe returned map. key is the timestamp and value is the weather information.

Request example

GET: /v2.0/iot-03/weather/history24
{
  "lat": "30.26227852897212",
  "lon": "120.1141665549348"
}

Return example

{
  "1658124000000": { // The time period
        "aqi": "30", // Air quality index
        "co": "0.6", // Carbon monoxide
        "condition": "Overcast", // Description of weather conditions
        "humidity": "64", // Humidity
        "no2": "7.0", // Nitrogen dioxide
        "o3": "94.0", // Ozone
        "pm10": "22.0", // PM10
        "pm25": "12.0", // PM2.5
        "pressure": "998", // Atmospheric pressure
        "rank": "242/683", // Air rating
        "real_feel": "34", // Apparent temperature
        "so2": "6.0", // Sulfur dioxide
        "sun_rise": "1658178600000", // Sunrise time
        "sun_set": "1658228460000", // Sunset time
        "temp": "32", // Temperature
        "tips": "It's a little hot. Please drink plenty of water." // Tips
        "uvi": "1", // Ultraviolet index
        "wind_dir": "W", // Wind direction
        "wind_level": "3", // Wind speed level
        "wind_speed": "5.0" // Wind speed
      }
}

Error code

For more information, see error code.