{
  "openapi": "3.0.1",
  "info": {
    "title": "GDACS Alerts Scraper - Disaster, Earthquake, Flood, Wildfire",
    "description": "776 disaster events where one GDACS query returns 100, and 704 earthquakes in 21 queries against 100. 56 fields per event. Global disaster alerts with wildfire data, tropical cyclone, drought and flood data, red and orange alert levels. UN and European Commission source.",
    "version": "0.1",
    "x-build-id": "1k2ScQbszqdW6cq3L"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/snow_leo_data~disaster-alerts-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-snow_leo_data-disaster-alerts-scraper",
        "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/snow_leo_data~disaster-alerts-scraper/runs": {
      "post": {
        "operationId": "runs-sync-snow_leo_data-disaster-alerts-scraper",
        "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/snow_leo_data~disaster-alerts-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-snow_leo_data-disaster-alerts-scraper",
        "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": {
          "daysBack": {
            "title": "Days back",
            "minimum": 1,
            "maximum": 3650,
            "type": "integer",
            "description": "How many days of history to collect, counting back from today. Ignored when you set an explicit start date below. GDACS keeps events alive for as long as they last, so a drought that started in April still shows up in a 30-day window.",
            "default": 30
          },
          "eventTypes": {
            "title": "Hazard types",
            "type": "array",
            "description": "Which hazards to collect. Leave empty for all six. GDACS has no separate tsunami type: tsunami information arrives inside earthquake events.",
            "items": {
              "type": "string",
              "enum": [
                "EQ",
                "TC",
                "FL",
                "VO",
                "DR",
                "WF"
              ],
              "enumTitles": [
                "EQ - Earthquake",
                "TC - Tropical cyclone",
                "FL - Flood",
                "VO - Volcano",
                "DR - Drought",
                "WF - Wildfire"
              ]
            },
            "default": [
              "EQ",
              "TC",
              "FL",
              "VO",
              "DR",
              "WF"
            ]
          },
          "alertLevels": {
            "title": "Alert levels",
            "type": "array",
            "description": "GDACS colour codes. Red is the most severe. Each level is queried separately on purpose: asking GDACS for all three at once returns a single page of green events and silently drops every red and orange one.",
            "items": {
              "type": "string",
              "enum": [
                "Red",
                "Orange",
                "Green"
              ],
              "enumTitles": [
                "Red - highest",
                "Orange - medium",
                "Green - lowest"
              ]
            },
            "default": [
              "Red",
              "Orange"
            ]
          },
          "dateFrom": {
            "title": "Start date",
            "type": "string",
            "description": "Earliest event date, as YYYY-MM-DD. Leave empty to use Days back instead. GDACS holds events back to 2000, and any window wider than a single page is split automatically."
          },
          "dateTo": {
            "title": "End date",
            "type": "string",
            "description": "Latest event date, as YYYY-MM-DD. Leave empty for today. A reversed range is swapped silently rather than failing."
          },
          "countries": {
            "title": "Countries",
            "type": "array",
            "description": "Keep only events touching these countries. Accepts ISO3 codes (PHL, IDN) or full names (Philippines). Matching uses the full affected-country list, not just the country the event is centred on, and compares whole names rather than substrings.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "bbox": {
            "title": "Bounding box",
            "type": "array",
            "description": "Keep only events whose coordinates fall inside [west, south, east, north] in degrees, for example [95, -12, 142, 7] for Indonesia. A reversed box is corrected silently."
          },
          "minAlertScore": {
            "title": "Minimum alert score",
            "type": "string",
            "description": "GDACS scores every event from 0 to 3 alongside the colour. Enter a decimal such as 1.5 to keep only the harder half of the orange band. Left empty, nothing is dropped."
          },
          "minMagnitude": {
            "title": "Minimum earthquake magnitude",
            "type": "string",
            "description": "Applies to earthquakes only; other hazard types pass through untouched. Enter a decimal such as 5.5."
          },
          "minSeverity": {
            "title": "Minimum severity value",
            "type": "string",
            "description": "Filters on the raw GDACS severity number. The unit differs per hazard - M for earthquakes, km/h for cyclones, hectares for wildfires, square kilometres for droughts - so use this with a single hazard type selected, otherwise it compares unlike things."
          },
          "currentOnly": {
            "title": "Ongoing events only",
            "type": "boolean",
            "description": "Keep only events GDACS still marks as current. Useful for a live situation board; leave off when building a historical archive.",
            "default": false
          },
          "withCoordinatesOnly": {
            "title": "Events with coordinates only",
            "type": "boolean",
            "description": "Drop events that carry no point geometry. Turn this on when the output feeds a map or a spatial join.",
            "default": false
          },
          "includeDetails": {
            "title": "Fetch the full event card",
            "type": "boolean",
            "description": "Adds one request per event and fills in magnitude, depth, the population GDACS estimates was exposed to strong shaking, the episode count and the map images. Turn it off for the fastest possible listing.",
            "default": true
          },
          "includeGeometry": {
            "title": "Fetch affected-area polygons",
            "type": "boolean",
            "description": "Adds one more request per event and returns the GeoJSON polygons GDACS publishes for the affected area - cyclone tracks, flood extents, shaking contours. Off by default because it makes rows considerably larger.",
            "default": false
          },
          "assets": {
            "title": "Your sites to watch",
            "type": "array",
            "description": "A list of objects such as [{\"name\": \"Manila DC\", \"lat\": 14.6, \"lon\": 121.0, \"radiusKm\": 300}]. Every event with coordinates is measured against every site with the haversine formula, and events outside all radii keep their other fields but get no proximity data. No external geocoding is involved, so the numbers are reproducible."
          },
          "onlyNew": {
            "title": "Only new or changed events",
            "type": "boolean",
            "description": "Remembers what previous runs already delivered in a named key-value store and skips events whose alert level, episode, severity, end date and ongoing flag are all unchanged. Each row is tagged NEW, UPDATED or UNCHANGED.",
            "default": false
          },
          "emitUnchanged": {
            "title": "Also return unchanged events",
            "type": "boolean",
            "description": "Only meaningful together with the option above. Returns unchanged events too, tagged UNCHANGED, when you would rather have a full snapshot every run than pay only for changes.",
            "default": false
          },
          "compactOutput": {
            "title": "Compact rows",
            "type": "boolean",
            "description": "Cuts each row down to the 15 fields needed to identify and rank an event. Handy when the output feeds an LLM context window or a spreadsheet.",
            "default": false
          },
          "excludeEmptyFields": {
            "title": "Drop empty fields",
            "type": "boolean",
            "description": "Removes keys whose value is empty instead of returning them as null. Smaller payloads, at the cost of a ragged shape between rows.",
            "default": false
          },
          "webhookUrl": {
            "title": "Slack or Discord webhook",
            "type": "string",
            "description": "One message per run listing the alerts that reached the threshold below, with the GDACS report link for each. A failing webhook is recorded in the run report and never fails the run."
          },
          "webhookMinAlertLevel": {
            "title": "Notify from this level up",
            "enum": [
              "Red",
              "Orange",
              "Green"
            ],
            "type": "string",
            "description": "The lowest alert level worth a message. Green would notify on nearly everything, so the default is Orange.",
            "default": "Orange"
          },
          "compareWithSingleQuery": {
            "title": "Record what one plain query would return",
            "type": "boolean",
            "description": "Spends one extra request to ask GDACS for the same window without splitting, and writes the number into the run report. Use it to see for yourself how much a single query leaves behind.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum events",
            "minimum": 0,
            "type": "integer",
            "description": "Hard stop on how many events end up in the dataset, which is also the hard stop on what you are charged. Zero means no limit. Left empty, a run stops at 100 so that a first look costs little.",
            "default": 0
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}