current_by_location

Pack: airnow · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)

No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/current_by_location for the schema, then POST the same URL with its arguments for the data.

Latest observed air quality index (AQI) for the EPA AirNow reporting area nearest a latitude/longitude in the US: one row per pollutant with AQI value, category, observation hour, agency and yesterday’s AQI. Answers “what is the air quality at these coordinates right now”.

Parameters

NameTypeRequiredDescription
latitudenumberyesUS latitude
longitudenumberyesUS longitude
distance_milesnumbernoSearch radius for the nearest reporting area (default 25, max 250)

Example call

Arguments

{
  "latitude": 40.7128,
  "longitude": -74.006
}

curl

curl -X POST https://gateway.pipeworx.io/airnow/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"current_by_location","arguments":{"latitude":40.7128,"longitude":-74.006}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('current_by_location', {
  "latitude": 40.7128,
  "longitude": -74.006
});

More examples

{
  "latitude": 34.0522,
  "longitude": -118.2437,
  "distance_miles": 100
}

Response shape

Always returns: latitude, longitude, count, observations

FieldTypeDescription
latitudenumberQuery latitude
longitudenumberQuery longitude
countintegerNumber of observations returned
observationsarrayLatest AQI observations for nearest station
Full JSON Schema
{
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "description": "Query latitude"
    },
    "longitude": {
      "type": "number",
      "description": "Query longitude"
    },
    "count": {
      "type": "integer",
      "description": "Number of observations returned"
    },
    "observations": {
      "type": "array",
      "description": "Latest AQI observations for nearest station",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": [
              "string",
              "null"
            ],
            "description": "Date observed (YYYY-MM-DD)"
          },
          "hour": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Hour observed (0-23)"
          },
          "timezone": {
            "type": [
              "string",
              "null"
            ],
            "description": "Local time zone"
          },
          "reporting_area": {
            "type": [
              "string",
              "null"
            ],
            "description": "Geographic area name"
          },
          "state": {
            "type": [
              "string",
              "null"
            ],
            "description": "State code"
          },
          "latitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Site latitude"
          },
          "longitude": {
            "type": [
              "number",
              "null"
            ],
            "description": "Site longitude"
          },
          "pollutant": {
            "type": [
              "string",
              "null"
            ],
            "description": "Pollutant name (e.g., O3, PM2.5)"
          },
          "aqi": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Air Quality Index value"
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "description": "AQI category (Good, Moderate, etc.)"
          },
          "category_number": {
            "type": [
              "integer",
              "null"
            ],
            "description": "AQI category numeric code"
          }
        }
      }
    }
  },
  "required": [
    "latitude",
    "longitude",
    "count",
    "observations"
  ]
}

Connect

Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:

{
  "mcpServers": {
    "pipeworx": {
      "url": "https://pipeworx.io/mcp"
    }
  }
}
Connect to just the airnow pack
{
  "mcpServers": {
    "airnow": {
      "url": "https://gateway.pipeworx.io/airnow/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build October 30, 2026