{
  "openapi": "3.0.1",
  "info": {
    "title": "AFAD Earthquake Operations Router",
    "description": "Unofficial, independent Actor; not affiliated with or endorsed by any named source publisher. Turn official AFAD events into distance-based asset and route actions.",
    "version": "1.37",
    "x-build-id": "87pgfB61aQ0Svu5D9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zinin~afad-earthquake-operations-router/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zinin-afad-earthquake-operations-router",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zinin~afad-earthquake-operations-router/runs": {
      "post": {
        "operationId": "runs-sync-zinin-afad-earthquake-operations-router",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zinin~afad-earthquake-operations-router/run-sync": {
      "post": {
        "operationId": "run-sync-zinin-afad-earthquake-operations-router",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "requestId",
          "assets",
          "minimumMagnitude",
          "maximumDepthKm",
          "alertRadiusKm",
          "inspectMagnitude",
          "pauseDispatchMagnitude",
          "rerouteMagnitude",
          "maximumEventAgeHours",
          "maxAlerts",
          "maxTotalChargeUsd"
        ],
        "properties": {
          "requestId": {
            "title": "Request ID",
            "pattern": "^[A-Za-z0-9_-]{8,64}$",
            "minLength": 8,
            "maxLength": 64,
            "type": "string",
            "description": "Unique non-PII idempotency ID. Reusing it with changed inputs fails."
          },
          "assets": {
            "title": "Assets and route waypoints",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "One to 100 customer-owned operational points. Use opaque non-PII asset IDs.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "assetId": {
                  "title": "Asset ID",
                  "description": "Opaque non-PII customer identity.",
                  "type": "string",
                  "pattern": "^[A-Za-z0-9_-]+$",
                  "minLength": 1,
                  "maxLength": 64
                },
                "assetType": {
                  "title": "Asset type",
                  "description": "Determines whether the reroute action can apply.",
                  "type": "string",
                  "enum": [
                    "site",
                    "warehouse",
                    "store",
                    "route_waypoint"
                  ]
                },
                "latitude": {
                  "title": "Latitude",
                  "description": "WGS84 coordinate in the Turkey/nearby operating envelope.",
                  "type": "number",
                  "minimum": 34,
                  "maximum": 43
                },
                "longitude": {
                  "title": "Longitude",
                  "description": "WGS84 coordinate in the Turkey/nearby operating envelope.",
                  "type": "number",
                  "minimum": 24,
                  "maximum": 46
                }
              },
              "required": [
                "assetId",
                "assetType",
                "latitude",
                "longitude"
              ]
            },
            "default": [
              {
                "assetId": "warehouse_ankara_01",
                "assetType": "warehouse",
                "latitude": 39.9334,
                "longitude": 32.8597
              }
            ]
          },
          "minimumMagnitude": {
            "title": "Minimum event magnitude",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Events below this AFAD magnitude are ignored.",
            "default": 2.5
          },
          "maximumDepthKm": {
            "title": "Maximum event depth (km)",
            "minimum": 0,
            "maximum": 800,
            "type": "number",
            "description": "Events deeper than this are ignored.",
            "default": 100
          },
          "alertRadiusKm": {
            "title": "Alert radius (km)",
            "minimum": 1,
            "maximum": 1000,
            "type": "number",
            "description": "Only event–asset pairs within this straight-line distance can become alerts.",
            "default": 100
          },
          "inspectMagnitude": {
            "title": "Inspect threshold",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "At or above this magnitude a matching site receives inspect_asset_and_review.",
            "default": 3.5
          },
          "pauseDispatchMagnitude": {
            "title": "Pause-dispatch threshold",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "At or above this magnitude a matching non-route asset receives pause_dispatch_and_review.",
            "default": 5
          },
          "rerouteMagnitude": {
            "title": "Route-review threshold",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "At or above this magnitude a matching route waypoint receives reroute_for_review.",
            "default": 4
          },
          "maximumEventAgeHours": {
            "title": "Maximum event age (hours)",
            "minimum": 1,
            "maximum": 168,
            "type": "integer",
            "description": "Ignores older rows even if they remain in the last-100 list.",
            "default": 24
          },
          "maxAlerts": {
            "title": "Maximum alerts",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Returns the highest-priority matching event–asset pairs, up to this limit.",
            "default": 20
          },
          "maxTotalChargeUsd": {
            "title": "Customer charge cap",
            "minimum": 0.005,
            "maximum": 100,
            "type": "number",
            "description": "Hard run cap checked before any alert claim or paid delivery.",
            "default": 2.01
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}