wxdb.ca
A free JSON API for historical Canadian weather observations, spanning 8,800+ stations from coast to coast.
Community project — not affiliated with or endorsed by Environment and Climate Change Canada.

Overview

wxdb.ca provides read-only access to hourly, daily, and monthly surface weather observations collected by Environment and Climate Change Canada (ECCC) from stations across Canada. Records date back to the 1800s at some sites.

All endpoints return GeoJSON FeatureCollections, making responses directly compatible with mapping tools and geospatial libraries. Results are filtered and paginated with a cursor-based scheme so large time ranges can be consumed incrementally.

8,800+
Climate stations
1840s
Earliest records
3
Resolutions
GeoJSON
Response format

Endpoints

GET /stations Find stations by location with metadata and active year ranges
GET /observations/hourly Hourly surface obs: temp, humidity, wind, visibility, pressure, weather
GET /observations/daily Daily summaries: min/max/mean temp, precipitation, snow, wind gusts
GET /observations/monthly Monthly climate normals: mean extremes, totals, and gust records

Geographic filters

Every request requires exactly one geographic filter. Observations also require start and end (ISO 8601).

station_id=<int>

Single station by numeric ID

lat=<f>&lon=<f>&radius_km=<f>

Point + radius in kilometres

postal_code=<FSA>&radius_km=<f>

Canadian postal code centroid + radius

bbox=minLon,minLat,maxLon,maxLat

Bounding box (decimal degrees)

polygon=<WKT>

Arbitrary WKT polygon

Examples

Find stations within 25 km of Ottawa
GET https://wxdb.ca/stations?lat=45.42&lon=-75.69&radius_km=25

{
  "type": "FeatureCollection",
  "count": 28,
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [-75.67, 45.32] },
      "properties": {
        "station_id": 49568,
        "name": "OTTAWA INTL A",
        "province": "ONTARIO",
        "elevation_m": 114.0,
        "hly_first_year": 2011, "hly_last_year": 2026,
        "dly_first_year": 2011, "dly_last_year": 2026
      }
    },
    ... 27 more stations
  ]
}
Hourly observations — Ottawa airport, Jan 15 2024
GET https://wxdb.ca/observations/hourly?station_id=49568
    &start=2024-01-15T00:00:00Z&end=2024-01-15T06:00:00Z&limit=3

{
  "type": "FeatureCollection",
  "cursor": "eyJ0IjoiMjAyNC0wMS0xNVQwMjowMDowMCswMDowMCIsInMiOjQ5NTY4fQ==",
  "count": 3,
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [-75.67, 45.32] },
      "properties": {
        "time": "2024-01-15T00:00:00+00:00",
        "station_id": 49568,
        "temp_c": -6.0,
        "dew_point_temp_c": -12.4,
        "rel_hum_pct": 61,
        "wind_dir_10s_deg": 25,
        "wind_spd_kmh": 31,
        "wind_chill": -14,
        "visibility_km": 16.1,
        "stn_press_kpa": 99.52,
        "weather": "Mostly Cloudy",
        "station_name": "OTTAWA INTL A",
        "province": "ONTARIO"
      }
    },
    ... pass cursor token to retrieve next page
  ]
}
Daily observations — Calgary area, bounding box
GET https://wxdb.ca/observations/daily?bbox=-114.3,50.9,-113.9,51.2
    &start=2023-07-01T00:00:00Z&end=2023-07-08T00:00:00Z&limit=3

{
  "type": "FeatureCollection",
  "count": 3,
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [-114.02, 51.11] },
      "properties": {
        "date": "2023-07-01T00:00:00+00:00",
        "station_id": 2205,
        "max_temp_c": 26.3,
        "min_temp_c": 10.5,
        "mean_temp_c": 18.4,
        "total_rain_mm": 0.0,
        "total_snow_cm": 0.0,
        "spd_max_gust_kmh": 44,
        "station_name": "CALGARY INT'L A",
        "province": "ALBERTA"
      }
    },
    ... more stations / days
  ]
}
Daily observations — postal code lookup, Calgary, July 2024
GET https://wxdb.ca/observations/daily?postal_code=T2P+0A1&radius_km=10
    &start=2024-07-01T00:00:00Z&end=2024-07-04T00:00:00Z&limit=2

{
  "type": "FeatureCollection",
  "count": 2,
  "features": [
    {
      "type": "Feature",
      "geometry": { "type": "Point", "coordinates": [-114.0, 51.11] },
      "properties": {
        "date": "2024-07-01T00:00:00+00:00",
        "station_id": 27211,
        "max_temp_c": 21.2,
        "min_temp_c": 11.9,
        "mean_temp_c": 16.5,
        "total_precip_mm": 1.0,
        "spd_max_gust_kmh": 56,
        "station_name": "CALGARY INT'L CS",
        "province": "ALBERTA"
      }
    },
    ... more stations within radius
  ]
}

Python client

A first-party Python wrapper is available on PyPI at pypi.org/project/canwxdb. It handles pagination automatically and can return results as a pandas DataFrame or GeoPandas GeoDataFrame.

Install
pip install canwxdb[pandas]
Daily observations near a postal code → DataFrame
# Fetch all daily observations within 50 km of Calgary T2P 0A1, full year 2024.
# All pages are fetched and combined automatically.
from canwxdb import Client

client = Client()
df = client.daily(
    postal_code="T2P0A1",
    radius_km=50,
    start="2024-01-01",
    end="2024-12-31",
    format="dataframe",
    show_progress=True,   # tqdm progress bar, great for notebooks
)

# df is a standard pandas DataFrame — latitude and longitude included
print(df[["date", "station_name", "mean_temp_c", "total_precip_mm"]].head())
#         date          station_name  mean_temp_c  total_precip_mm
# 0 2024-01-01  CALGARY INT'L CS         -11.4              0.0
# 1 2024-01-02  CALGARY INT'L CS          -9.8              0.0
# 2 2024-01-03  CALGARY INTL A            -8.1              0.4
# ...

Pagination

Observation responses include a cursor field. When non-null, pass it as ?cursor=<token> on the next request to retrieve the following page. A null cursor means you have reached the end of the result set. The default and maximum page size is 5,000 observations.

Licence & attribution

Weather data — ECCC. Observation data is sourced from Environment and Climate Change Canada and is made available under the Environment and Climate Change Canada Data Servers End-use Licence. Users of wxdb.ca data must comply with that licence, including providing attribution to ECCC in any downstream products or publications. The licence requires the following notice:

Contains information licensed under the Environment and Climate Change Canada Data Servers End-use Licence.

Postal code data — GeoNames. Station-to-postal-code lookups use data from GeoNames (CA_full dataset), licensed under the Creative Commons Attribution 4.0 International Licence.