Reshape your business with Ambee’s air quality API

Protect consumers and shape products by accessing unparalleled accuracy, all with Ambee’s Air Quality API. Make your first call now.

accurate weather API

Ambee delivers air quality data
you can trust

Our air quality data is powered by advanced algorithms, and over 60 trusted data sources delivering unmatched accuracy even for data-sparse regions.

Learn more about how we achieve high accuracy rates and see them in real time.

From data to action–the power of Ambee’s air quality intelligence

More than 99% of the world breathes harmful air–but not everyone is exposed to the same air quality. The air you’re breathing isn’t the same as the air 5 miles away.

Ambee’s hyperlocal and real-time data ensures that you know exactly what you’re exposed to. Backed by science and trusted by Fortune 100 companies, Ambee’s Air Quality API is the perfect fit for all your needs.

Here’s why–

Air Quality Data Intellegence
aqi forecast data

Real-time accuracy

Ambee's AQ API provides real-time data compliant with US EPA standards, sourced from various channels, and rigorously processed with advanced algorithms.

global air quality api

Global coverage

Ambee Air Quality API offers worldwide data coverage, ideal for global applications and services.

real time air quality data

Customization

The AQ API is developer-friendly, allowing easy customization to match specific business and developer needs.

air quality forecast

Scalability

All Ambee's APIs can scale to meet your application's data requirements, from small websites to large-scale applications.

air quality index api

Environmental insights

Gain valuable insights into product and process impacts with historical data and air quality forecasts.

air quality index forecast

Integration

Our APIs easily integrate into web and mobile apps, supporting various programming languages and platforms for developer convenience.

air quality index forecast

User-friendly documentation

Find answers to code, use case, and tutorial questions with our comprehensive documentation.

air quality index forecast

Support

Our team is here to assist you with quick responses to all your queries and requests. Start with your first API call now.

Sign up for API

Response Parameters

Air Quality API Response Parameters

How to format your request

How to Format Air Quality Data API

Response parameters

PM2.5

Particulate matter < 2.5um (ug/m3)

PM10

Particulate matter < 10um (ug/m3)

SO2

Sulphur dioxide conc (ppb)

NO2

Nitrogen dioxide conc (ppb)

O3

OZONE conc (ppb)

CO

Carbon monoxide conc (ppm)

AQI

Air quality index

updatedAt

ISO timestamp of event in UTC

aqiInfo

Brief info about the effects of the AQI returned

How to format your request    

How to Format Air Quality Data

How to format your request

Name

End-points

Parameters

Parameters

Parameters

Sample URL

Latest

/latest/by-lat-lng

/latest/by-postal-code

/latest/by-city

/latest/by-country-code

latLatitude of the place to search

lngLongitude of the place to search

postalCodePostal code of the place to search

countryCode2 digit ISO country code of the postal code entered

cityName of the city to searchlimit (optional)

Specifies the number of records to be returned

countryCode2 digit ISO country code of the country to search

limit (optional)Specifies the number of records to be returned

https://api.ambeedata.com/latest/by-lat-lng?lat=12&lng=77

 https://api.ambeedata.com/latest/by-postal-code?postalCode=560020&countryCode=IN
https://api.ambeedata.com/latest/by-city?city=Bengaluru
https://api.ambeedata.com/latest/by-country-code?countryCode=IN

Historical

/history/by-lat-lng

/history/by-postal-code

latLatitude of the place to search

lngLongitude of the place to search

fromStarting timestamp of the period to search for in the format YYYY-MM-DD hh:mm:ss

toEnding timestamp of the period to search for in the format YYYY-MM-DD hh:mm:ss

postalCodePostal code of the place to search

countryCode2 digit ISO country code of the postal code entered

fromStarting timestamp of the period to search for in the format YYYY-MM-DD hh:mm:ss

toEnding timestamp of the period to search for in the format YYYY-MM-DD hh:mm:ss

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

Forecast

Forecast is on custom demand only

How to format your request    

How to Format Air Quality Data
TUTORIALS

How to get started with Ambee’s air quality API

Here’s how you can get started with the Air Quality API in just a few clicks-

Step 1: The first thing you need is Ambee’s API key. To generate that, all you need is to sign up to Ambee’s API dashboard and start your free trial that provides 100 API records/day for 15 days. 

Step 2: Find your unique API key and save it for subsequent steps.

Step 3: Follow the documentation and tutorials to find your base URL. Combine your API Key and specify your desired parameters.

Step 4: Make your first API call and get free 100 API records per day for the next 15 days.
How to Send API Request Using Postman

The structure of API responses (JSON objects)

Metadata Information:
  1. timestamp:

    A timestamp indicating when the data was retrieved or when it pertains to.

  2. location:

    Information about the geographic location for which the data is provided, such as latitude and longitude, city name, country, or station name.

Air Quality Index (AQI) Information:
  1. aqi:

    The Air Quality Index value, representing the overall air quality at the given location.

  2. category:

    A categorical representation of the AQI value (e.g., "Good", "Moderate", "Unhealthy", etc.).

  3. dominant_pollutant:

    The concentration of the dominant pollutant in the air, typically in micrograms per cubic meter (µg/m³) or parts per million (ppm).

  4. concentration:

    The pollutant that is primarily responsible for the current air quality level.

Pollutant-specific Information:
For each pollutant monitored, you may have separate entries with details like:
  1. name:

    The name of the pollutant (e.g., "PM2.5", "PM10", "NO2", "CO", "O3", "SO2", etc.).

  2. concentration:

    The concentration of the pollutant in the air at the location.

Additional Information:
  1. data_source:

    Information about the source of the data, which can include the organization or agency providing the data.

  2. units:

    Units of measurement for the pollutant concentrations (e.g., µg/m³, ppm).

  3. message:

    A message or description of the current air quality conditions or any important notes.

Here's a simplified example of what an Air Quality API response might look like:
  1. HTML Code Editor

    Copy Code

    Copied

Sample Responses

{    
  "message": "success",    
   "stations": [      
        {            
             "CO": 1.453,            
             "NO2": 25.291,            
             "OZONE": 8.032,            
             "PM10": 52.24,            
             "PM25": 21.943,            
             "SO2": 1.898,            
             "city": "Bangalore",            
             "countryCode": "IN",            
             "division": "Bangalore",            
             "lat": 11.98625,            
             "lng": 77.550478,            
             "placeName": "Race course road",            
             "postalCode": "560020",            
             "state": "Karnataka",            
             "updatedAt": "2021-05-29T13:00:00.000Z",            
             "AQI": 72,            
             "aqiInfo": {  
                "pollutant": "PM2.5",                
                 "concentration": 21.943,                
                 "category": "Moderate"          
              }        
          }    
      ]
   }
{    
  "message": "success",    
   "data": [
      {            
          "NO2": 8.049,            
          "PM10": 69.444,            
          "PM25": 36.102,            
          "CO": 0.332,            
          "SO2": 5.873,            
          "OZONE": 6.174,            
          "AQI": 102,            
          "lat": 17.2739,            
          "lng": 78.6938,            
          "createdAt": "2021-03-05T12:00:00.000Z",            
          "postalCode": "508213",            
          "majorPollutant": "PM2.5"      
      }    
    ]
   }
{    
   "message": "success",    
   "stations": [      
      {          
          "CO": 1.453,          
         "NO2": 25.291,            
          "OZONE": 8.032,            
          "PM10": 52.24,            
         "PM25": 21.943,            
         "SO2": 1.898,            
         "city": "Bangalore",            
         "countryCode": "IN",            
          "division": "Bangalore",            
          "lat": 11.98625,            
         "lng": 77.550478,            
         "placeName": "Race course road",            
         "postalCode": "560020",            
          "state": "Karnataka",            
          "updatedAt": "2021-05-29T13:00:00.000Z",            
          "AQI": 72,            
         "aqiInfo": {                
             "pollutant": "PM2.5",                
             "concentration": 21.943,                
              "category": "Moderate"          
           }      
        }  
     ]
  }

Describe response status codes and error handling.

Response Status Codes:

200 OK: Successful request; expected data returned.

204 No Content: Successful request, but no data to return.

400 Bad Request: Invalid parameters or formatting in the request.

401 Unauthorized: Lack of proper authentication or an invalid API key.

403 Forbidden: Insufficient permissions to access a resource.

404 Not Found: Requested resource doesn't exist.

429 Too Many Requests: Exceeded rate limit for your API key.

5xx Server Errors: Indicates a server-side issue; retry or contact support.

Error handling best practices:

Check Status Codes: Always review the HTTP status code in the API response.

Parse Error Messages: Look for error messages in the response for additional context.

Implement Retry Strategies: Use exponential backoff for transient errors or rate limiting.

Use Meaningful Error Messages: Display user-friendly error messages to aid issue resolution.

Monitor and Alert: Set up monitoring and alerts for unusual error rates in your API usage.

Use cases and examples

Improve Healthcare
Improve patient care and treatment by helping understand environmental triggers.

Personalize Marketing
Plug our AQ data into marketing campaigns for hyper-targeting of ads and personalized communication across all channels.

Assess Risks
Assess future risks to the environment and climate caused by poor air quality with accurate air quality forecast data.

Enhance Customer Experience
Increase consumer engagement with real-time air quality updates, raising awareness about ambient air pollution.

Air Quality Data Use Cases

The complete guide to Ambee’s air quality technology

We’ve created a comprehensive guide covering everything you would want to know about Ambee’s air quality data. From A to Z. This guide covers Ambee AQ’s foundations, processes, accuracy, and the many ways in which we’re using air quality intelligence at the forefront of our innovation. Have a look.

Current pricing solutions

ambee review
Evaluation

Get started for free

The perfect way to test and evaluate your build before launching your product to scale.
ambee api price
Understand your use case
ambee api
Test our data and response time
ambee climate api
Make a solid plan before committing
Try our APIs
pricing ambee
Enterprise

Integrate Ambee’s APIs at scale

For fast-growing organizations looking for environmental APIs for multiple needs
ambee pricing api
Exclusively tailored APIs to meet every business use case
ambee api pricing
Easy access to large datasets and specialized features
ambee api call price
Easy access to large datasets and specialized features
CONTACT EXPERT

Access historical air quality data now

Analyze the past for insights using historical air quality data of over 30+ years. Our accurate and granular data can help you make informed business decisions and help your customers breathe better.

Frequently asked questions

How is air quality index measured?

AQI is a unit of measuring air pollution levels in a location using air quality data. The AQI ranges from 1 to 500. Anything exceeding 500 is known to be fatal.

How can I use an API key in air quality API calls?

Copy and paste the API key provided on the dashboard to succesfully request of air quality data via air quality API calls. You will get the AQ data in respective set of records.

Several applications of air quality data?

Air quality data can be used to prevent respiratory health ailments, determine best times for marketing products such as anti-pollution masks, understand the hyper-local environment in the area and schedule regular HVAC maintainence.

What is the Air Quality Forecast?

Air quality forecasting is the process of predicting air pollutions levels to protect public health. The air quality forecast involves giving an early warning against harmful air pollutants.

What is the good air quality index?

A good air quality index is when the air pollution data gives an AQI level of less than 50. The lesser the AQI, the better is the air quality.