Weather Indices Forecast

Get weather lifestyle index forecasts for cities in China and around the world.

Endpoint#

GET /v7/indices/{days}

Parameters#

Path parameters

  • days required
    string
    Forecast days, supports up to 3 days, available value: 1d, 3d

Query parameters

  • type required
    string
    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. For all index types, see Index Types.
  • location required
    string
    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=101010100 or location=116.41,39.92
  • lang
    string
    Language 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

Try it

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"
    ]
  }
}
  • code
    string
  • updateTime
    date-time
  • fxLink
    uri
    Responsive web page of this data, for embedded in website or APP
  • daily
    array
    Daily forecast data
    • date
      date
      Forecast date
    • type
      string
      Weather indices forecast type ID
    • name
      string
      Name of weather indices type
    • level
      string
      Weather indices level
    • category
      string
      Weather indices category name
    • text
      string
      Description of the weather indices, may be null
  • refer
    object
    Data sources and licensing information
    • sources
      array
      Data source and other statements, may be null
    • license
      array
      Data license, may be null