Weather Indices Forecast
Get weather indices forecast data for cities in China and around the world.
- Weather Indices in China: Comfort Indices, Car Wash Indices, Dressing Indices, Cold Indices, Sports Indices, Travel Indices, UV Indices, Air Pollution Indices, Air Conditioning Indices, Allergy Indices, Sunglasses Indices, Makeup Indices, Sunshine Indices, Traffic Indices, Fishing Indices, Sun Protection Indices
- Weather Indices worldwide: Sports Indices, Car Wash Indices, UV Indices, Fishing Indices
Endpoint
/v7/indices/{days}
Parameters
Path parameters
-
days(required)Forecast days, supports up to 3 days, available value:1d1 days forecast.3d3 days forecast.
Query parameters
-
location(required)The 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 -
type(required)Weather 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, and all indices type see Indices Info. -
langMulti-language setting, please see Language to find out how our multi-language works and how to set up.
Request example
curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your_api_host/v7/indices/1d?type=1,2&location=101010100'Replace your_token and your_api_host with your JWT Authentication and API Host
Response
The response is in JSON format and is Gzip compressed.
{
"code": "200",
"updateTime": "2021-12-16T18:35+08:00",
"fxLink": "http://hfx.link/2ax2",
"daily": [
{
"date": "2021-12-16",
"type": "1",
"name": "运动指数",
"level": "3",
"category": "较不宜",
"text": "天气较好,但考虑天气寒冷,风力较强,推荐您进行室内运动,若户外运动请注意保暖并做好准备活动。"
},
{
"date": "2021-12-16",
"type": "2",
"name": "洗车指数",
"level": "3",
"category": "较不宜",
"text": "较不宜洗车,未来一天无雨,风力较大,如果执意擦洗汽车,要做好蒙上污垢的心理准备。"
}
],
"refer": {
"sources": [
"QWeather"
],
"license": [
"QWeather Developers License"
]
}
}
-
codeSee Status Code -
updateTimeAPI last update time -
fxLinkResponsive web page of this data, for embedded in website or APP -
daily.dateForecast date -
daily.typeWeather indices forecast type ID -
daily.nameName of weather indices type -
daily.levelWeather indices level -
daily.categoryWeather indices category name -
daily.textDescription of the weather indices, may be null -
refer.sourcesData source and other statements, may be null -
refer.licenseData license, may be null
Level and Type
See Indices Info.