Daily Forecast (City-based)
Note: Daily Forecast (City-based) Web API v7 will be deprecated. Use Daily Forecast v1 instead.
Get weather daily forecasts for the next 3-30 days for cities around the world.
Endpoint#
GET /v7/weather/{days}Parameters#
Path parameters
-
days requiredstringForecast days, supports up to 30 days, available value:
3d,7d,10d,15d,30d
Query parameters
-
location requiredstringThe location to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI. Example:
location=101010100orlocation=116.41,39.92 -
langstringLanguage setting. See Language for behavior, configuration, and data availability
Request example#
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/v7/weather/3d?location=116.41%2C39.92'
Replace your_token and your_api_host with your JWT Authentication and API Host
Response#
{
"code": "200",
"updateTime": "2023-04-12T18:32+08:00",
"fxLink": "https://www.qweather.com/en/weather/beijing-101010100.html",
"daily": [
{
"fxDate": "2023-04-12",
"sunrise": "04:46",
"sunset": "19:45",
"moonrise": "04:11",
"moonset": "20:28",
"moonPhase": "New Moon",
"moonPhaseIcon": "800",
"tempMax": "27",
"tempMin": "20",
"iconDay": "302",
"textDay": "Thundershower",
"iconNight": "302",
"textNight": "Thundershower",
"wind360Day": "180",
"windDirDay": "S",
"windScaleDay": "1-3",
"windSpeedDay": "3",
"wind360Night": "180",
"windDirNight": "S",
"windScaleNight": "1-3",
"windSpeedNight": "3",
"humidity": "80",
"precip": "4.1",
"pressure": "1003",
"vis": "24",
"cloud": "55",
"uvIndex": "8"
},
{
"fxDate": "2023-04-13",
"sunrise": "04:46",
"sunset": "19:45",
"moonrise": "05:17",
"moonset": "21:24",
"moonPhase": "Waxing crescent",
"moonPhaseIcon": "801",
"tempMax": "27",
"tempMin": "20",
"iconDay": "302",
"textDay": "Thundershower",
"iconNight": "302",
"textNight": "Thundershower",
"wind360Day": "225",
"windDirDay": "SW",
"windScaleDay": "1-3",
"windSpeedDay": "3",
"wind360Night": "45",
"windDirNight": "NE",
"windScaleNight": "1-3",
"windSpeedNight": "3",
"humidity": "78",
"precip": "1.3",
"pressure": "1002",
"vis": "24",
"cloud": "65",
"uvIndex": "3"
},
{
"fxDate": "2023-04-14",
"sunrise": "04:46",
"sunset": "19:46",
"moonrise": "06:31",
"moonset": "22:09",
"moonPhase": "Waxing crescent",
"moonPhaseIcon": "801",
"tempMax": "30",
"tempMin": "22",
"iconDay": "101",
"textDay": "Cloudy",
"iconNight": "151",
"textNight": "Cloudy",
"wind360Day": "135",
"windDirDay": "SE",
"windScaleDay": "1-3",
"windSpeedDay": "3",
"wind360Night": "135",
"windDirNight": "SE",
"windScaleNight": "1-3",
"windSpeedNight": "3",
"humidity": "63",
"precip": "0.0",
"pressure": "1000",
"vis": "25",
"cloud": "1",
"uvIndex": "11"
}
],
"refer": {
"sources": [
"https://developer.qweather.com/attribution.html"
],
"license": [
"QWeather Developers License"
]
}
}-
codestring
-
updateTimedate-time
-
fxLinkuriResponsive web page of this data, for embedded in website or APP
-
dailyarrayDaily forecast data list
-
fxDatedateForecast date in ISO 8601 format
-
sunrisestringSunrise time. Maybe null in high latitude area
-
sunsetstringSunset time. Maybe null in high latitude area
-
moonrisestringMoonrise time for the forecast date; may be null
-
moonsetstringMoonset time for the forecast date; may be null
-
moonPhasestring
-
moonPhaseIconstringIcon code for moon phase
-
tempMaxstringThe highest temperature of the day
-
tempMinstringThe lowest temperature of the day
-
iconDaystringIcon code for daytime weather conditions. See also QWeather Icons
-
textDaystringWeather conditions for daytime
-
iconNightstringIcon code for night weather conditions. See also QWeather Icons
-
textNightstringWeather conditions for night
-
wind360DaystringDaytime wind direction in azimuth degree
-
windDirDaystringDaytime wind direction
-
windScaleDaystringDaytime wind scale
-
windSpeedDaystringDaytime wind speed, KM/H
-
wind360NightstringNightly wind direction in azimuth degree
-
windDirNightstringNightly wind direction
-
windScaleNightstringNightly wind scale
-
windSpeedNightstringNightly wind speed, KM/H
-
humiditystringRelative humidity in percent
-
precipstringEstimated total precipitation for the day
-
pressurestringStation pressure, default unit: hPa
-
uvIndexstringUV index
-
visstringVisibility, KM
-
cloudstringCloud cover in percent
-
-
referobjectData sources and licensing information
-
sourcesarrayData source and other statements, may be null
-
licensearrayData license, may be null
-