Extended API: the Maplet and AI assistants (MCP)

Posted on November 28th 2026
Share: aqicn.org/faq/air-quality-api-maplet-and-mcp/

The World Air Quality Index has been around for nearly 20 years. The API, the widgets and the map tiles have all been around for at least 10 years.

We're now extending our free APIs with two new ways to use our real time data. The Maplet is a fully interactive air quality map that you can embed on your site. The MCP connector enables AI assistants (Claude, ChatGPT, Gemini etc.) to have direct access to our live air quality data.

The Maplet: a live map in one line

Until now if you wanted a real time air quality map on your site you'd have to go through the whole API key thing, pick a map library, get your tiles and then write the code to actually display the stations. With the Maplet you just paste in one script tag and you're done. It's the same map as on aqicn.org (all the stations in the vicinity of your location, live updating, click on a station and you get taken to the station detail in a new tab so the user stays on your site). No API key required and it contains absolutely no ads.

Try it below: change the location, language or size and the code will update in real time with the map. You can also move or zoom the map and then click on Use this view to keep that exact view in the code.

Move or zoom the map to pick a precise view.
 

The plain iframe version is for CMS's which don't allow scripts. The Maplet documentation covers all the options (asynchronous loading, multiple maps on a page, reading the view your visitors have selected etc).

Your coding assistant knows the Maplet, too

The Maplet documentation is also available as an Agent Skill (a format that AI coding assistants can consume). You can point Claude Code, Cursor or Copilot at aqicn.org/maplet/SKILL.md and ask it to, for instance, add a live air quality map of Lyon to the contact page, and it will know precisely what attributes are needed, what the language codes are and what the potential problems are (e.g. async loading).

The MCP connector: AI assistants with live data

If you ask an AI assistant what the air quality is like in your city it's just going to give you a very generic answer based on what it learned during its training period (months or years prior). That's not particularly useful if the air quality has changed in the course of less than an hour. The Model Context Protocol (MCP) is an open standard which enables AI assistants to call external tools as they're responding. Our MCP connector allows the assistant to pull in the current readings, current pollutants and forecasts from over 500,000 stations and credit the agencies that actually measured it.

Pick one of the questions below to replay the conversation. The answers were recorded on 28th November 2026 with the connector returning the real data at that time. You can open each tool call to see exactly what the assistant was given.

AI assistant · World Air Quality Index connector
Choose a question above to start.

The connector gives the assistant four read-only tools. The assistant decides by itself which one to call, and can chain them, for instance searching for a station first and then getting its details.

get_city_aqi
Current AQI, pollutants, weather and daily forecast for a city, a station path or a station id.
“How is the air in Madrid?”
get_aqi_by_location
Current air quality from the station nearest to a latitude and longitude.
“What's the AQI near the Eiffel Tower?”
search_stations
Find monitoring stations by name or keyword, with their current AQI.
“Are there stations in Kathmandu?”
get_stations_in_bounds
All the stations and their AQI inside a map area, to compare neighbourhoods.
“Where is the worst air in Seoul?”

How the connection works

The connector doesn't use a shared key. You sign in with your own API token (the same one you'd use for the JSON API). We store absolutely nothing about you at all. Click through each step to see what's going on.

In your assistant settings, you add a custom connector with the server URL https://mcp.aqicn.org/claude. Nothing else to install.
The assistant opens the aqicn.org sign-in page (standard OAuth 2.1 with PKCE). You paste your API token. The token never goes to the AI company: it is encrypted (AES-256-GCM) inside the access grant, and our server keeps no user database.
While answering, the assistant calls the read-only tools. Each call goes to our API with your token, and the response is trimmed down to what matters, so that the assistant does not waste its context. Access grants last one hour and are renewed automatically.
You can remove the connector at any time from the assistant settings. Unused grants expire after 30 days, and if your API token is revoked, the connector stops working immediately and asks you to reconnect.

Get started

The connector works with any assistant which supports remote MCP servers with sign-in. Pick yours:

  1. Open Claude's connector settings, click Add, then Add custom connector.
  2. Name it World Air Quality Index and paste the server URL.
  3. Click Connect, then paste your API token on the sign-in page.
Server URL https://mcp.aqicn.org/claude

You don't have an API token yet? You can get one free from the data platform page. The full step by step guide (with screenshots) is on the MCP connector page and the API page has all the other APIs listed.

The data is all from the hard work of the various environmental agencies around the world. Whether it's on your site via the Maplet or quoted by an AI assistant we always give due credit to the original data source. We're looking forward to seeing what you build with it, so do let us know!

Do you know of any Air Quality stations in your area? why not participate to the map with your own air quality station?
Learn more at
> aqicn.org/gaia/ <

Click here to see all the FAQ entries

About the Air Quality and Pollution Measurement:

About the Air Quality Levels

AQIAir Pollution LevelHealth ImplicationsCautionary Statement (for PM2.5)
0 - 50GoodAir quality is considered satisfactory, and air pollution poses little or no riskNone
51 -100ModerateAir quality is acceptable; however, for some pollutants there may be a moderate health concern for a very small number of people who are unusually sensitive to air pollution.Active children and adults, and people with respiratory disease, such as asthma, should limit prolonged outdoor exertion.
101-150Unhealthy for Sensitive GroupsMembers of sensitive groups may experience health effects. The general public is not likely to be affected.Active children and adults, and people with respiratory disease, such as asthma, should limit prolonged outdoor exertion.
151-200UnhealthyEveryone may begin to experience health effects; members of sensitive groups may experience more serious health effectsActive children and adults, and people with respiratory disease, such as asthma, should avoid prolonged outdoor exertion; everyone else, especially children, should limit prolonged outdoor exertion
201-300Very UnhealthyHealth warnings of emergency conditions. The entire population is more likely to be affected.Active children and adults, and people with respiratory disease, such as asthma, should avoid all outdoor exertion; everyone else, especially children, should limit outdoor exertion.
300+HazardousHealth alert: everyone may experience more serious health effectsEveryone should avoid all outdoor exertion

To know more about Air Quality and Pollution, check the wikipedia Air Quality topic or the airnow guide to Air Quality and Your Health.

For very useful health advices of Beijing Doctor Richard Saint Cyr MD, check www.myhealthbeijing.com blog.


Usage Notice: All the Air Quality data are unvalidated at the time of publication, and due to quality assurance these data may be amended, without notice, at any time. The World Air Quality Index project has exercised all reasonable skill and care in compiling the contents of this information and under no circumstances will the World Air Quality Index project team or its agents be liable in contract, tort or otherwise for any loss, injury or damage arising directly or indirectly from the supply of this data.