Air quality All docs

Air quality API Reference

2 routes. Base URL https://api.apifor.dev, authenticated with x-api-key. Failed calls are not charged. Overview, limits and sources are on the Air quality API page.

GET/v1/air-quality1 credit

Latest readings, one row per station, pollutant and averaging period. SG: NEA PSI and sub-indices for 5 regions plus hourly PM2.5. GB: about 180 Defra AURN stations, hourly PM2.5, PM10, NO2, O3, SO2 (DAQI band for NO2). 1 credit.

ParameterInTypeRules
countryquerystringSG, GB or both comma-separated (default both)
pollutantquerystringComma-separated: psi, pm25, pm10, no2, o3, so2, co
stationquerystringPart of the station name
pagequeryinteger1 to 1000 · default 1 · Page number
limitqueryinteger1 to 500 · default 100 · Rows per page
GET/v1/air-quality
curl 'https://api.apifor.dev/v1/air-quality' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": [
    {
      "id": "gb-4886",
      "country": "GB",
      "station": "Aberdeen Erroll Park",
      "latitude": 57.1574,
      "longitude": -2.09477,
      "pollutant": "no2",
      "value": 26.775,
      "unit": "µg/m³",
      "averaging": "1h",
      "index": 1,
      "measured_at": "2026-11-30T16:00:00.000Z",
      "rules": {
        "regime": "DAQI",
        "legal_basis": "Defra Daily Air Quality Index (COMEAP 2011). index is set only for NO2, the one pollutant whose DAQI band uses the hourly mean",
        "effective_from": null,
        "effective_to": null,
        "source_url": "https://uk-air.defra.gov.uk/air-pollution/daqi"
      }
    },
    {
      "id": "sg-north-pm25-24h",
      "country": "SG",
      "station": "Singapore North",
      "latitude": 1.41803,
      "longitude": 103.82,
      "pollutant": "pm25",
      "value": 9,
      "unit": "µg/m³",
      "averaging": "24h",
      "index": 39,
      "measured_at": "2026-11-30T16:00:00.000Z",
      "rules": {
        "regime": "PSI",
        "legal_basis": "NEA Pollutant Standards Index (PSI), 24-hour and sub-indices",
        "effective_from": null,
        "effective_to": null,
        "source_url": "https://www.haze.gov.sg/"
      }
    }
  ],
  "meta": {
    "total": 2,
    "page": 1,
    "per_page": 50,
    "total_pages": 1,
    "attribution": {
      "source": "National Environment Agency via data.gov.sg (https://data.gov.sg); Defra UK-AIR (https://uk-air.defra.gov.uk)",
      "licence": "SG: Singapore Open Data Licence v1.0; GB: Open Government Licence v3.0",
      "notice": "Contains information from the PSI and PM2.5 datasets accessed from data.gov.sg (National Environment Agency), made available under the te..."
    }
  }
}
  • 200Records
  • 400Validation error (refunded)
  • 502Upstream unavailable (refunded)
GET/v1/air-quality/coverageFree

Countries this service covers, with sources, licences, row counts and country-only fields. Free (0 credits), still needs an API key. Price note: Free.

GET/v1/air-quality/coverage
curl 'https://api.apifor.dev/v1/air-quality/coverage' \
  -H 'x-api-key: YOUR_API_KEY'
Example response · 200
{
  "success": true,
  "data": {
    "service": "air-quality",
    "global": false,
    "country_param": "optional",
    "param_name": "country",
    "countries": [
      {
        "country": "SG",
        "market": null,
        "subdivision_levels": [
          "region"
        ],
        "rows": null,
        "updated_at": null,
        "sources": [
          {
            "name": "National Environment Agency via data.gov.sg (PSI, PM2.5)",
            "url": "https://data.gov.sg/datasets/d_fe37906a0182569d891506e815e819b7/view",
            "licence": "Singapore Open Data Licence v1.0",
            "attribution": "Contains information from data.gov.sg, made available under the Singapore Open Data Licence v1.0 https://data.gov.sg/open-data-licence"
          }
        ],
        "local_fields": [],
        "notes": "5 regions (north, south, east, west, central). 24-hour PSI, pollutant concentrations with PSI sub-indices, and hourly PM2.5. rules.regime..."
      },
      {
        "country": "GB",
        "market": null,
        "subdivision_levels": [],
        "rows": null,
        "updated_at": null,
        "sources": [
          {
            "name": "Defra UK-AIR (AURN) SOS timeseries API",
            "url": "https://uk-air.defra.gov.uk/data/",
            "licence": "Open Government Licence v3.0",
            "attribution": "© Crown 2026 copyright Defra via uk-air.defra.gov.uk, licenced under the Open Government Licence (OGL)"
          }
        ],
        "local_fields": [],
        "notes": "About 180 AURN stations, latest hourly PM2.5, PM10, NO2, O3 and SO2 (provisional). rules.regime = DAQI; index set for NO2 only."
      }
    ]
  }
}
  • 200Coverage

Error handling · Rate limits · Prices