IQAir AirVisual Stations API

List monitoring stations and retrieve station data

Operations 3

GET /stations List monitoring stations in a city #
GET /station Get station air quality data #
GET /nearest_station Get nearest station air quality data #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/airvisual-stations-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

airvisual-stations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IQAir AirVisual Cities Stations API
  description: The IQAir AirVisual API provides real-time and forecast air quality and weather data worldwide. It offers endpoints for listing supported countries, states, and cities, retrieving air quality data for specific locations or nearest stations, and ranking cities by air quality index.
  version: 2.0.0
  contact:
    name: IQAir
    url: https://www.iqair.com
servers:
- url: https://api.airvisual.com/v2
  description: IQAir AirVisual API v2
security:
- apiKey: []
tags:
- name: Stations
  description: List monitoring stations and retrieve station data
paths:
  /stations:
    get:
      tags:
      - Stations
      summary: List monitoring stations in a city
      description: Returns a list of active air quality monitoring stations within a specified city.
      operationId: listStations
      parameters:
      - name: key
        in: query
        required: true
        description: Your API key
        schema:
          type: string
      - name: city
        in: query
        required: true
        description: City name
        schema:
          type: string
      - name: state
        in: query
        required: true
        description: State name
        schema:
          type: string
      - name: country
        in: query
        required: true
        description: Country name
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StationsListResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /station:
    get:
      tags:
      - Stations
      summary: Get station air quality data
      description: Returns air quality and weather data for a specific monitoring station.
      operationId: getStation
      parameters:
      - name: key
        in: query
        required: true
        description: Your API key
        schema:
          type: string
      - name: station
        in: query
        required: true
        description: Station name
        schema:
          type: string
      - name: city
        in: query
        required: true
        description: City name
        schema:
          type: string
      - name: state
        in: query
        required: true
        description: State name
        schema:
          type: string
      - name: country
        in: query
        required: true
        description: Country name
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StationDataResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /nearest_station:
    get:
      tags:
      - Stations
      summary: Get nearest station air quality data
      description: Returns air quality data for the nearest monitoring station based on IP geolocation or provided GPS coordinates.
      operationId: getNearestStation
      parameters:
      - name: key
        in: query
        required: true
        description: Your API key
        schema:
          type: string
      - name: lat
        in: query
        required: false
        description: Latitude coordinate. If not provided, IP-based geolocation is used.
        schema:
          type: number
          format: double
      - name: lon
        in: query
        required: false
        description: Longitude coordinate. If not provided, IP-based geolocation is used.
        schema:
          type: number
          format: double
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StationDataResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    PollutantUnit:
      type: object
      properties:
        conc:
          type: number
          description: Pollutant concentration
        aqius:
          type: integer
          description: AQI value based on US EPA standard
        aqicn:
          type: integer
          description: AQI value based on China MEP standard
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: fail
        data:
          type: object
          properties:
            message:
              type: string
              description: Error message
    Pollution:
      type: object
      properties:
        ts:
          type: string
          format: date-time
          description: Timestamp
        aqius:
          type: integer
          description: AQI value based on US EPA standard
        mainus:
          type: string
          description: Main pollutant for US AQI (p2=PM2.5, p1=PM10, o3=Ozone, n2=NO2, s2=SO2, co=CO)
        aqicn:
          type: integer
          description: AQI value based on China MEP standard
        maincn:
          type: string
          description: Main pollutant for Chinese AQI
        p2:
          $ref: '#/components/schemas/PollutantUnit'
        p1:
          $ref: '#/components/schemas/PollutantUnit'
        o3:
          $ref: '#/components/schemas/PollutantUnit'
        n2:
          $ref: '#/components/schemas/PollutantUnit'
        s2:
          $ref: '#/components/schemas/PollutantUnit'
        co:
          $ref: '#/components/schemas/PollutantUnit'
    GeoLocation:
      type: object
      properties:
        type:
          type: string
          description: GeoJSON type
          example: Point
        coordinates:
          type: array
          items:
            type: number
            format: double
          description: Longitude and latitude coordinates
          example:
          - -118.2437
          - 34.0522
    StationDataResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        data:
          $ref: '#/components/schemas/StationData'
    Weather:
      type: object
      properties:
        ts:
          type: string
          format: date-time
          description: Timestamp
        tp:
          type: number
          description: Temperature in Celsius
        pr:
          type: number
          description: Atmospheric pressure in hPa
        hu:
          type: number
          description: Humidity percentage
        ws:
          type: number
          description: Wind speed in m/s
        wd:
          type: number
          description: Wind direction as angle (N=0, E=90, S=180, W=270)
        ic:
          type: string
          description: Weather icon code
    StationData:
      type: object
      properties:
        name:
          type: string
          description: Station name
        city:
          type: string
          description: City name
        state:
          type: string
          description: State name
        country:
          type: string
          description: Country name
        location:
          $ref: '#/components/schemas/GeoLocation'
        current:
          $ref: '#/components/schemas/Current'
        forecasts:
          type: array
          items:
            $ref: '#/components/schemas/Forecast'
        history:
          type: object
          properties:
            weather:
              type: array
              items:
                $ref: '#/components/schemas/Weather'
            pollution:
              type: array
              items:
                $ref: '#/components/schemas/Pollution'
    Current:
      type: object
      properties:
        weather:
          $ref: '#/components/schemas/Weather'
        pollution:
          $ref: '#/components/schemas/Pollution'
    StationsListResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        data:
          type: array
          items:
            type: object
            properties:
              station:
                type: string
                description: Station name
              location:
                $ref: '#/components/schemas/GeoLocation'
    Forecast:
      type: object
      properties:
        ts:
          type: string
          format: date-time
          description: Timestamp
        aqius:
          type: integer
          description: AQI value based on US EPA standard
        aqicn:
          type: integer
          description: AQI value based on China MEP standard
        tp:
          type: number
          description: Temperature in Celsius
        tp_min:
          type: number
          description: Minimum temperature in Celsius
        pr:
          type: number
          description: Atmospheric pressure in hPa
        hu:
          type: number
          description: Humidity percentage
        ws:
          type: number
          description: Wind speed in m/s
        wd:
          type: number
          description: Wind direction as angle
        ic:
          type: string
          description: Weather icon code
  securitySchemes:
    apiKey:
      type: apiKey
      in: query
      name: key
      description: API key passed as a query parameter.