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
/v7/historical/weather
Parameters
Query parameters
-
location(required)The location to be queried, only support LocationID and LocationID can be obtained by GeoAPI. For example:location=101010100 -
date(required)Set the date, up to the most recent 10 days. The date format is yyyyMMdd. Example:date=20200531 -
langMulti-language setting, please see Language to find out how our multi-language works and how to set up. -
unitSet weather data unit, the available value areunit=mfor metric(default) andunit=ifor imperial. See more about Unit.
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
Response
The response is in JSON format and is Gzip compressed.
{
"code": "200",
"fxLink": "http://hfx.link/2ax6",
"weatherDaily": {
"date": "2020-07-25",
"sunrise": "05:08",
"sunset": "19:33",
"moonrise": "09:54",
"moonset": "22:40",
"moonPhase": "峨眉月",
"tempMax": "33",
"tempMin": "23",
"humidity": "52",
"precip": "0.0",
"pressure": "1000"
},
"weatherHourly": [
{
"time": "2020-07-25 00:00",
"temp": "28",
"icon": "100",
"text": "晴",
"precip": "0.0",
"wind360": "246",
"windDir": "西南风",
"windScale": "2",
"windSpeed": "8",
"humidity": "49",
"pressure": "1001"
},
{
"time": "2020-07-25 01:00",
"temp": "27",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "350",
"windDir": "北风",
"windScale": "1",
"windSpeed": "4",
"humidity": "57",
"pressure": "1001"
},
{
"time": "2020-07-25 02:00",
"temp": "25",
"icon": "100",
"text": "晴",
"precip": "0.0",
"wind360": "175",
"windDir": "南风",
"windScale": "2",
"windSpeed": "7",
"humidity": "63",
"pressure": "1001"
},
{
"time": "2020-07-25 03:00",
"temp": "25",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "359",
"windDir": "北风",
"windScale": "1",
"windSpeed": "5",
"humidity": "68",
"pressure": "1001"
},
{
"time": "2020-07-25 04:00",
"temp": "23",
"icon": "100",
"text": "晴",
"precip": "0.0",
"wind360": "126",
"windDir": "东南风",
"windScale": "1",
"windSpeed": "3",
"humidity": "73",
"pressure": "1000"
},
{
"time": "2020-07-25 05:00",
"temp": "23",
"icon": "100",
"text": "晴",
"precip": "0.0",
"wind360": "166",
"windDir": "东南风",
"windScale": "1",
"windSpeed": "4",
"humidity": "76",
"pressure": "1001"
},
{
"time": "2020-07-25 06:00",
"temp": "23",
"icon": "100",
"text": "晴",
"precip": "0.0",
"wind360": "69",
"windDir": "东北风",
"windScale": "1",
"windSpeed": "2",
"humidity": "75",
"pressure": "1001"
},
{
"time": "2020-07-25 07:00",
"temp": "26",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "358",
"windDir": "北风",
"windScale": "1",
"windSpeed": "4",
"humidity": "71",
"pressure": "1001"
},
{
"time": "2020-07-25 08:00",
"temp": "28",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "189",
"windDir": "南风",
"windScale": "1",
"windSpeed": "3",
"humidity": "57",
"pressure": "1001"
},
{
"time": "2020-07-25 09:00",
"temp": "30",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "350",
"windDir": "北风",
"windScale": "1",
"windSpeed": "3",
"humidity": "48",
"pressure": "1001"
},
{
"time": "2020-07-25 10:00",
"temp": "32",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "180",
"windDir": "南风",
"windScale": "1",
"windSpeed": "2",
"humidity": "48",
"pressure": "1001"
},
{
"time": "2020-07-25 11:00",
"temp": "33",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "177",
"windDir": "南风",
"windScale": "2",
"windSpeed": "6",
"humidity": "40",
"pressure": "1001"
},
{
"time": "2020-07-25 12:00",
"temp": "32",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "222",
"windDir": "西南风",
"windScale": "2",
"windSpeed": "10",
"humidity": "39",
"pressure": "1001"
},
{
"time": "2020-07-25 13:00",
"temp": "32",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "187",
"windDir": "南风",
"windScale": "2",
"windSpeed": "10",
"humidity": "40",
"pressure": "1000"
},
{
"time": "2020-07-25 14:00",
"temp": "33",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "266",
"windDir": "西风",
"windScale": "2",
"windSpeed": "9",
"humidity": "36",
"pressure": "1000"
},
{
"time": "2020-07-25 15:00",
"temp": "32",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "183",
"windDir": "南风",
"windScale": "1",
"windSpeed": "2",
"humidity": "39",
"pressure": "1000"
},
{
"time": "2020-07-25 16:00",
"temp": "32",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "189",
"windDir": "南风",
"windScale": "1",
"windSpeed": "4",
"humidity": "39",
"pressure": "999"
},
{
"time": "2020-07-25 17:00",
"temp": "32",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "173",
"windDir": "南风",
"windScale": "1",
"windSpeed": "5",
"humidity": "42",
"pressure": "999"
},
{
"time": "2020-07-25 18:00",
"temp": "32",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "173",
"windDir": "南风",
"windScale": "2",
"windSpeed": "9",
"humidity": "39",
"pressure": "999"
},
{
"time": "2020-07-25 19:00",
"temp": "31",
"icon": "101",
"text": "多云",
"precip": "0.0",
"wind360": "185",
"windDir": "南风",
"windScale": "1",
"windSpeed": "4",
"humidity": "46",
"pressure": "999"
},
{
"time": "2020-07-25 20:00",
"temp": "30",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "185",
"windDir": "南风",
"windScale": "2",
"windSpeed": "8",
"humidity": "44",
"pressure": "999"
},
{
"time": "2020-07-25 21:00",
"temp": "29",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "208",
"windDir": "西南风",
"windScale": "2",
"windSpeed": "7",
"humidity": "52",
"pressure": "1000"
},
{
"time": "2020-07-25 22:00",
"temp": "29",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "188",
"windDir": "南风",
"windScale": "2",
"windSpeed": "7",
"humidity": "57",
"pressure": "1000"
},
{
"time": "2020-07-25 23:00",
"temp": "28",
"icon": "104",
"text": "阴",
"precip": "0.0",
"wind360": "180",
"windDir": "南风",
"windScale": "1",
"windSpeed": "5",
"humidity": "61",
"pressure": "1000"
}
],
"refer": {
"sources": [
"QWeather"
],
"license": [
"QWeather Developers License"
]
}
}
-
codeSee Status Code -
fxLinkResponsive web page of this data, for embedded in website or APP -
weatherDaily.dateDate -
weatherDaily.sunriseSunrise time. Maybe null in high latitude area -
weatherDaily.sunsetSunset time. Maybe null in high latitude area -
weatherDaily.moonriseMoonrise time of current day. Maybe null -
weatherDaily.moonsetMoonset time of current day. Maybe null -
weatherDaily.moonPhaseMoon phase name -
weatherDaily.tempMaxThe highest temperature of the day -
weatherDaily.tempMinThe lowest temperature of the day -
weatherDaily.precipEstimated total precipitation for the day -
weatherDaily.pressureAtmospheric pressure, hPa -
weatherDaily.humidityDaily relative humidity in percent -
weatherHourly.timeTime of the day -
weatherHourly.tempHourly temperature -
weatherHourly.iconIcon code for hourly weather conditions of the day. See also QWeather Icons -
weatherHourly.textHourly weather condition -
weatherHourly.wind360Hourly wind direction in azimuth degree -
weatherHourly.windDirHourly wind direction -
weatherHourly.windScaleHourly wind scale -
weatherHourly.windSpeedHourly wind speed, KM/H -
weatherHourly.humidityHourly relative humidity in percent -
weatherHourly.precipHourly accumulated precipitation -
weatherHourly.pressureAtmospheric pressure, hPa -
refer.sourcesData source and other statements, may be null -
refer.licenseData license, may be null