# AFAD Earthquake Operations Router

> AFAD Earthquake Operations Router is a paid API for AI agents from api.timzinin.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Returns proximity-based earthquake alerts from AFAD Turkey data for registered assets (routes, waypoints, facilities), with operational decision logic indicating whether to inspect, pause dispatch, or reroute.

## Facts

- Endpoint: POST https://api.timzinin.com/api/afad-earthquake-operations-router
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/afad-earthquake-operations-router-c043e790
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Pwo2Xws0qXtR5hqyXrBWM

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 afad-earthquake-operations-router-c043e790 -d '<json body>'
```

Example prompt: Check if any earthquakes from AFAD in the last 24 hours are within 1000 km of my route waypoint at 39°N, 40°E — I need to know if I should inspect the asset or pause dispatch based on magnitude and depth.

## When to prefer this

Choose this endpoint when you need real-time operational earthquake proximity decisions for specific assets or route waypoints in Turkey using official AFAD data, with built-in threshold logic (magnitude, depth, radius) that outputs an actionable decision rather than raw seismic data. Prefer this over raw earthquake feeds when you need structured alert reasons, priority scoring, and action recommendations (inspect, pause, reroute) without building your own proximity and decision logic.

## Known failure modes

- Asset coordinates out of range or malformed — returns no matching alerts
- AFAD source data temporarily unavailable — stale or empty results
- Max alert count truncation — results capped at 20, sourceStats.truncatedByMaxAlerts flag set to true
- Invalid asset type enum — request rejected or no results returned
- Magnitude or depth thresholds misconfigured — all events filtered out
- Payment settlement failure via x402 — call not executed

## How this service works

Pay-per-call data & tool APIs

## Output

A JSON object with a meta block (run time, item count, settlement status) and a results array. Each result includes: the recommended action (e.g. inspect_asset_and_review), event details (magnitude, depth, location, time in UTC and TRT, AFAD event ID and detail URL), asset details (type, coordinates, ID), distance in km, a reasons object with boolean flags for each threshold (alert radius, magnitude, depth, reroute), a numeric priority score, a decision label, and attribution to AFAD/TDVMS. Source statistics summarize how many events were evaluated and how many alerts were returned.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "assets": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "assetId",
     "assetType",
     "latitude",
     "longitude"
    ],
    "properties": {
     "assetId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_-]+$",
      "maxLength": 64,
      "minLength": 1
     },
     "latitude": {
      "type": "number",
      "maximum": 43,
      "minimum": 34
     },
     "assetType": {
      "enum": [
       "site",
       "warehouse",
       "store",
       "route_waypoint"
      ],
      "type": "string"
     },
     "longitude": {
      "type": "number",
      "maximum": 46,
      "minimum": 24
     }
    },
    "additionalProperties": false
   },
   "maxItems": 100,
   "minItems": 1
  },
  "maxAlerts": {
   "type": "integer",
   "maximum": 100,
   "minimum": 1
  },
  "requestId": {
   "type": "string",
   "pattern": "^[A-Za-z0-9_-]{8,64}$",
   "maxLength": 64,
   "minLength": 8
  },
  "alertRadiusKm": {
   "type": "number",
   "maximum": 1000,
   "minimum": 1
  },
  "maximumDepthKm": {
   "type": "number",
   "maximum": 800,
   "minimum": 0
  },
  "inspectMagnitude": {
   "$ref": "#/definitions/bazaarShared0"
  },
  "minimumMagnitude": {
   "$ref": "#/definitions/bazaarShared0"
  },
  "rerouteMagnitude": {
   "$ref": "#/definitions/bazaarShared0"
  },
  "maxTotalChargeUsd": {
   "type": "number",
   "maximum": 100,
   "minimum": 0.005
  },
  "maximumEventAgeHours": {
   "type": "integer",
   "maximum": 168,
   "minimum": 1
  },
  "pauseDispatchMagnitude": {
   "$ref": "#/definitions/bazaarShared0"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "meta": {
   "run_ms": 1200,
   "settled": true,
   "item_count": 1
  },
  "results": [
   {
    "action": "inspect_asset_and_review",
    "source": {
     "url": "https://deprem.afad.gov.tr/last-earthquakes.html",
     "bytes": 66335,
     "route": "direct",
     "bodySha256": "32c38e20134f2beffa6c7dca67f39db776ac9f39c92194abef85279b7e9e7f30",
     "eventCount": 100,
     "retrievedAt": "2026-08-14T06:41:03.943Z",
     "declaredBytes": 66335,
     "canonicalEventsSha256": "c31d9dd610f37d4809232fd2c4c174be6c9c4222d4c3d9fdb6e96423ed375186"
    },
    "assetId": "canary_east_bc329b33",
    "country": "TR",
    "depthKm": 17.95,
    "eventId": 590377,
    "product": "afad-earthquake-operations-router",
    "reasons": {
     "withinAlertRadius": true,
     "magnitudeAtLeastInspect": true,
     "depthWithinCustomerMaximum": true,
     "magnitudeAtLeastPauseDispatch": false,
     "routeWaypointRerouteThresholdMet": false
    },
    "baseline": false,
    "billable": true,
    "decision": "event-to-asset operational proximity alert",
    "location": "Göynücek (Amasya)",
    "stableId": "AFAD:590377:98e8887dd503ab4bc05d",
    "assetType": "route_waypoint",
    "magnitude": 3.6,
    "distanceKm": 413.148,
    "attribution": "Source: AFAD Turkey Earthquake Data Center (TDVMS). Minimal public event facts reproduced with AFAD/TDVMS attribution.",
    "sourceStats": {
     "distanceMethod": "haversine_straight_line",
     "sourceEventCount": 100,
     "eligibleEventCount": 100,
     "returnedAlertCount": 20,
     "truncatedByMaxAlerts": true,
     "matchedEventAssetPairs": 174
    },
    "eventTimeTrt": "2026-08-13 13:33:37",
    "eventTimeUtc": "2026-08-13T10:33:37.000Z",
    "alertRadiusKm": 1000,
    "assetLatitude": 39,
    "eventLatitude": 40.43083,
    "magnitudeType": "ML",
    "priorityScore": 58.24,
    "schemaVersion": "1.0",
    "assetLongitude": 40,
    "criteriaSha256": "ea053c86428913732f1e56b75db2b496e544e86788bf3d2c89a2f3c768a8bd4d",
    "eventDetailUrl": "https://deprem.afad.gov.tr/event-detail/590377",
    "eventLongitude": 35.5415,
    "methodologyCaveat": "Operational proximity rule only. This Actor does not predict earthquakes, assess structural safety, or replace AFAD/emergency instructions."
   }
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/afad-earthquake-operations-router-c043e790/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.timzinin.com](https://www.zero.xyz/host/api.timzinin.com/llms.txt)
