CMUCCDC Open API
A hub for the CCDC's environmental data APIs, for developers, researchers, organizations, and external systems that want to make further use of the data.
-
1
Register and verify your account
Register a user account and wait for verification/approval according to your user type. The system will then display an API key for making requests.
User Account -
2
Send your API key
Every request must send the key via the header
View Access RightsAuthorization: Bearer {your_api_key} -
3
Try calling the API
Use the Try it button in the documentation, or open the API Console after logging in to test an endpoint and view the actual response.
API Console
Terms of Use for the CCDC API
- General public users may call the API to retrieve data from up to 10 installation points per account. If additional API access is required, please contact the CCDC to request special permission on a case-by-case basis.
- This API provides data only from outdoor installation points. If a user requires data from indoor installation points (indoor rooms), or an API that combines both types of installation points, a request must be submitted to the CCDC on a case-by-case basis for approval.
- Users who display data obtained from the API on other platforms must cite the source of the data using wording such as "This data is supported by the Climate Change Data Center, Chiang Mai University (CCDC CMU)" or "Data from the DustBoy air quality monitoring device" or similar wording, or display the DustBoy or CCDC CMU logo on the platform to identify the source of the data.
- If the CCDC finds that the source of the data is not cited as required, the Center reserves the right to suspend API access without prior notice.
- Applicants for the API consent to the CCDC using their registration data to develop/improve/expand the DustBoy project, without disclosing any personal data, and permit the logging of computer traffic data in accordance with the Computer Crime Act.
- If you wish to request access to additional data beyond the rights specified in the system, please contact the CCDC through the following channels:
📧 Email: dustboy.3e@gmail.com
📞 Phone: 064-069-1698
Air Quality Index
The Air Quality Index is a way of reporting air quality data in a format that is easy for the general public to understand, in order to inform the public about the air pollution situation in each area, as well as the health effects of air pollution. A single Air Quality Index value is used to represent the concentration of six types of air pollutants, namely:
- Particulate matter not exceeding 2.5 microns (PM2.5) is dust with a diameter of no more than 2.5 microns, produced by the combustion of vehicle fuels, the burning of agricultural materials, forest fires, and industrial processes. Because these particles are so small, they can easily spread into the alveoli of the lungs, causing respiratory diseases and various lung diseases. If inhaled in large amounts or over a long period, they accumulate in lung tissue, reduce lung function, and cause bronchitis and asthma symptoms.
- Particulate matter not exceeding 10 microns (PM10) is dust with a diameter of no more than 10 microns, produced by fuel combustion, open burning, industrial processes, grinding, milling, or dust from construction. When this dust is inhaled into the body, it accumulates in the respiratory system and adversely affects health.
- Ozone gas (O3) is an air pollutant in the atmosphere at the earth's surface, formed by a reaction between oxides of nitrogen and volatile organic compounds, catalyzed by sunlight. It has health effects, causing irritation of the eyes and irritation of the respiratory system and various mucous membranes, reducing lung function and causing fatigue, especially in children, the elderly, and people with chronic lung disease.
- Carbon monoxide gas (CO) is a gas produced by the incomplete combustion of fuels containing carbon. It can accumulate in the body by combining with hemoglobin in red blood cells. If this gas is inhaled into the body, carbon monoxide reacts with hemoglobin in the blood, forming carboxyhemoglobin (CoHb), which reduces the transport of oxygen to the body's cells, causing fatigue and making the heart work harder.
- Nitrogen dioxide gas (NO2) is a gas found generally in nature or produced by human activities, such as the combustion of various fuels and certain industries. This gas affects the visual system and people with asthma or respiratory diseases.
- Sulfur dioxide gas (SO2) is a gas produced by nature and by the combustion of fuels containing sulfur. It can combine with other pollutants to form fine dust particles. This gas has direct health effects, causing irritation of the eye mucous membranes, skin, and respiratory system. If exposed for a long time, it can cause chronic bronchitis.
Air Quality Index of Thailand
The Air Quality Index of Thailand is divided into 5 levels, ranging from 0 to 201 and above. Each level uses a color as a symbol to compare the level of health effects, as shown in Table 1.
Table 1 Criteria of the Air Quality Index according to the Thailand standard (TH AQI)
| Symbol | AQI | PM2.5 average 24 continuous hours (μg/m3) | PM10 average 24 continuous hours (μg/m3) | Meaning | Precautionary guidelines |
|---|---|---|---|---|---|
| 0-25 | 0-15.0 | 0-50 | Very good air quality | Very good air quality, suitable for outdoor activities and tourism. | |
| 26-50 | 15.1-25.0 | 51-80 | Good air quality | Good air quality, outdoor activities and tourism can be carried out as usual. | |
| 51-100 | 25.1-37.5 | 81-120 | Moderate air quality | [General public] Can carry out outdoor activities as usual [Sensitive groups] If initial symptoms occur, such as coughing, difficulty breathing, or eye irritation, outdoor activity time should be reduced | |
| 101-200 | 37.6-75.0 | 121-180 | Air quality affecting health | [General public] Should monitor their health. If initial symptoms occur, such as coughing, difficulty breathing, or eye irritation, outdoor activity time should be reduced, or protective equipment should be used if necessary [Sensitive groups] Should reduce outdoor activity time, or use protective equipment if necessary. If health symptoms occur, such as coughing, difficulty breathing, eye inflammation, chest tightness, headache, irregular heartbeat, nausea, or fatigue, a doctor should be consulted | |
| >200 | >75.1 | >180 | Air quality with severe health effects | Everyone should avoid outdoor activities, avoid areas with high air pollution, or use protective equipment if necessary. If health symptoms occur, a doctor should be consulted. |
Table 2 Concentrations of air pollutants equivalent to the Air Quality Index values of Thailand
| Air Quality Index | PM2.5 (μg/m3) | PM10 (μg/m3) | O3 (ppb) | CO (ppm) | NO2 (ppb) | SO2 (ppb) |
| average 24 continuous hours | average 8 continuous hours | average 1 hour | ||||
| 0-25 | 0-15.0 | 0-50 | 0-35 | 0-4.4 | 0-60 | 0-100 |
| 26-50 | 15.1-25.0 | 51-80 | 36-50 | 4.5-6.4 | 61-106 | 101-200 |
| 51-100 | 25.1-37.5 | 81-120 | 51-70 | 6.5-9.0 | 107-170 | 201-300 |
| 101-200 | 37.6-75.0 | 121-180 | 71-120 | 9.1-30.0 | 171-340 | 301-400 |
| 200 and above | 75.1 and above | 181 and above | 121 and above | 30.1 and above | 341 and above | 401 and above |
Averaging periods and units of air pollutants used in the calculation
PM2.5 average 24 continuous hours: micrograms per cubic meter or µg/m3
PM10 average 24 continuous hours: micrograms per cubic meter or µg/m3
O3 average 8 continuous hours: parts per billion or ppb or 1/1,000,000,000
CO average 8 continuous hours: parts per million or ppm or 1/1,000,000
NO2 average 1 hour: parts per billion or ppb or 1/1,000,000,000
SO2 average 1 hour: parts per billion or ppb or 1/1,000,000,000
Air Quality Index according to the US-EPA 2016 standard (US AQI)
The Air Quality Index according to the US-EPA 2016 standard is divided into 6 levels, ranging from 0 to 501 and above. Each level uses a color as a symbol to compare the level of health effects, as shown in Table 3.
Table 3 Criteria of the US-EPA 2016 Air Quality Index
| Symbol | AQI | PM2.5 average 24 continuous hours (μg/m3) | PM10 average 24 continuous hours (μg/m3) | Meaning | Precautionary guidelines |
|---|---|---|---|---|---|
| 0-50 | 0-12 | 0-54 | Good | The public can carry out various activities as usual. | |
| 51-100 | 13-35 | 55-154 | Moderate | [General public] Can carry out outdoor activities as usual [Sensitive groups] Should reduce heavy or prolonged exertion and observe their own coughing and fatigue symptoms | |
| 101-150 | 36-55 | 155-254 | Unhealthy for Sensitive Groups | [General public] Can carry out outdoor activities as usual [Sensitive groups] Should reduce heavy or prolonged outdoor activities, possibly resting at intervals. Regularly observe their own symptoms of coughing, fatigue, palpitations, and chest tightness. Those with underlying conditions should follow their doctor's advice | |
| 151-200 | 56-150 | 255-354 | Unhealthy | [General public] Should reduce heavy or prolonged outdoor activities, possibly resting at intervals [Sensitive groups] Should reduce heavy or prolonged outdoor activities, resting or working indoors | |
| 201-300 | 151-250 | 355-424 | Very Unhealthy | [General public] Should avoid heavy or prolonged outdoor activities, or do indoor activities instead [Sensitive groups] Should refrain from all outdoor activities and do indoor activities instead | |
| 301-500 | 254-500 | 425-604 | Hazardous | [General public] Should refrain from all outdoor activities [Sensitive groups] Should stay indoors only and do activities that require little exertion |
Table 4 Concentrations of air pollutants equivalent to the US-EPA 2016 Air Quality Index values
| AQI | PM2.5 (μg/m3) | PM10 (μg/m3) | O3 (ppb) | CO (ppm) | NO2 (ppb) | SO2 (ppb) |
| average 24 continuous hours | average 8 continuous hours | average 1 hour | ||||
| 0-50 | 0-12 | 0-54 | 0-34 | 0-4.4 | 0-53 | 0-35 |
| 51-100 | 13-35 | 55-154 | 55-70 | 4.5-9.4 | 54-100 | 36-75 |
| 101-150 | 36-55 | 155-254 | 71-85 | 9.5-12.4 | 101-360 | 76-185 |
| 151-200 | 56-150 | 255-354 | 86-105 | 12.5-15.4 | 364-649 | 186-304 |
| 201-300 | 151-250 | 355-424 | 106-200 | 15.5-30.4 | 650-1249 | 305-604 |
| 301-500 | 251-500 | 425-604 | 30.5-50.4 | 1250-2049 | 605-1004 | |
Calculation of the daily Air Quality Index for each type of air pollutant
The calculation of the daily Air Quality Index for each type of air pollutant can be computed from the concentration of the air pollutant based on air quality monitoring data. The air quality index within each range can be calculated as a linear equation, as follows:

| where | I | is the air quality sub-index |
| X | is the measured concentration of the air pollutant | |
| Xi | is the minimum value of the pollutant concentration range containing the value X | |
| Xj | is the maximum value of the pollutant concentration range containing the value X | |
| Ii | is the minimum value of the air quality index range corresponding to the concentration range of X | |
| Ij | is the maximum value of the air quality index range corresponding to the concentration range of X |
Data sources
Air Quality and Noise Management Division, Pollution Control Department. Air Quality Index information [Online]. Available from: http://air4thai.pcd.go.th/webV2/aqi_info.php (Retrieved 15 June 2021)
Climate Change Data Center, Chiang Mai University. AQI calculation [Online]. Available from: https://www.cmuccdc.org/calculate#USAQI (Retrieved 15 June 2021)
Wikipedia. Air quality index [Online]. Available from: https://en.m.wikipedia.org/wiki/Air_quality_index?fbclid=IwAR2LMteREhN8ZzfJRHigU4oGCEOcsZL_gCNiV9yzkgzz0ZjDahkXAcSquM4 (15 June 2021))
Using the APIs
After registering and verifying your identity, you can use your API key via the header Authorization: Bearer {your_api_key} to retrieve data from the CMUCCDC Open API system.
Example data request
Authorization: Bearer {your_api_key}
GET /api/Docs
Response
Data Access by User Type
Allowed Not allowed
| Data retrieval function | Affiliated organization | |||||
|---|---|---|---|---|---|---|
| General public | Students and researchers | NGO | Private organization | Government agency | MOU organization | |
| DustBoy API | ||||||
| Real-time hourly average PM2.5 level per monitoring point | ||||||
| Real-time hourly average PM2.5 level by province | ||||||
| Real-time hourly average PM2.5 level by health area | ||||||
| Real-time hourly average PM2.5 level by region | ||||||
| Real-time hourly average PM2.5 level for all points | ||||||
| Real-time hourly average PM2.5 level by location | ||||||
| Hourly average PM2.5 level, past 1 month | ||||||
| Hourly average PM2.5 level, past 1 year | ||||||
| Hourly average PM2.5 level, past 5 years | ||||||
| Hourly average PM2.5 level, all historical data | ||||||
| FloodBoy API | ||||||
| FloodBoy station list and latest water level | ||||||
| FloodBoy water level data, past 24 hours | ||||||
DustBoy
DustBoy air quality monitoring station locations
| ID | Station location | URL | Model |
|---|
Real-time hourly average PM2.5 level by station
Select the ID of each monitoring station, then retrieve sensor values and details of each station from this API. You can specify which stations to retrieve data from here
The data then shows values from online sensors.
Real-time hourly average PM2.5 level by province
Select the province you want to retrieve data for, then retrieve sensor values and details of each station from this API. You can specify which provinces to retrieve data from here
The data then shows values from online sensors.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/province
Log in to try the API
Real-time hourly average PM2.5 level by health area
Select the health area you want to retrieve data for, then retrieve sensor values and details of each station from this API. You can specify which health areas to retrieve data from here
The data then shows values from online sensors.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/areahealth
Log in to try the API
Real-time hourly average PM2.5 level by region
Select the health area you want to retrieve data for, then retrieve sensor values and details of each station from this API. You can specify which health areas to retrieve data from here
The data then shows values from online sensors.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/geography
Log in to try the API
Real-time hourly average PM2.5 level for all stations
Retrieve sensor values and details of each station from this API.
The data then shows values from online sensors.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/stations
Log in to try the API
Real-time hourly average PM2.5 level by location
Retrieve sensor values and details of each station by providing additional parameters: latitude, longitude, and distance from the coordinates up to a maximum of 20 kilometers.
The data then shows values from online sensors.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/nearme/{latitude}/{longitude}/{distance}
Log in to try the API
Hourly average PM2.5 level, last 30 days of historical data
Retrieve sensor values and details of each station by providing an additional parameter: the station ID.
The data then shows all historical sensor values from the last 30 days.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/data30day/{id}
Log in to try the API
Hourly average PM2.5 level, last 1 year of historical data
Retrieve sensor values and details of each station by providing an additional parameter: the station ID.
The data then shows all historical sensor values from the last 1 year.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/data1year/{id}
Log in to try the API
Hourly average PM2.5 level, last 5 years of historical data
Retrieve sensor values and details of each station by providing an additional parameter: the station ID.
The data then shows all historical sensor values from the last 5 years.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/data5year/{id}
Log in to try the API
All hourly average historical PM2.5 data
You can retrieve hourly average historical PM2.5 values from every station's sensors here.
Example request
Authorization: Bearer {your_api_key}
GET /api/dustboy/database/{yyyy}{mm}
Sample downloadable historical data
2023
2024
2025
2026
FloodBoy
Water level monitoring station data and risk status
List of all water level monitoring stations
Used to retrieve FloodBoy station metadata such as station ID, coordinates, station name, measurement point type, and bank height. It does not include the latest water level.
Example request
Authorization: Bearer {your_api_key}
GET /api/floodboy/stations
Log in to try the API
Latest water level for all stations
Used to retrieve the latest water level of FloodBoy stations, along with a status computed from risk_profile and water_level. This endpoint is cached for 60 seconds.
Latest water level by station
Used to retrieve a single station with its latest water level. Select a FloodBoy station from the list and the system automatically substitutes the source_id into the endpoint.
Example request
Authorization: Bearer {your_api_key}
GET /api/floodboy/station/{source_id}
Log in to try the API
24-hour historical water level by station
Used to retrieve historical data for a single station. The system averages the water level every 10 minutes and returns the data in readings. General public account types cannot call this endpoint.
Example request
Authorization: Bearer {your_api_key}
GET /api/floodboy/log/{source_id}
Log in to try the API
Key fields and status calculation
| Field | Description |
|---|---|
risk_profile.type |
Measurement point type, e.g. road or waterway |
risk_profile.bank_height |
Height from the ground to the bank edge, used to calculate the percentage of water relative to the bank for the waterway type |
water_level |
Water level, in meters |
status.metric |
For road, uses water_depth; for waterway, uses bank_capacity_percent = ceil((water_level * 100) / bank_height) |
status.label |
The computed status text, e.g. น้ำปกติ (normal), น้ำเฝ้าระวัง (watch), น้ำอันตราย (danger), or ไม่ทราบสถานะ (unknown) |
readings |
The historical data list for the /log/{source_id} endpoint, averaging the water level every 10 minutes within the last 24 hours |
Abridged real Response examples
The examples below use station source_id=1008 from the latest production test, trimmed for readability.
GET /api/floodboy/stations
{
"status": true,
"message": "Floodboy stations",
"count": 17,
"data": [
{
"id": "1008",
"nickname": "Floodboy001",
"name": "บ้านดอนจั่นพัฒนา ซ.เทพประทานพร1 ต.ท่าศาลา อ.เมือง จ.เชียงใหม่",
"name_en": "Ban Don Chan Phatthana, Tha Sala Subdistrict, Mueang District, Chiang Mai Province",
"latitude": "18.7622915",
"longitude": "99.0331583",
"uri": "fb001",
"risk_profile": {
"type": "waterway",
"bank_height": 1.22
}
}
]
}
GET /api/floodboy/latest
{
"status": true,
"message": "Floodboy latest readings",
"count": 17,
"data": [
{
"id": 1008,
"water_level": 0.6,
"observed_at": "2026-05-28 11:50:03",
"status": {
"label": "น้ำปกติ",
"metric": {
"name": "bank_capacity_percent",
"value": 50,
"unit": "percent"
}
}
}
]
}
GET /api/floodboy/station/1008
{
"status": true,
"message": "Floodboy station",
"data": {
"id": 1008,
"water_level": 0.6,
"observed_at": "2026-05-28 11:50:03",
"status": {
"label": "น้ำปกติ",
"color": "#16B46D"
}
}
}
GET /api/floodboy/log/1008
{
"status": true,
"message": "Floodboy station log",
"data": {
"id": 1008,
"readings": [
{
"observed_at": "2026-05-27 11:50:00",
"water_level": 0.29,
"status": {
"label": "น้ำปกติ"
}
}
]
}
}
Error Response
| HTTP Status | Case | Example Response |
|---|---|---|
400 |
Invalid source_id |
{"status":false,"message":"Invalid station id"} |
403 |
API key not authorized, or a general user calling /log |
{"status":false,"message":"Access denied"} |
404 |
Specified FloodBoy station not found | {"status":false,"message":"Floodboy station not found"} |
Account
Step 1 - Register
Complete the form, making sure to specify your organization or affiliation correctly.
Step 2 - Verify identity
Verify your identity again via the email address you provided.
The following organization types require admin approval before use:
Students and researchers
NGO / civil society organization
Private organization
Government agency
Organizations with a DustBoy MOU
Step 3 - Get started!
Log in with the email and password you set during registration.