Premium APIGET /v1/history

Historical Weather API

Access weather records for any date and location going back to 1 January 2010.

Query temperature, precipitation, wind, humidity, and conditions for any single day or multi-day range (up to 30 days per request) from January 2010 to yesterday. Our AI layer validates and gap-fills historical records against multiple station networks, giving you a clean, consistent time series wherever you query.

What You Get with the Historical Weather API

14+ years of history

Records start from 1 January 2010, giving you over a decade of verifiable data for trend analysis.

Up to 30 days per request

Retrieve a date range in one call using dt and end_dt — no need to loop through day-by-day requests.

AI-validated & gap-filled

Missing station data is interpolated using neighbouring sources and AI quality checks, minimising nulls.

Hourly breakdown available

Each day includes an hourly array, so you can pinpoint the exact hour a temperature record was reached.

Same location syntax

Use city names, coordinates, postcodes, or IATA codes — consistent with all other WeatherAI.io endpoints.

Pattern analysis ready

Clean JSON output integrates directly with Python, R, and BI tools for climate and seasonality modelling.

Who Uses This API

From startups to enterprise teams, the Historical Weather API powers a wide range of real-world applications.

Insurance & risk underwriting

Validate claims and model risk by querying exact weather conditions on any historical date at any location.

Academic & climate research

Build long time-series datasets for papers, reports, and climate-change analyses without scraping raw station data.

Agriculture & yield modelling

Correlate historical weather patterns with crop yields to improve future predictions and risk pricing.

Legal & forensic investigation

Provide weather evidence for litigation — accident investigations, liability claims, and contract disputes.

Request Parameters

ParameterTypeRequiredDescriptionExample
qstringRequiredLocation — city, lat/lon, postcode, or IPTokyo
dtstringRequiredStart date (YYYY-MM-DD, on or after 2010-01-01)2023-07-15
end_dtstringOptionalEnd date (max 30 days from dt)2023-07-20
unitsstringOptionalmetric | imperial | bothmetric

Authenticate every request with the X-API-Key header.

Code Example

Request

cURL
curl "https://api.weatherai.io/v1/history?q=Tokyo&dt=2023-07-15&end_dt=2023-07-17&units=metric" \
  -H "X-API-Key: your-api-key"

Response

200 OKapplication/json
{
  "location": { "name": "Tokyo", "country": "Japan" },
  "history": [
    {
      "date": "2023-07-15",
      "temperature": { "max": { "celsius": 35 }, "min": { "celsius": 27 }, "avg": { "celsius": 31 } },
      "precipitation": { "mm": 2.4 },
      "wind": { "maxKph": 22 },
      "humidity": { "avg": 82 }
    }
  ]
}

Response Fields

FieldTypeDescription
locationobjectLocation name, coordinates, country, timezone
history[]arrayOne object per day in the requested range
history[].datestringDate in YYYY-MM-DD
history[].temperature.max/min/avgobjectDaily temperature range
history[].precipitation.mmnumberTotal daily precipitation
history[].wind.maxKphnumberMaximum wind speed that day
history[].humidity.avgnumberAverage relative humidity %
history[].hourly[]arrayHourly conditions for each day

Start Using the Historical Weather API Today

Create a free account and get your API key in under a minute. 50 free Premium calls per day. No credit card required.

Get Your Free API Key