# Weather, Air Quality & Earthquake API

> Weather, Air Quality & Earthquake API is a paid API for AI agents from agent-data.centorprat.workers.dev, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-28).

Returns current weather, air quality (AQI/PM2.5), and nearby earthquake data for up to 3 locations per call, with a clear/caution/hazard verdict and reasons.

## Facts

- Endpoint: POST https://agent-data.centorprat.workers.dev/tools/weather-air-quality-earthquake-api?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/weather-air-quality-earthquake-api-57160a43
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XGlBeryhk3wt-VU63qW-7

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 weather-air-quality-earthquake-api-57160a43 -d '<json body>'
```

Example prompt: Check the current weather, air quality, and any recent earthquakes within 50 km for Tokyo (35.68, 139.69), Los Angeles (34.05, -118.24), and Istanbul (41.01, 28.95) — flag anything that reaches caution or hazard status.

## When to prefer this

Choose this endpoint when you need weather, air quality, and earthquake data combined in a single call with a ready-made hazard verdict — especially useful for multi-location checks (up to 3 per call), automated monitoring pipelines with webhook alerts, or when you want a keyless solution that aggregates Open-Meteo and USGS without managing separate API keys. Prefer it over building separate weather and USGS integrations when a clear/caution/hazard classification per location is the goal.

## Known failure modes

- Invalid or out-of-range coordinates return an error or null for that location without being charged
- Exceeding 3 locations per call results in truncation or rejection
- USGS or Open-Meteo upstream outage may produce partial data for weather or earthquake fields
- Very remote coordinates with no recent seismic data may return empty earthquake arrays
- Network timeout from the upstream provider may result in a failed lookup (not charged)

## How this service works

Pay-per-call data and tools for AI agents, $0.002-0.01 per call in USDC via x402 (Base, Polygon or Solana), no account or API key; MAX tiers ($0.05-0.25) run deeper jobs. Agent toolkit: web search, search + read top pages, any page as clean markdown with a prompt-injection check, which-x402-API-to-call recommender, seller check. Data: Google Maps places with contacts, YouTube video data and transcripts, job listings (Indeed, LinkedIn, 13 boards), Google Ads Transparency, TikTok comments, Pinterest, Airbnb, Redfin, AliExpress, app stores, live sports, website and SEO checks, Shopify store tech stacks, and onchain token / address risk checks.

## Output

Returns a structured response for each requested location containing: current weather (temperature, wind, precipitation), air quality metrics (AQI, PM2.5 levels), recent nearby earthquake events (magnitude, distance, time), and an overall status verdict of 'clear', 'caution', or 'hazard' with human-readable reasons explaining the verdict.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "label": {
   "type": "string",
   "description": "Optional name for the single point (e.g. a site or city)."
  },
  "latitude": {
   "type": "number",
   "description": "Latitude in decimal degrees for a single point. Example: 40.4168"
  },
  "radiusKm": {
   "type": "integer",
   "description": "Look for recent earthquakes within this radius of each point."
  },
  "locations": {
   "type": "array",
   "items": {
    "type": "object"
   },
   "maxItems": 3,
   "description": "Instead of (or in addition to) a single point, pass an array of objects: [{\"latitude\":35.68,\"longitude\":139.69,\"label\":\"Tokyo\"}]"
  },
  "longitude": {
   "type": "number",
   "description": "Longitude in decimal degrees for a single point. Example: -3.7038"
  },
  "onlyAlerts": {
   "type": "boolean",
   "description": "If true, points whose computed status is 'clear' are dropped (useful with a schedule + webhook)."
  },
  "minMagnitude": {
   "type": "number",
   "description": "Ignore earthquakes below this magnitude. Example: 2.5"
  },
  "quakeLookbackDays": {
   "type": "integer",
   "description": "How many days back to search for earthquakes."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "items": [
   {
    "flags": [],
    "label": null,
    "status": "clear",
    "reasons": [],
    "seismic": {
     "_ok": true,
     "count": 0,
     "events": [],
     "maxMag": null
    },
    "sources": [
     "open-meteo.com",
     "air-quality-api.open-meteo.com",
     "earthquake.usgs.gov (USGS)"
    ],
    "weather": {
     "_ok": true,
     "isDay": true,
     "sunset": "2026-10-24T19:22",
     "sunrise": "2026-10-24T08:35",
     "weather": "mainly clear",
     "windKmh": 8.4,
     "visibilityM": 45540,
     "weatherCode": 1,
     "windGustKmh": 23.8,
     "temperatureC": 17.9,
     "precipitationMm": 0
    },
    "latitude": 40.4168,
    "longitude": -3.7038,
    "airQuality": {
     "_ok": true,
     "no2": 12.1,
     "pm10": 7.7,
     "ozone": 68,
     "pm2_5": 4.5,
     "usAqi": 33,
     "aqiBand": "good",
     "europeanAqi": 24
    },
    "capturedAt": "2026-10-24T13:49:28.469330+00:00"
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/weather-air-quality-earthquake-api-57160a43/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data.centorprat.workers.dev](https://www.zero.xyz/host/agent-data.centorprat.workers.dev/llms.txt)
