Overview
Returns about 25 hourly steps from the current hour through the next 24 hours.| Item | Details |
|---|---|
| Coverage | Major cities in mainland China |
| Update frequency | About hourly |
| Timezone | Business times are usually Beijing time; station forecast store uses UTC and responses also include local time |
| Auth | X-API-Key header; module grant required |
Related
Request
GET /v1/weather/24hourly
GET /weather/24hourly
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
city_uid | integer | one of four | Internal city ID (highest priority) |
city_code | string | one of four | GB2260 admin code, e.g. 110000 |
city_name | string | one of four | City name, e.g. Beijing |
lat | number | with lon | Latitude -90~90 |
lon | number | with lat | Longitude -180~180 |
format | string | no | Response format: json (default) / csv / tsv / xml / yaml |
Example
curl -s "https://api.sunnymeteo.com/v1/weather/24hourly?city_code=310000" \
-H "X-API-Key: YOUR_KEY"
Response
JSON shape
{
"city": { "city_uid": 1, "city_code": "310000", "city_name": "上海市" },
"hourly": {
"update_time": "2026-08-24T08:00:00+08:00",
"hourly": [
{
"forecast_time": "2026-08-24T08:00:00+08:00",
"weather_code": 2,
"weather_cn": "多云",
"temp": 27.0,
"precip_1h": 0.0,
"wind_speed": 4.1
}
]
}
}
hourly.hourly[] fields
| Field | Type | Unit | Description |
|---|---|---|---|
forecast_time | string | ISO8601 | Forecast hour (on the hour) |
update_time | string | ISO8601 | Source update time |
weather_code | integer | — | Weather phenomenon code (see reference) |
weather_cn | string | — | Weather name (Chinese) |
temp | number | ℃ | Temperature |
dewpoint | number | ℃ | Dew point |
real_feel | number | ℃ | Feels-like temperature |
humidity | number | % | Relative humidity |
pressure | number | hPa | Station pressure |
mlsp | number | hPa | Mean sea-level pressure |
wind_dir | string | — | Wind direction text |
wind_degrees | number | ° | Wind direction angle (0–360) |
wind_speed | number | m/s | Wind speed |
wind_level | number | Beaufort | Beaufort wind force |
gust_speed | number | m/s | Gust speed |
gust_level | number | Beaufort | Gust force |
precip_1h | number | mm | 1-hour precipitation |
snow_1h | number | mm | 1-hour snowfall |
cloud | number | % | Total cloud cover |
vis | number | m | Visibility |
uvi | number | — | UV index |
solar | number | W/m² | Solar radiation |