Get Measurements
get_measurementsGet the most recent time series (hourly or daily aggregates) for a single OpenAQ sensor (sensor id from find_stations), newest first. Use for pollutant trends over time at one station/parameter. Returns the sensor's LAST limit readings — note that many OpenAQ sensors are archived and stopped reporting years ago, so "most recent" can legitimately be several years old: always read the returned timestamps rather than assuming the data is current. Use find_stations or get_latest to pick a sensor that is still reporting.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"limit": 20,
"sensor_id": 2772
},
"name": "get_measurements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | How many of the most recent data points to return (1-1000, default 24). | |
| period | No | Aggregation: "hours" (default) or "days". | |
| _apiKey | No | OpenAQ API key (optional; the gateway supplies one). | |
| sensor_id | Yes | OpenAQ sensor id (a station+parameter pair, from find_stations). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | Yes | Number of measurements returned | |
| measurements | Yes | Historical air quality measurements |