{
  "openapi": "3.0.1",
  "info": {
    "title": "GDACS Global Disaster Alerts",
    "description": "Monitor and track natural disasters worldwide using the Global Disaster Alert and Coordination System (GDACS).",
    "version": "2.5",
    "x-build-id": "cT0Q8B6bFJn6eafg5"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ryanclinton~gdacs-disaster-alerts/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ryanclinton-gdacs-disaster-alerts",
        "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/ryanclinton~gdacs-disaster-alerts/runs": {
      "post": {
        "operationId": "runs-sync-ryanclinton-gdacs-disaster-alerts",
        "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/ryanclinton~gdacs-disaster-alerts/run-sync": {
      "post": {
        "operationId": "run-sync-ryanclinton-gdacs-disaster-alerts",
        "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",
        "properties": {
          "profile": {
            "title": "Operational profile",
            "enum": [
              "custom",
              "global-newsroom",
              "humanitarian-coordination",
              "enterprise-bcp",
              "travel-risk",
              "insurance-cat-portfolio",
              "government-em-desk",
              "research-archive"
            ],
            "type": "string",
            "description": "One-flag preset that bundles mode + persona + view + minSeverity + systemMode for a specific role. Picks sensible defaults for the most common workflows — set individual fields below to override.",
            "default": "custom"
          },
          "mode": {
            "title": "Execution mode",
            "enum": [
              "auto",
              "monitoring",
              "humanitarian-triage",
              "news-desk",
              "corporate-bcp",
              "insurance-cat",
              "research-archive",
              "incident-replay",
              "raw"
            ],
            "type": "string",
            "description": "Workflow preset. monitoring = scheduled runs with watchlist + delta; humanitarian-triage = Red/Orange only with response routing; news-desk = headline-first all severities; corporate-bcp = high-impact + priority queue; insurance-cat = comprehensive archive; research-archive = full payload, no decision filtering; incident-replay = reconstruct from watchlist without live fetch; raw = disable opinionated routing."
          },
          "persona": {
            "title": "Persona",
            "enum": [
              "humanitarian-coordinator",
              "news-desk-editor",
              "corporate-bcp-lead",
              "government-em",
              "insurance-catastrophe",
              "research-analyst",
              "generic"
            ],
            "type": "string",
            "description": "Pressure-score weight pack and SLA tightening. humanitarian-coordinator weights affected-countries highest; corporate-bcp-lead weights country impact + severity; news-desk-editor weights recency; etc."
          },
          "view": {
            "title": "View preset",
            "enum": [
              "executive",
              "tactical",
              "newsroom",
              "humanitarian",
              "gis",
              "soc",
              "standard"
            ],
            "type": "string",
            "description": "Projection emphasis. executive = decision cards + portfolio only; tactical = full alerts + recommendedAction; newsroom = headline + summary + whyThisMatters; humanitarian = affectedCountries + decision cards; gis = lat/lng focus; soc = severity/SLA/recommendedAction; standard = everything per outputProfile."
          },
          "systemMode": {
            "title": "System mode (one-flag stateful service)",
            "type": "boolean",
            "description": "Auto-enables watchlist + delta + batch insights + priority queue. Recommended for any scheduled run.",
            "default": false
          },
          "eventType": {
            "title": "Event type",
            "enum": [
              "ALL",
              "EQ",
              "FL",
              "TC",
              "VO",
              "DR",
              "WF"
            ],
            "type": "string",
            "description": "Type of disaster event to search for.",
            "default": "ALL"
          },
          "alertLevel": {
            "title": "Alert level",
            "enum": [
              "ALL",
              "Red",
              "Orange",
              "Green"
            ],
            "type": "string",
            "description": "GDACS color-coded severity filter.",
            "default": "ALL"
          },
          "minSeverity": {
            "title": "Minimum severity tier",
            "enum": [
              "critical",
              "high",
              "elevated",
              "moderate",
              "low",
              "informational"
            ],
            "type": "string",
            "description": "Decision-layer floor — events below this tier are filtered out. critical > high > elevated > moderate > low > informational."
          },
          "regionPreset": {
            "title": "Region preset",
            "enum": [
              "global",
              "pacific-ring-of-fire",
              "caribbean-hurricane-corridor",
              "european-flood-belt",
              "south-asian-monsoon-zone",
              "east-african-rift",
              "mediterranean-seismic",
              "us-tornado-alley",
              "australia-bushfire-zone",
              "andean-volcanic-arc"
            ],
            "type": "string",
            "description": "Pre-defined region pack — pacific-ring-of-fire / caribbean-hurricane-corridor / european-flood-belt / south-asian-monsoon-zone / east-african-rift / mediterranean-seismic / us-tornado-alley / australia-bushfire-zone / andean-volcanic-arc / global. Expands to countryFilter + bbox."
          },
          "dateFrom": {
            "title": "Start date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Restrict the GDACS JSON API window to events with start date >= this date (YYYY-MM-DD). NOTE: GDACS does not expose a historical archive — the public feed primarily ships currently-active events plus recently-closed ones. Historical date ranges often time out at the upstream API; the actor will then fall back to the GeoRSS feed, which is current-events-only. Use this for a tight recent window (last ~30 days), not for archival research."
          },
          "dateTo": {
            "title": "End date",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Upper bound on the GDACS JSON API window (YYYY-MM-DD). See dateFrom — GDACS does not provide a historical archive, so older closed events generally won't be returned."
          },
          "countryFilter": {
            "title": "Country filter",
            "maxItems": 50,
            "type": "array",
            "description": "Country names to include. Matches affectedCountries or primary country. Leave empty for global.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "bboxFilter": {
            "title": "Bounding box filter",
            "type": "array",
            "description": "Optional geographic bounding box [minLat, minLon, maxLat, maxLon]."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of disaster events to return after filtering. Range 1-500. PPE charged per output event.",
            "default": 50
          },
          "dataSource": {
            "title": "Data source",
            "enum": [
              "auto",
              "json",
              "georss"
            ],
            "type": "string",
            "description": "auto tries the JSON API first and falls back to GeoRSS. georss is more reliable but less detailed.",
            "default": "auto"
          },
          "watchlistName": {
            "title": "Watchlist name",
            "type": "string",
            "description": "Persist event snapshots in a named KV store across runs. Enables changeFlags, incident continuity, state transitions, temporal analytics, and watchlist analytics. First run after setting: every record carries changeFlags=['NEW'] until run 2."
          },
          "referenceRunId": {
            "title": "Reference run ID (for diff)",
            "type": "string",
            "description": "Optional Apify run ID. Diff this run against that run's OUTPUT instead of (or alongside) watchlist state."
          },
          "replayMode": {
            "title": "Incident replay mode",
            "type": "boolean",
            "description": "Skip live GDACS fetch — reconstruct events from the watchlist snapshot only. Useful for postmortems, research replays, and reproducing prior decisions. Requires watchlistName.",
            "default": false
          },
          "assets": {
            "title": "Assets (offices, datacenters, ports, suppliers)",
            "type": "array",
            "description": "User-defined assets to check against every event for proximity routing. Each asset: { name, lat, lon, radiusKm, tags? }. Events within an asset's radiusKm appear in assetImpact + portfolioState.assetsAtRiskCount + assetSummary on the batch-summary record.",
            "default": []
          },
          "notificationPolicy": {
            "title": "Notification policy",
            "type": "object",
            "description": "Webhook delivery policy: { dedupeWindowMinutes, notifyOnEscalationOnly, suppressDowngrades, digestMode }. dedupeWindowMinutes suppresses repeat alerts within N minutes for unchanged events. digestMode = executive-summary or overnight sends only the batch summary; none = per-event embeds."
          },
          "webhookUrl": {
            "title": "Slack/Discord webhook URL",
            "type": "string",
            "description": "Push rich Slack-style or Discord-style embeds for events at or above webhookMinSeverity. Auto-detects Discord vs Slack from URL."
          },
          "webhookMinSeverity": {
            "title": "Webhook minimum severity",
            "enum": [
              "critical",
              "high",
              "elevated",
              "moderate",
              "low",
              "informational"
            ],
            "type": "string",
            "description": "Severity tier floor for webhook delivery. Events below this tier are excluded from embeds (but still appear in the dataset)."
          },
          "escalationOnly": {
            "title": "Escalation-only",
            "type": "boolean",
            "description": "Filter to events whose changeDetection.changeFlags contains ESCALATED. Requires watchlistName.",
            "default": false
          },
          "newlyActiveOnly": {
            "title": "Newly-active-only",
            "type": "boolean",
            "description": "Filter to events whose changeDetection.changeFlags contains NEW (first-time observations in this watchlist).",
            "default": false
          },
          "unresolvedOnly": {
            "title": "Unresolved-only",
            "type": "boolean",
            "description": "Filter to events where isCurrent=true.",
            "default": false
          },
          "minPressureScore": {
            "title": "Minimum pressure score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop events whose disasterState.pressureScore is below this value (0-100)."
          },
          "activeDurationMinHours": {
            "title": "Minimum active duration (hours)",
            "minimum": 0,
            "maximum": 8760,
            "type": "integer",
            "description": "Drop events younger than N hours. Lets ops teams focus on events with established durations."
          },
          "minPopulationExposureMillions": {
            "title": "Minimum population exposure (millions)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Drop events where geoContext.populationWithin100kmMillions is below this value. Requires includeGeoContext."
          },
          "outputProfile": {
            "title": "Output profile",
            "enum": [
              "minimal",
              "standard",
              "full",
              "llm"
            ],
            "type": "string",
            "description": "Per-record detail level. minimal = decision fields only; standard = decisions + state + change; full = everything; llm = LLM-optimised."
          },
          "explainabilityLevel": {
            "title": "Explainability level",
            "enum": [
              "none",
              "compact",
              "full"
            ],
            "type": "string",
            "description": "Verbosity of decision explanations. none = strip decisionTrace + whyThisMatters + components; compact = top-5 trace + summary; full = everything.",
            "default": "compact"
          },
          "includeBatchInsights": {
            "title": "Include batch insights",
            "type": "boolean",
            "description": "Compute list-quality + coverage breakdown on the batch-summary record. Auto-on with most modes and systemMode."
          },
          "includePriorityQueue": {
            "title": "Include priority queue",
            "type": "boolean",
            "description": "Compute a ranked top-N events list on the batch-summary record."
          },
          "priorityQueueSize": {
            "title": "Priority queue size",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many top-ranked events to include in the priority queue.",
            "default": 10
          },
          "includeHazardInsights": {
            "title": "Include hazard insights",
            "type": "boolean",
            "description": "Compute per-event hazard intelligence: earthquake depth + aftershock risk + tsunami potential; cyclone intensity class + Saffir-Simpson category; etc.",
            "default": true
          },
          "includeGeoContext": {
            "title": "Include geographic context",
            "type": "boolean",
            "description": "Compute per-event geoContext: nearestMajorCity + distance + population within 100km + coastal proximity. Uses a curated ~150-city lookup.",
            "default": true
          },
          "includeIncidentBlock": {
            "title": "Include incident continuity",
            "type": "boolean",
            "description": "Compute per-event incident block: incidentId + version + age + stability + trend. Requires watchlistName.",
            "default": true
          },
          "includeCorrelationSignals": {
            "title": "Include correlation engine",
            "type": "boolean",
            "description": "Detect compound risk (multi-hazard within 500km), regional clusters, cyclone-flood overlap, volcanic clusters. Computed across the current run only.",
            "default": true
          },
          "includeGeographicClusters": {
            "title": "Include geographic clustering",
            "type": "boolean",
            "description": "Group nearby events into clusters (single-link at 500km). Each event gets cluster membership; clusters appear on the batch-summary record.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}