Weather Indices Forecast
Endpoint#
GET /v7/indices/{days}Parameters#
Path parameters
-
days requiredstringForecast days, supports up to 3 days, available value:
1d,3d
Query parameters
-
type requiredstringWeather indices type ID, including car wash index, clothing index, fishing index, etc. You can get multiple types of weather indices at one time, and multiple types are separated by comma, e.g.,
type=3,5. For all index types, see Index Types. -
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/indices/1d?type=1&location=116.41%2C39.92'
Replace your_token and your_api_host with your JWT Authentication and API Host
Response#
{
"code": "200",
"updateTime": "2021-12-16T18:35+08:00",
"fxLink": "https://www.qweather.com/en/indices/chaoyang-101010300.html",
"daily": [
{
"date": "2021-12-16",
"type": "1",
"name": "Sports",
"level": "3",
"category": "Poor",
"text": "The weather is generally good, but it is cold and windy. Indoor exercise is recommended. If exercising outdoors, keep warm and prepare properly."
},
{
"date": "2021-12-16",
"type": "2",
"name": "Car Wash",
"level": "3",
"category": "Poor",
"text": "Car washing is not recommended. No rain is expected in the next day, but strong winds may cover your car with dust after washing."
}
],
"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
-
datedateForecast date
-
typestringWeather indices forecast type ID
-
namestringName of weather indices type
-
levelstringWeather indices level
-
categorystringWeather indices category name
-
textstringDescription of the weather indices, may be null
-
-
referobjectData sources and licensing information
-
sourcesarrayData source and other statements, may be null
-
licensearrayData license, may be null
-