Retrieve outdoor air quality data from the IQAir AirVisual API for a given city or GPS coordinate

domain: api.airvisual.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Get a free API key from the IQAir dashboard at iqair.com/dashboard/api (Community plan); Startup and Enterprise plans unlock additional endpoints and quota.
  2. Call GET https://api.airvisual.com/v2/nearest_city?key={key}&lat={lat}&lon={lon} for the closest station's current AQI, pollutant concentrations and weather.
  3. Call .../v2/countries, .../v2/states, .../v2/cities and .../v2/city (with country/state/city params) to browse specific named locations instead of nearest-match.
  4. Call .../v2/station (Startup plan and above) for a specific ground-level station's sensor data rather than the blended city-level estimate.
  5. Check the response's status field (success, call_limit_reached, api_key_expired, incorrect_api_key, too_many_requests) and respect the documented 10-calls/second ceiling.

Known gotchas

Related routes

get current air quality by gps coordinates or city using the iqair airvisual api
iqair.com · 5 steps · unrated
get current, forecast, or historical air pollution index and pollutant concentrations by coordinate
openweathermap.org · 5 steps · unrated
get current air quality conditions and heatmap tiles from the google air quality api
airquality.googleapis.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans