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.
Endpoints
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
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 ] }
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 ] }
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 ] }
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 ] }
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.