LogoLogo
  • Introduction
    • Authentication
  • API endpoints
    • Recent Measurements
    • Historical Measurements
    • Forecasts
    • Metadata
    • Reports
  • Guidelines
    • Offline Storage
    • Pagination Guide
    • FAQs
    • Code Samples
    • Release Notes
Powered by GitBook
On this page
  • 1. Daily Forecasts
  • 1.1 Using the Device ID, get the daily forecast
  • 1.2 Using the Site ID, get Daily Forecast
  • 2. Hourly Forecasts
  • 2.1 Using the Device ID, get Hourly Forecast
  • 2.2 Using the Site ID, get Hourly Forecast
  • Usage Instructions

Was this helpful?

  1. API endpoints

Forecasts

Explore the future of air quality with the Air Quality Forecasts API. This page is your guide to accessing daily and hourly forecasts, providing valuable insights into expected air quality conditions.

Uncover the power of our Forecast API through the following endpoints:

1. Daily Forecasts

Access daily air quality forecasts based on device or site IDs.

1.1 Using the Device ID, get the daily forecast

GET https://api.airqo.net/api/v2/predict/daily-forecast?device_id={device_id}

Retrieve daily air quality forecasts

Query Parameters

Name
Type
Description

token*

string

the security token

device_id

string

An string which represents the device_id

site_id

String

An string which represents the site_id

{
  "forecasts": [
    {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
]
}
{"success":false, "message":"Invalid authentication", "error":"Unauthorized."}

1.2 Using the Site ID, get Daily Forecast

GET https://api.airqo.net/api/v2/predict/daily-forecast?site_id={site_id}

Retrieve daily air quality forecasts

Query Parameters

Name
Type
Description

token*

string

the security token

device_id

string

An string which represents the device_id

site_id

String

An string which represents the site_id

{
  "forecasts": [
    {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
]
}
{"success":false, "message":"Invalid authentication", "error":"Unauthorized."}

2. Hourly Forecasts

Retrieve hourly air quality forecasts using device or site IDs.

2.1 Using the Device ID, get Hourly Forecast

GET https://api.airqo.net/api/v2/predict/hourly-forecast?device_id={device_id}

Retrieve hourly air quality forecasts

Query Parameters

Name
Type
Description

token*

string

the security token

site_id

string

An string which represents the site_id

device_id

String

An string which represents the device_id

{
  "forecasts": [
    {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
]
}
{"success":false, "message":"Invalid authentication", "error":"Unauthorized."}

2.2 Using the Site ID, get Hourly Forecast

GET https://api.airqo.net/api/v2/predict/hourly-forecast?site_id={site_id}

Retrieve hourly air quality forecasts

Query Parameters

Name
Type
Description

token*

string

the security token

site_id

string

An string which represents the site_id

device_id

String

An string which represents the device_id

{
  "forecasts": [
    {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
     {
      "health_tips:[],
      "pm2_5": 38.00850069695176,
      "time": "2023-12-01 00:00:00+00:00"
    },
]
}
{"success":false, "message":"Invalid authentication", "error":"Unauthorized."}

Usage Instructions

Incorporate our Forecast API into your applications effortlessly. Follow the guidelines in each section to make requests and receive precise daily and hourly forecasts for your specified devices or sites. Plan ahead with confidence, utilising our accurate predictions for proactive decision-making.

PreviousHistorical MeasurementsNextMetadata

Last updated 7 months ago

Was this helpful?