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/weatherParameters#
Query parameters
-
location requiredstringThe location to be queried, only support LocationID and LocationID can be obtained by GeoAPI. For example
location=101010100 -
date requiredstringA date within the most recent 10 days, excluding today, in
yyyyMMddformat. -
langstringLanguage setting. See Language for behavior, configuration, and data availability
-
unitstringData unit. Use
mfor metric units (default) orifor 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
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"
]
}
}
-
codestring
-
fxLinkuriResponsive web page of this data, for embedded in website or APP
-
weatherDailyobjectHistorical daily weather data
-
datestringDate
-
sunrisestringSunrise time. Maybe null in high latitude area
-
sunsetstringSunset time. Maybe null in high latitude area
-
moonrisestringMoonrise time for the historical date; may be null
-
moonsetstringMoonset time for the historical date; may be null
-
moonPhasestring
-
tempMaxstringThe highest temperature of the day
-
tempMinstringThe lowest temperature of the day
-
humiditystringRelative humidity in percent
-
precipstringHourly accumulated precipitation
-
pressurestringStation pressure, hPa
-
-
weatherHourlyarrayHistorical hourly weather data
-
timestringTime of the day
-
tempstringTemperature, default unit: Celsius
-
iconstringIcon code for weather conditions. See also QWeather Icons
-
textstringWeather condition description
-
wind360stringWind direction in azimuth degree
-
windDirstring
-
windScalestring
-
windSpeedstringWind speed, km/h
-
humiditystringRelative humidity in percent
-
precipstringPrecipitation, default unit: millimeters
-
pressurestringStation pressure, default unit: hPa
-
-
referobjectData sources and licensing information
-
sourcesarrayData source and other statements, may be null
-
licensearrayData license, may be null
-