Get 7-day Weather Forecast

Last Updated on : 2025-09-08 07:50:26download

Get 7-day weather forecasts by latitude and longitude.

API address

GET: /v2.0/iot-03/weather/forecast/daily

Request parameter

Parameter nameTypeINRequiredDescription
latStringquerytrueThe latitude. Valid values: -90 to 90.
lonStringquerytrueThe longitude. Valid values: -90 to 90.

Return parameter

Parameter nameTypeDescription
resultWeatherForecastDailyResutDTOThe result object.

Description of result

Parameter nameTypeDescription
coordinateCoordinateThe coordinate object.
dataListThe weather details array object.

Description of coordinate

Parameter nameTypeDescription
latStringThe latitude. Valid values: -90 to 90.
lonStringThe longitude. Valid values: -90 to 90.

Description of data

Parameter nameTypeDescription
timeLongThe timestamp of a specific forecast day.
zone_idStringThe ID of the specified time zone.
conditionStringThe real-time weather.
condition_numIntegerThe code of the weather value type.
brief_conditionStringThe brief weather overview. Valid values:
  • thunderstorm: thunderstorm.
  • drizzle: drizzle.
  • rain: rain.
  • snow: snow.
  • atmosphere: heavy fog.
  • clear: sunny.
  • clouds: cloudy.
humidityStringThe humidity.
pressureStringThe air pressure.
tempStringThe temperature.
temp_unitStringThe temperature unit. Valid values:
  • f: Fahrenheit
  • c: Celsius
temperature_minBigDecimalThe lowest temperature of the day, only available in the daily weather forecast.
temperature_maxBigDecimalThe highest temperature of the day, only available in the daily weather forecast.
real_feelStringThe apparent temperature.
apparent_temperature_minBigDecimalThe lowest apparent temperature of the day, only available in the daily weather forecast.
apparent_temperature_maxBigDecimalThe highest apparent temperature of the day, only available in the daily weather forecast.
sunrise_instLongThe sunrise timestamp.
sunset_instLongThe sunset timestamp.
sun_riseStringThe local sunrise time in the format of yyyy-MM-dd HH:mm.
sun_setStringThe local sunset time in the format of yyyy-MM-dd HH:mm.
wind_speedStringThe wind speed.
wind_dirStringThe wind direction.
uviStringThe ultraviolet intensity.

Request example

GET: /v2.0/iot-03/weather/forecast/daily?lat=30.29&lon=120.15

Return example

{
    "result": {
        "coordinate": {
            "lon": "120.15",
            "lat": "30.29"
        },
        "data": [
            {
                "sunset_inst": 1618223040000,
                "sun_set": "2021-04-12 18:24",
                "temp": "16",
                "apparent_temperature_min": {
                    "Value": "15"
                },
                "real_feel": "16",
                "temperature_max": {
                    "Value": "17"
                },
                "uvi": "0",
                "brief_condition": "rain",
                "pressure": "1013",
                "wind_dir": "N",
                "zone_id": "Asia/Shanghai",
                "condition": "Light Rain",
                "temperature_min": {
                    "Value": "15"
                },
                "apparent_temperature_max": {
                    "Value": "17"
                },
                "condition_num": 139,
                "sunrise_inst": 1618177020000,
                "humidity": "92",
                "sun_rise": "2021-04-12 05:37",
                "wind_speed": "0.9",
                "time": 1618156800000,
                "temp_unit": "c"
            }
        ]
    },
    "t": 1618215193513,
    "success": true
}

Error code

For more information, see error code.

Appendix 1: Weather overview list

condition_numcondition
120Sunny
101Heavy rain
102Thunderstorm
103Sandstorm
104Light snow
105Snow
106Freezing fog
107Rainstorm
108Isolated shower
109Dust
110Thunder and lightning
111Light shower
112Rainy
113Sleet
114Dust devil
115Ice pellet
116Strong sandstorm
117Sand blowing
118Light to moderate rain
119Mostly clear
121Fog
122Shower
123Heavy shower
124Heavy snow
125Extraordinary rainstorm
126Blizzard
127Hail
128Light to moderate snow
129Partly cloudy
130Light snow shower
131Moderate snow
132Overcast
133Needle ice
134Downpour
136Thundershower and hail
137Freezing rain
138Snow shower
139Light rain
140Haze
141Moderate rain
142Cloudy
143Thundershower
144Moderate to heavy rain
145Heavy rain to rainstorm
146Clear