get_latest
Pack: openaq · Endpoint: https://gateway.pipeworx.io/openaq/mcp
Get current air quality readings from worldwide sensor stations. Filter by country code (e.g., “US”, “IN”). Returns PM2.5, PM10, ozone, NO2, SO2, CO levels with timestamps.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | no | Maximum number of station results to return (default 10, max 100). |
country | string | no | ISO 3166-1 alpha-2 country code to filter by (e.g. “US”, “GB”, “DE”). |
Example call
Arguments
{
"country": "US",
"limit": 10
}
curl
curl -X POST https://gateway.pipeworx.io/openaq/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_latest","arguments":{"country":"US","limit":10}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_latest', {
"country": "US",
"limit": 10
});
More examples
{
"country": "IN",
"limit": 25
}
Response shape
Always returns: count, stations
| Field | Type | Description |
|---|---|---|
count | number | Number of stations returned |
stations | array | List of air quality stations with latest measurements |
Full JSON Schema
{
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "Number of stations returned"
},
"stations": {
"type": "array",
"description": "List of air quality stations with latest measurements",
"items": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "Station location name"
},
"city": {
"type": "string",
"description": "City where station is located"
},
"country": {
"type": "string",
"description": "Country where station is located"
},
"coordinates": {
"type": "object",
"properties": {
"latitude": {
"type": "number",
"description": "Latitude coordinate"
},
"longitude": {
"type": "number",
"description": "Longitude coordinate"
}
},
"required": [
"latitude",
"longitude"
]
},
"measurements": {
"type": "array",
"description": "Current pollutant measurements",
"items": {
"type": "object",
"properties": {
"parameter": {
"type": "string",
"description": "Pollutant parameter name"
},
"value": {
"type": "number",
"description": "Measured value"
},
"unit": {
"type": "string",
"description": "Unit of measurement"
},
"lastUpdated": {
"type": "string",
"description": "ISO timestamp of last update"
}
},
"required": [
"parameter",
"value",
"unit",
"lastUpdated"
]
}
}
},
"required": [
"location",
"city",
"country",
"coordinates",
"measurements"
]
}
}
},
"required": [
"count",
"stations"
]
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"openaq": {
"url": "https://gateway.pipeworx.io/openaq/mcp"
}
}
}
See Getting Started for client-specific install steps.