Air Quality Outlook

API

The app's server function returns the OpenAQ open-data archive's hourly readings for one monitoring location and up to 93 days as one CSV. It is free and needs a SkillSafe app token for this app. The AQI, NowCast and outlook are computed in the page; the same formulas are listed under “How the numbers are made” in the app.

1. Get a token

Exchange your SkillSafe API key for an app token (valid 30 days). Requests with a guest token are refused.

curl -s -X POST https://api.skillsafe.ai/v1/app-api/authorize \
  -H "Authorization: Bearer YOUR_SKILLSAFE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"slug":"air-quality-outlook"}'
# -> {"ok":true,"data":{"token":"aut_...","expires_at":"..."}}

2. Fetch hourly readings

GET https://air-quality-outlook.skillsafe.ai/api/days?location=ID&start=YYYY-MM-DD&end=YYYY-MM-DD

curl -s "https://air-quality-outlook.skillsafe.ai/api/days?location=270693&start=2026-10-01&end=2026-10-31" \
  -H "Authorization: Bearer YOUR_APP_TOKEN"

Errors

StatusMeaning
400bad_location or bad_range: check the id and the dates (93 days at most)
401No token, a guest token, or an expired token
404no_data: the archive has no files for that location in that range
502The archive did not answer

Data: OpenAQ open-data archive and its original providers; licences vary by provider. The archive is published about two to four days behind real time. Errors come back as {"error":{"code","message"}}.