# StatePulse Air Quality Lookup

> StatePulse Air Quality Lookup is a paid API for AI agents from statepulse-api.hahavoid0.workers.dev, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Returns real-time air quality index (AQI), label, and pollutant measurements (e.g. PM2.5) for a given geographic coordinate

## Facts

- Endpoint: POST https://statepulse-api.hahavoid0.workers.dev/environment/air-quality
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/statepulse-air-quality-lookup-52e782f8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_pOwWDnc6oGlswOSUF9xY_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability statepulse-air-quality-lookup-52e782f8 -d '<json body>'
```

Example prompt: What's the current air quality index at coordinates 34.05 latitude, -118.24 longitude — is it safe to be outside right now?

## When to prefer this

Use this endpoint when an AI agent needs real-time, pay-per-call air quality data keyed to a specific geographic coordinate without requiring account setup. Prefer this over subscription-based AES services when cost-per-call is acceptable and no API key management is desired. Best suited for spot checks rather than continuous polling.

## Known failure modes

- Location not supported — 'supported: false' returned with no AQI data
- Coordinates out of valid range — bad request or error response
- No recent sensor data available for the region — low confidence or partial result
- Payment failure via x402 — request rejected before processing
- Network timeout on upstream air quality data source

## How this service works

Retrieves live localized air quality indices (AQI) and pollutant levels for a given latitude/longitude using OpenAQ.

## Output

Returns a JSON object with the AQI score (integer), a human-readable air quality label (e.g. 'Good'), the queried coordinates, a list of pollutant measurements including parameter name, value, and unit (e.g. PM2.5 in µg/m³), whether the location is supported, and a confidence level string.

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "result": {
   "aqi": 42,
   "label": "Good",
   "coordinates": {
    "lat": 34.05,
    "lng": -118.24
   },
   "measurements": [
    {
     "unit": "µg/m³",
     "value": 9.8,
     "parameter": "pm25"
    }
   ]
  },
  "supported": true,
  "confidence": "medium"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/statepulse-air-quality-lookup-52e782f8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from statepulse-api.hahavoid0.workers.dev](https://www.zero.xyz/host/statepulse-api.hahavoid0.workers.dev/llms.txt)
