Skip to main content
POST
Get Air Quality Data

Request contract

  • Method and path: POST /apis/v1/api-ninjas/get-air-quality
  • Availability: enabled
  • Request URL template: https://api.aisa.one/apis/v1/api-ninjas/get-air-quality
Complete OpenAPI definition Effective request declaration (including authentication and referenced schemas):

Cost and request rules

Usage-based pricing. Default request estimate: $0.00089 USD. The final charge depends on actual usage. Your account price may differ; use a request quote where supported.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
city
string

City name. Must provide either city or coordinates (lat/lon).

Examples:

"London"

"New York"

country
string

Country name or ISO 3166-1 alpha-2 code. Use with city parameter to disambiguate locations.

Examples:

"United States"

"US"

"United Kingdom"

"GB"

lat
number

Latitude coordinate (-90 to 90). Must be used together with lon parameter.

Required range: -90 <= x <= 90
Examples:

51.5074

40.7128

lon
number

Longitude coordinate (-180 to 180). Must be used together with lat parameter.

Required range: -180 <= x <= 180
Examples:

-0.1278

-74.006

state
string

US state name or abbreviation (for US cities only). Use with city parameter to disambiguate locations.

Examples:

"California"

"CA"

Response

Tool result data

CO
object
NO2
object
O3
object
PM10
object
PM2.5
object
SO2
object
overall_aqi
integer