Time Machine for Weather

Get the last 10 days of weather history data.

Let's say, today is December 30, you can get historical data from Dec. 20 to Dec. 29.

QWeather also provides historical reanalysis weather data from 2000 to present. If you need more historical weather data, please provide the following information to sales@qweather.com.

  • Company name
  • Contact information
  • City or coordinates
  • Date range

Endpoint#

GET /v7/historical/weather

Parameters#

Query parameters

  • location required
    string
    The location to be queried, only support LocationID and LocationID can be obtained by GeoAPI. For example location=101010100
  • date required
    string
    A date within the most recent 10 days, excluding today, in yyyyMMdd format.
  • lang
    string
    Language setting. See Language for behavior, configuration, and data availability
  • unit
    string
    Data unit. Use m for metric units (default) or i for imperial units.

Request example#

curl -X GET --compressed \
-H 'Authorization: Bearer your_token' \
'https://your-api-host/v7/historical/weather?location=101010100&date=20200725'

Replace your_token and your_api_host with your JWT Authentication and API Host

Try it

Response#

{
  "code": "200",
  "fxLink": "https://www.qweather.com",
  "weatherDaily": {
    "date": "2020-07-25",
    "sunrise": "05:08",
    "sunset": "19:33",
    "moonrise": "09:54",
    "moonset": "22:40",
    "moonPhase": "Waxing crescent",
    "tempMax": "33",
    "tempMin": "23",
    "humidity": "52",
    "precip": "0.0",
    "pressure": "1000"
  },
  "weatherHourly": [
    {
      "time": "2020-07-25 00:00",
      "temp": "28",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "246",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "8",
      "humidity": "49",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 01:00",
      "temp": "27",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "350",
      "windDir": "N",
      "windScale": "1",
      "windSpeed": "4",
      "humidity": "57",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 02:00",
      "temp": "25",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "175",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "7",
      "humidity": "63",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 03:00",
      "temp": "25",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "359",
      "windDir": "N",
      "windScale": "1",
      "windSpeed": "5",
      "humidity": "68",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 04:00",
      "temp": "23",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "126",
      "windDir": "SE",
      "windScale": "1",
      "windSpeed": "3",
      "humidity": "73",
      "pressure": "1000"
    },
    {
      "time": "2020-07-25 05:00",
      "temp": "23",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "166",
      "windDir": "SE",
      "windScale": "1",
      "windSpeed": "4",
      "humidity": "76",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 06:00",
      "temp": "23",
      "icon": "100",
      "text": "Sunny",
      "precip": "0.0",
      "wind360": "69",
      "windDir": "NE",
      "windScale": "1",
      "windSpeed": "2",
      "humidity": "75",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 07:00",
      "temp": "26",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "358",
      "windDir": "N",
      "windScale": "1",
      "windSpeed": "4",
      "humidity": "71",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 08:00",
      "temp": "28",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "189",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "3",
      "humidity": "57",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 09:00",
      "temp": "30",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "350",
      "windDir": "N",
      "windScale": "1",
      "windSpeed": "3",
      "humidity": "48",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 10:00",
      "temp": "32",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "2",
      "humidity": "48",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 11:00",
      "temp": "33",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "177",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "6",
      "humidity": "40",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 12:00",
      "temp": "32",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "222",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "10",
      "humidity": "39",
      "pressure": "1001"
    },
    {
      "time": "2020-07-25 13:00",
      "temp": "32",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "187",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "10",
      "humidity": "40",
      "pressure": "1000"
    },
    {
      "time": "2020-07-25 14:00",
      "temp": "33",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "266",
      "windDir": "W",
      "windScale": "2",
      "windSpeed": "9",
      "humidity": "36",
      "pressure": "1000"
    },
    {
      "time": "2020-07-25 15:00",
      "temp": "32",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "183",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "2",
      "humidity": "39",
      "pressure": "1000"
    },
    {
      "time": "2020-07-25 16:00",
      "temp": "32",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "189",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "4",
      "humidity": "39",
      "pressure": "999"
    },
    {
      "time": "2020-07-25 17:00",
      "temp": "32",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "173",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "5",
      "humidity": "42",
      "pressure": "999"
    },
    {
      "time": "2020-07-25 18:00",
      "temp": "32",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "173",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "9",
      "humidity": "39",
      "pressure": "999"
    },
    {
      "time": "2020-07-25 19:00",
      "temp": "31",
      "icon": "101",
      "text": "Cloudy",
      "precip": "0.0",
      "wind360": "185",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "4",
      "humidity": "46",
      "pressure": "999"
    },
    {
      "time": "2020-07-25 20:00",
      "temp": "30",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "185",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "8",
      "humidity": "44",
      "pressure": "999"
    },
    {
      "time": "2020-07-25 21:00",
      "temp": "29",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "208",
      "windDir": "SW",
      "windScale": "2",
      "windSpeed": "7",
      "humidity": "52",
      "pressure": "1000"
    },
    {
      "time": "2020-07-25 22:00",
      "temp": "29",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "188",
      "windDir": "S",
      "windScale": "2",
      "windSpeed": "7",
      "humidity": "57",
      "pressure": "1000"
    },
    {
      "time": "2020-07-25 23:00",
      "temp": "28",
      "icon": "104",
      "text": "Overcast",
      "precip": "0.0",
      "wind360": "180",
      "windDir": "S",
      "windScale": "1",
      "windSpeed": "5",
      "humidity": "61",
      "pressure": "1000"
    }
  ],
  "refer": {
    "sources": [
      "https://developer.qweather.com/attribution.html"
    ],
    "license": [
      "QWeather Developers License"
    ]
  }
}
  • code
    string
  • fxLink
    uri
    Responsive web page of this data, for embedded in website or APP
  • weatherDaily
    object
    Historical daily weather data
    • date
      string
      Date
    • sunrise
      string
      Sunrise time. Maybe null in high latitude area
    • sunset
      string
      Sunset time. Maybe null in high latitude area
    • moonrise
      string
      Moonrise time for the historical date; may be null
    • moonset
      string
      Moonset time for the historical date; may be null
    • moonPhase
      string
    • tempMax
      string
      The highest temperature of the day
    • tempMin
      string
      The lowest temperature of the day
    • humidity
      string
      Relative humidity in percent
    • precip
      string
      Hourly accumulated precipitation
    • pressure
      string
      Station pressure, hPa
  • weatherHourly
    array
    Historical hourly weather data
    • time
      string
      Time of the day
    • temp
      string
      Temperature, default unit: Celsius
    • icon
      string
      Icon code for weather conditions. See also QWeather Icons
    • text
      string
      Weather condition description
    • wind360
      string
      Wind direction in azimuth degree
    • windDir
      string
    • windScale
      string
    • windSpeed
      string
      Wind speed, km/h
    • humidity
      string
      Relative humidity in percent
    • precip
      string
      Precipitation, default unit: millimeters
    • pressure
      string
      Station pressure, default unit: hPa
  • refer
    object
    Data sources and licensing information
    • sources
      array
      Data source and other statements, may be null
    • license
      array
      Data license, may be null