MeteoSource Air Quality Data API History API

Historical Time Machine data.

OpenAPI Specification

meteosource-air-quality-data-api-history-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: MeteoSource Data Air Quality History API
  description: MeteoSource provides an Air Quality API delivering hour-by-hour pollution data for any location on Earth, with forecasts up to 5 days ahead. The API also offers weather forecast data, location lookup, weather maps, and historical Time Machine data.
  version: '1.0'
  contact:
    name: MeteoSource
    url: https://www.meteosource.com/
  license:
    name: Proprietary
    url: https://www.meteosource.com/terms-of-service
servers:
- url: https://www.meteosource.com/api/v1
  description: Production
security:
- apiKeyQuery: []
- apiKeyHeader: []
tags:
- name: History
  description: Historical Time Machine data.
paths:
  /flexi/time_machine:
    get:
      summary: Get historical Time Machine data
      description: Returns historical hourly records, daily aggregates, and 40-year statistics.
      operationId: getTimeMachine
      tags:
      - History
      parameters:
      - $ref: '#/components/parameters/PlaceId'
      - $ref: '#/components/parameters/Lat'
      - $ref: '#/components/parameters/Lon'
      - name: date
        in: query
        required: true
        schema:
          type: string
          format: date
      - $ref: '#/components/parameters/Timezone'
      - $ref: '#/components/parameters/Units'
      - $ref: '#/components/parameters/Language'
      responses:
        '200':
          description: Historical weather data.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeMachineResponse'
components:
  schemas:
    TimeMachineResponse:
      type: object
      properties:
        lat:
          type: string
        lon:
          type: string
        units:
          type: string
        timezone:
          type: string
        data:
          type: array
          items:
            type: object
        daily:
          type: object
        statistics:
          type: object
  parameters:
    Lon:
      name: lon
      in: query
      description: Longitude in decimal degrees.
      schema:
        type: number
    Language:
      name: language
      in: query
      description: ISO language code.
      schema:
        type: string
        enum:
        - en
        - es
        - fr
        - de
        - pl
        - pt
        - cs
    PlaceId:
      name: place_id
      in: query
      description: MeteoSource place identifier.
      schema:
        type: string
    Lat:
      name: lat
      in: query
      description: Latitude in decimal degrees.
      schema:
        type: number
    Units:
      name: units
      in: query
      description: Unit system for the response.
      schema:
        type: string
        enum:
        - auto
        - metric
        - us
        - uk
        - ca
    Timezone:
      name: timezone
      in: query
      description: tzinfo timezone identifier.
      schema:
        type: string
  securitySchemes:
    apiKeyQuery:
      type: apiKey
      in: query
      name: key
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key