menu

Home

search

Air Quality

Introduction

The Ambee Air Quality API provides real-time, hyper-local air quality data for over a million postal codes across 150+ countries, cities, and coordinates. It offers data granularity at a spatial resolution of 500 meters and follows the US EPA standard for Air Quality Index.

Air Quality Latest

Access real-time air quality data for over 150 countries with a specified resolution of 500 meters (0.3 miles).

Latest - Geospatial search

Get air quality data using geographic coordinates (latitude/longitude).

Try Playgroundarr
GET
https://api.ambeedata.com/latest/by-lat-lng
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

lat

number
required
Latitude of the search location.
Allowed Value:
Latitude must be between -90 and 90

lng

number
required
Longitude of the search location.
Allowed Value:
Longitude must be between -180 and 180
SAMPLE URL
https://api.ambeedata.com/latest/by-lat-lng?lat=12&lng=77
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/latest/by-lat-lng?lat=12.9889055&lng=77.574044", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Latest - Postalcode search

Get air quality data using the postal code of your desired location.

Try Playgroundarr
GET
https://api.ambeedata.com/latest/by-postal-code
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

postalCode

string
required
Postal code of the place to search.
Example:
560020

countryCode

string
required
3 letter ISO country code
Example:
GBR, USA, IND, etc
SAMPLE URL
https://api.ambeedata.com/latest/by-postal-code?postalCode=560020&countryCode=IND
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/latest/by-postal-code?postalCode=560020&countryCode=IND", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Latest - Citywise Search

Get air quality data by entering the name of the city.

Try Playgroundarr
GET
https://api.ambeedata.com/latest/by-city
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

city

string
required
Name of the city to search.

limit

number
optional
Specifies the number of records to be returned
Default Value:
1
SAMPLE URL
https://api.ambeedata.com/latest/by-city?city=Bengaluru
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/latest/by-city?city=Bengaluru", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Latest - Countrywise search

Get air quality data by entering the 3-digit ISO country code.

Try Playgroundarr
GET
https://api.ambeedata.com/latest/by-country-code
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

countryCode

string
required
3 letter ISO country code
Example:
GBR, USA, IND, etc

limit

number
optional
Specifies the number of records to be returned
Default Value:
1
SAMPLE URL
https://api.ambeedata.com/latest/by-country-code?countryCode=IND
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/latest/by-country-code?countryCode=IND", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Air Quality Historical

Access historical air quality data for your selected timeframe across the supported regions.

Access 30+ years of historical AQ data. Download historical data.

History - Geospatial search

Get air quality data using geographic coordinates (latitude/longitude).

Try Playgroundarr
GET
https://api.ambeedata.com/history/by-lat-lng
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

lat

number
required
Latitude of the search location.
Allowed Value:
Latitude must be between -90 and 90

lng

number
required
Longitude of the search location.
Allowed Value:
Longitude must be between -180 and 180

from

date
required
Starting timestamp of the search period.
Format:
YYYY-MM-DD hh:mm:ss

to

date
required
Ending timestamp of the search period.
Format:
YYYY-MM-DD hh:mm:ss
SAMPLE URL
https://api.ambeedata.com/history/by-lat-lng?lat=12&lng=73&from=2020-07-13 12:16:44&to=2020-07-18 08:16:44
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/history/by-lat-lng?lat=12.9889055&lng=77.574044&from=2020-07-13 12:16:44&to=2020-07-14 12:16:44", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

History - Postalcode search

Get air quality data using the postal code of your desired location.

Try Playgroundarr
GET
https://api.ambeedata.com/history/by-postal-code
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

postalCode

string
required
Postal code of the place to search.
Example:
560020

countryCode

string
required
3 letter ISO country code
Example:
GBR, USA, IND, etc

from

date
required
Starting timestamp of the search period.
Format:
YYYY-MM-DD hh:mm:ss

to

date
required
Ending timestamp of the search period.
Format:
YYYY-MM-DD hh:mm:ss
SAMPLE URL
https://api.ambeedata.com/history/by-postal-code?postalCode=560020&countryCode=IND&from=2020-12-01 00:00:00&to=2020-12-03 00:00:00
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/history/by-postal-code?postalCode=560020&countryCode=IND&from=2020-07-13 12:16:44&to=2020-07-14 12:16:44", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Air Quality Forecast

The air quality forecasts API provides predictions of air quality levels, allowing you to plan and take preventive measures against poor air conditions.

The API delivers forecasts for up to 48 hours in advance, offering data at a level of specific geographic coordinates. This API is ideal for applications that require accurate and timely air quality information, such as environmental monitoring, health advisories, and smart city integrations. With easy-to-use endpoints and robust data coverage, you can seamlessly integrate air quality forecasts into your platform or service.

You can get a forecast of the air up to 4 days in advance. This service is available on demand. Get in touch.

Forecast - Geospatial search

Get air quality forecasts for the USA using specific geographic coordinates.

Try Playgroundarr
GET
https://api.ambeedata.com/forecast/aq/by-lat-lng
Details
Request
Response

Headers

x-api-key

string
required
Unique key obtained after signup.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Content-type

string
optional
Default Value:
application/JSON

Accept-Language

string
optional
Specify your language with English as the default language.
Allowed Value:
LANGUAGE_CODE
Default Value:
English

Query Parameters

lat

number
required
Latitude of the search location.
Allowed Value:
Latitude must be between -90 and 90

lng

number
required
Longitude of the search location.
Allowed Value:
Longitude must be between -180 and 180
SAMPLE URL
https://api.ambeedata.com/forecast/aq/by-lat-lng?lat=12&lng=73
SAMPLE REQUEST
const http = require("https"); const options = { "method": "GET", "hostname": "api.ambeedata.com", "port": null, "path": "/forecast/aq/by-lat-lng?lat=12.9889055&lng=77.574044", "headers": { "x-api-key": "API_KEY", "Content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();

Search

search-icon

All

APIs

Integrations

Webhooks

Map Tiles

Changelog


Was this page helpful?
happy-emoji

Yes

sad-emoji

No