GnistAI GnistAI
Log in

OpenAQ (Air Quality)

Real-time and forecast air quality data including AQI, PM2.5, and pollutant levels.

Overview   |   MCP Docs   |   API Docs   |   OpenAPI   |   Playground   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 4 tools tools 4 4 Environment

Data source: OpenAQ

MCP MCP Protocol

Endpoint https://context.gnist.ai/mcp/openaq/
claude_desktop_config.json
{
  "mcpServers": {
    "gnist-openaq": {
      "url": "https://context.gnist.ai/mcp/openaq/",
      "headers": {
        "Gnist-API-Key": "YOUR_API_KEY"
      }
    }
  }
}
Shell
curl -X POST "https://context.gnist.ai/mcp/openaq/" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"jsonrpc": "2.0", "method": "tools/call", "id": 1, "params": {"name": "get_air_quality", "arguments": {"lat": 1.0, "lon": 1.0}}}'

API REST API

API Root https://context.gnist.ai/rest/openaq/

4 endpoints available:

Shell
curl "https://context.gnist.ai/rest/openaq/get_air_quality?lat=1.0&lon=1.0" \
  -H "Gnist-API-Key: YOUR_API_KEY"
Python
import httpx

resp = httpx.get(
    "https://context.gnist.ai/rest/openaq/get_air_quality",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    params={
        "lat": 1.0,
        "lon": 1.0
},
)
print(resp.json())

OpenAPI Spec  ·  Full API Docs

CLI Command Line

Command gc openaq

CLI documentation will be available when the GnistAI SDK is published.

Install
pip install gnistai

Available Tools (4)

get_air_quality
Get current air quality at the nearest monitoring station.
ParameterTypeRequiredDescription
latnumberrequiredLatitude of the location (-90 to 90).
lonnumberrequiredLongitude of the location (-180 to 180).
get_aqi_summary
Get city-level AQI summary with dominant pollutant.
ParameterTypeRequiredDescription
citystringrequiredCity name (e.g. "Oslo", "London", "New York").
get_air_quality_history
Get PM2.5 readings from the nearest station over the last N hours.
ParameterTypeRequiredDescription
latnumberrequiredLatitude of the location (-90 to 90).
lonnumberrequiredLongitude of the location (-180 to 180).
hoursintegeroptionalNumber of hours of history to retrieve (1–72, default 24). (default: 24)
report_feedback
Report a bug, feature request, or general feedback for this data source.
ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")

Related