Skip to content
Navigation

Current air quality at a location

Returns current air-quality conditions for a coordinate, proxied from the Google Air Quality API.

The server reads its Google key from the GOOGLE_AIR_QUALITY_API_KEY environment variable at startup; without it this endpoint answers 503. Errors from Google itself (for example 403 BILLING_DISABLED) are relayed as the body of an HTTP 200.

GET
https://res.aireon.ch/res_api/airquality

Authorization

  • ResApiToken
    API key in header
    required

Query parameters

  • lat
    number
    required

    WGS84 latitude.

  • lng
    number
    required

    WGS84 longitude.

Returns

200

Air-quality data passed through from Google Air Quality, or a plain-text error body.

JSON
HTML
missing 'lat'

401

Authentication missing or invalid.
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

503

The Google Air Quality API key is not configured on this server (GOOGLE_AIR_QUALITY_API_KEY is unset).
JSON
  • error
    string
    required

    Human-readable error description.

  • message
    optional
    string

    Optional underlying error message.

Type to search…

↑↓ navigate↵ selectEsc close