get_locations
Pack: openaq · Endpoint: https://gateway.pipeworx.io/openaq/mcp
Find air quality monitoring stations by city and/or country (e.g., city=“Delhi”, country=“IN”). Returns station coordinates, names, and available pollutant parameters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | number | no | Maximum number of locations to return (default 10, max 100). |
city | string | no | City name to filter locations by (e.g. “London”, “Los Angeles”). |
country | string | no | ISO 3166-1 alpha-2 country code to filter by (e.g. “US”, “GB”). |
Example call
Arguments
{
"city": "Delhi",
"country": "IN",
"limit": 15
}
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_locations","arguments":{"city":"Delhi","country":"IN","limit":15}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_locations', {
"city": "Delhi",
"country": "IN",
"limit": 15
});
More examples
{
"city": "London",
"country": "GB"
}
Response shape
Always returns: count, locations
| Field | Type | Description |
|---|---|---|
count | number | Number of locations returned |
locations | array | List of air quality monitoring stations |
Full JSON Schema
{
"type": "object",
"properties": {
"count": {
"type": "number",
"description": "Number of locations returned"
},
"locations": {
"type": "array",
"description": "List of air quality monitoring stations",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "Numeric location ID"
},
"name": {
"type": "string",
"description": "Station 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"
]
},
"parameters": {
"type": "array",
"description": "List of available pollutant parameters",
"items": {
"type": "string"
}
},
"last_updated": {
"type": "string",
"description": "ISO timestamp of last data update"
},
"first_updated": {
"type": "string",
"description": "ISO timestamp of first data collection"
},
"is_mobile": {
"type": "boolean",
"description": "Whether station is mobile"
}
},
"required": [
"id",
"name",
"city",
"country",
"coordinates",
"parameters",
"last_updated",
"first_updated",
"is_mobile"
]
}
}
},
"required": [
"count",
"locations"
]
}
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.