openapi: 3.0.3 info: title: EPA Air Quality System (AQS) Account Type Codes Annual Data API description: 'The Air Quality System (AQS) Data Mart API provides programmatic access to ambient air sample data collected by state, local, tribal and federal air pollution control agencies from thousands of monitors across the United States. The API exposes monitor metadata, raw sample observations, daily/quarterly/annual aggregates, and quality assurance results. ' version: '1.0' contact: name: AQS Data Mart Support email: aqsdatamart@epa.gov url: https://aqs.epa.gov/aqsweb/documents/data_api.html license: name: U.S. Government Work / Public Domain url: https://www.usa.gov/government-works servers: - url: https://aqs.epa.gov/data/api description: Production AQS Data Mart API security: - emailKey: [] tags: - name: Annual Data description: Annual aggregated values. paths: /annualData/bySite: get: tags: - Annual Data summary: Get Annual Data by Site operationId: annualDataBySite parameters: - $ref: '#/components/parameters/Email' - $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Param' - $ref: '#/components/parameters/Bdate' - $ref: '#/components/parameters/Edate' - $ref: '#/components/parameters/State' - $ref: '#/components/parameters/County' - $ref: '#/components/parameters/Site' - $ref: '#/components/parameters/Cbdate' - $ref: '#/components/parameters/Cedate' responses: '200': description: Annual values content: application/json: schema: $ref: '#/components/schemas/Envelope' examples: annualDataBySite200Example: summary: Default annualDataBySite 200 response x-microcks-default: true value: status: ok message: Example response x-microcks-operation: delay: 0 dispatcher: FALLBACK /annualData/byCounty: get: tags: - Annual Data summary: Get Annual Data by County operationId: annualDataByCounty parameters: - $ref: '#/components/parameters/Email' - $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Param' - $ref: '#/components/parameters/Bdate' - $ref: '#/components/parameters/Edate' - $ref: '#/components/parameters/State' - $ref: '#/components/parameters/County' - $ref: '#/components/parameters/Cbdate' - $ref: '#/components/parameters/Cedate' responses: '200': description: Annual values content: application/json: schema: $ref: '#/components/schemas/Envelope' examples: annualDataByCounty200Example: summary: Default annualDataByCounty 200 response x-microcks-default: true value: status: ok message: Example response x-microcks-operation: delay: 0 dispatcher: FALLBACK /annualData/byState: get: tags: - Annual Data summary: Get Annual Data by State operationId: annualDataByState parameters: - $ref: '#/components/parameters/Email' - $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Param' - $ref: '#/components/parameters/Bdate' - $ref: '#/components/parameters/Edate' - $ref: '#/components/parameters/State' - $ref: '#/components/parameters/Cbdate' - $ref: '#/components/parameters/Cedate' responses: '200': description: Annual values content: application/json: schema: $ref: '#/components/schemas/Envelope' examples: annualDataByState200Example: summary: Default annualDataByState 200 response x-microcks-default: true value: status: ok message: Example response x-microcks-operation: delay: 0 dispatcher: FALLBACK /annualData/byBox: get: tags: - Annual Data summary: Get Annual Data by Bounding Box operationId: annualDataByBox parameters: - $ref: '#/components/parameters/Email' - $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Param' - $ref: '#/components/parameters/Bdate' - $ref: '#/components/parameters/Edate' - $ref: '#/components/parameters/MinLat' - $ref: '#/components/parameters/MaxLat' - $ref: '#/components/parameters/MinLon' - $ref: '#/components/parameters/MaxLon' - $ref: '#/components/parameters/Cbdate' - $ref: '#/components/parameters/Cedate' responses: '200': description: Annual values content: application/json: schema: $ref: '#/components/schemas/Envelope' examples: annualDataByBox200Example: summary: Default annualDataByBox 200 response x-microcks-default: true value: status: ok message: Example response x-microcks-operation: delay: 0 dispatcher: FALLBACK /annualData/byCBSA: get: tags: - Annual Data summary: Get Annual Data by CBSA operationId: annualDataByCBSA parameters: - $ref: '#/components/parameters/Email' - $ref: '#/components/parameters/Key' - $ref: '#/components/parameters/Param' - $ref: '#/components/parameters/Bdate' - $ref: '#/components/parameters/Edate' - $ref: '#/components/parameters/Cbsa' - $ref: '#/components/parameters/Cbdate' - $ref: '#/components/parameters/Cedate' responses: '200': description: Annual values content: application/json: schema: $ref: '#/components/schemas/Envelope' examples: annualDataByCBSA200Example: summary: Default annualDataByCBSA 200 response x-microcks-default: true value: status: ok message: Example response x-microcks-operation: delay: 0 dispatcher: FALLBACK components: parameters: State: name: state in: query required: true schema: type: string pattern: ^\d{2}$ description: 2-digit state FIPS code. MinLat: name: minlat in: query required: true schema: type: number format: float description: Minimum latitude of bounding box. MaxLon: name: maxlon in: query required: true schema: type: number format: float Bdate: name: bdate in: query required: true schema: type: string pattern: ^\d{8}$ description: Begin date (YYYYMMDD). Cbdate: name: cbdate in: query required: false schema: type: string pattern: ^\d{8}$ description: Optional change begin date (returns records updated since cbdate). County: name: county in: query required: true schema: type: string pattern: ^\d{3}$ description: 3-digit county code. MaxLat: name: maxlat in: query required: true schema: type: number format: float MinLon: name: minlon in: query required: true schema: type: number format: float Email: name: email in: query required: true schema: type: string format: email description: Registered email address. Key: name: key in: query required: true schema: type: string description: Account-specific access key. Param: name: param in: query required: true schema: type: string description: Comma-separated list of up to 5 AQS 5-digit parameter codes. Site: name: site in: query required: true schema: type: string pattern: ^\d{4}$ description: 4-digit site code. Cedate: name: cedate in: query required: false schema: type: string pattern: ^\d{8}$ description: Optional change end date. Cbsa: name: cbsa in: query required: true schema: type: string pattern: ^\d{5}$ description: 5-digit Core Based Statistical Area code. Edate: name: edate in: query required: true schema: type: string pattern: ^\d{8}$ description: End date (YYYYMMDD). Must be in the same year as bdate for most services. schemas: Header: type: object properties: status: type: string example: active request_time: type: string example: string url: type: string example: https://example.com rows: type: integer example: 100 error: type: array items: type: string example: - string Envelope: type: object required: - Header - Data properties: Header: type: array items: $ref: '#/components/schemas/Header' example: - string Data: type: array items: type: object example: - {} securitySchemes: emailKey: type: apiKey in: query name: key description: 'AQS requires `email` and `key` query parameters on every request. Register at `/signup?email=YOUR_EMAIL` to receive a key by email. '