Canada Air Quality Health Index API

Official Air Quality Health Index (AQHI) readings and forecasts for about 130 Canadian communities: latest or recent hourly values with risk level, plus the forecast for tonight and the next days.

$0.50 per 1,000 records

You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.

Try it
Ready-made, maintained by usRecords, 12 fieldsv1.0

Data from api.weather.gc.ca/collections/aqhi-observations-realtime/items

Get this data

Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.

Try it

Location IDsoptional
AQHI location codes, such as AAEOU (Corner Brook) or DAFQX (Bathurst). Leave empty for the newest reading of every location. One per line, or separated by commas.
Example: AAEOU, DAFQX, ABFQA
Latest onlyoptional
True for only the newest reading per location; false for the recent hourly history.
Maximum resultsoptional
Most readings per location when latest_only is false, newest first (default 24, at most 500).
Example: 24
Include forecastoptional
True to also return the official forecast periods for each location.

Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key

For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
Endpoint
POSThttps://pullrow.dev/v1/apis/canada-air-quality-health-index/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
curl -X POST "https://pullrow.dev/v1/apis/canada-air-quality-health-index/run" \
  -H "Authorization: Bearer $PULLROW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"location_ids":["AAEOU","DAFQX","ABFQA"]},"max_items":50}'

Inputs

Send them as input in the request body. Leave one out to use its default.

location_idslist
AQHI location codes, such as AAEOU (Corner Brook) or DAFQX (Bathurst). Leave empty for the newest reading of every location.
example: AAEOU, DAFQX, ABFQA
latest_onlyyes/no
True for only the newest reading per location; false for the recent hourly history.
default: trueexample: true
max_resultsnumber
Most readings per location when latest_only is false, newest first (default 24, at most 500).
default: 24example: 24
include_forecastyes/no
True to also return the official forecast periods for each location.
default: falseexample: false

What's in each record

12 fields: 10 here, 2 technical ones under Technical details.

Basics

  • Record kind

    observation for a measured reading, forecast for a forecast period.

    Example observation

  • Forecast period

    Period a forecast covers, such as Tonight or Tomorrow (forecasts only).

    Example Tonight

  • Aqhi

    The Air Quality Health Index value, 1 (low risk) to 10 or more (very high risk).

    Example 1.65

  • Risk level

    Official band of the value: Low, Moderate, High or Very high.

    Example Low

  • Aqhi type

    The source's type of the row, such as AQHI-Observation.

    Example AQHI-Observation

Location

  • Location name

    Name of the community, such as Corner Brook.

    Example Corner Brook

  • Latitude

    Latitude of the location.

    Example 48.9521

  • Longitude

    Longitude of the location.

    Example -57.922167

Dates

  • Observed

    Time of the reading in UTC (readings only).

    Example Dec 6, 2026

  • Published

    When the forecast was published, in UTC (forecasts only).

    Example Dec 5, 2026

Technical detailsField names and types for developers, and the 2 fields hidden above

Hidden by default

These 2 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.

  • ID idSource id of the reading or forecast row.
  • Location ID location_idAQHI location code, such as AAEOU.

Field names and types

The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.

Field nameTypeShown on this page asFilled
idtextID (hidden)3 of 3
record_kindtextRecord kind3 of 3
location_idtextLocation ID (hidden)3 of 3
location_nametextLocation name3 of 3
latitudenumberLatitude3 of 3
longitudenumberLongitude3 of 3
observed_atdate and timeObserved3 of 3
published_atdate and timePublished0 of 3
forecast_periodtextForecast period0 of 3
aqhinumberAqhi3 of 3
risk_leveltextRisk level3 of 3
aqhi_typetextAqhi type3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordRecord kindForecast periodAqhiRisk levelAqhi typeLocation nameLatitudeLongitudeObservedPublished
1observation—1.65LowAQHI-ObservationCorner Brook48.9521-57.922167Dec 6, 2026—
2observation—1.73LowAQHI-ObservationBathurst47.6261-65.6283Dec 6, 2026—
3observation—2.15LowAQHI-ObservationLabrador City52.960569-66.936597Dec 6, 2026—

Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.

Reliability

Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.

Incidents and repairs

How it is kept working What a repair can't do

A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.

  • You pay only for records returned. A run that returns none costs nothing.
Known limits
  • Readings are hourly and published by Environment and Climate Change Canada a little after each hour; the source keeps only the last few days (about 9,000 readings across all locations). The newest reading of a place can be missing while its station is offline.
  • With no location_ids you get the newest reading of every location; recent history (latest_only false) needs location_ids. At most 50 locations and 500 readings per location per run.
  • Forecasts are the official period forecasts of the latest publication (tonight, tomorrow, tomorrow night, day 3): one row each. Not every location has a forecast.
  • The risk level is the official AQHI band: 1-3 Low, 4-6 Moderate, 7-10 High, above 10 Very high. Values in readings have two decimals; forecasts are whole numbers.
  • Requests are spaced about half a second apart, so a run over many locations takes a minute or more.
  • Data from Environment and Climate Change Canada under the Open Government Licence - Canada; credit Environment and Climate Change Canada as the source. It does not endorse this API.

Version history

A run uses the live version unless the request names another one with version.