{
  "openapi": "3.0.1",
  "info": {
    "title": "Earthquake & Natural Hazard Feed: USGS + NASA EONET",
    "description": "One normalized feed of recent earthquakes (USGS) and open wildfire, storm, volcano and flood events (NASA EONET). Filter by hazard, magnitude, US state or bounding box; delta mode flags new events. Unofficial data, not a warning service.",
    "version": "1.0",
    "x-build-id": "epzUL4avQAedo4oiJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datacrate~natural-hazard-alerts-feed/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datacrate-natural-hazard-alerts-feed",
        "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/datacrate~natural-hazard-alerts-feed/runs": {
      "post": {
        "operationId": "runs-sync-datacrate-natural-hazard-alerts-feed",
        "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/datacrate~natural-hazard-alerts-feed/run-sync": {
      "post": {
        "operationId": "run-sync-datacrate-natural-hazard-alerts-feed",
        "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": {
          "hazards": {
            "title": "Hazard types",
            "type": "array",
            "description": "Which hazards to return. Empty = all. earthquake comes from USGS, the rest (wildfire, storm, flood, volcano and so on) from NASA EONET.",
            "items": {
              "type": "string",
              "enum": [
                "earthquake",
                "wildfire",
                "storm",
                "flood",
                "volcano",
                "drought",
                "landslide",
                "other"
              ],
              "enumTitles": [
                "Earthquake (USGS)",
                "Wildfire (NASA EONET)",
                "Storm / cyclone (NASA EONET)",
                "Flood (NASA EONET)",
                "Volcano (NASA EONET)",
                "Drought (NASA EONET)",
                "Landslide (NASA EONET)",
                "Other (sea ice, dust, snow, temperature extremes...)"
              ]
            },
            "default": []
          },
          "sources": {
            "title": "Sources",
            "type": "array",
            "description": "Which data sources to query. Empty = both.",
            "items": {
              "type": "string",
              "enum": [
                "usgs",
                "eonet"
              ],
              "enumTitles": [
                "USGS earthquakes",
                "NASA EONET open events"
              ]
            },
            "default": []
          },
          "sinceHours": {
            "title": "Updated in the last (hours)",
            "minimum": 1,
            "maximum": 720,
            "type": "integer",
            "description": "Only events first reported or updated within this many hours (1 to 720). EONET events use their latest observation date.",
            "default": 168
          },
          "minMagnitude": {
            "title": "Minimum earthquake magnitude",
            "minimum": 0,
            "maximum": 10,
            "type": "number",
            "description": "Applies to earthquakes only. 0 returns all magnitudes, including very small quakes (large output).",
            "default": 2.5
          },
          "minSeverity": {
            "title": "Minimum severity",
            "enum": [
              "any",
              "minor",
              "moderate",
              "severe",
              "extreme"
            ],
            "type": "string",
            "description": "Skip anything below this level. Earthquake severity is derived from magnitude (4.5+ moderate, 6+ severe, 7+ extreme). NASA EONET events have unknown severity and are dropped when this is set.",
            "default": "any"
          },
          "states": {
            "title": "US states",
            "type": "array",
            "description": "Two-letter US state or territory codes, e.g. CA, AK, TX, PR. Applies to earthquakes whose place name ends in a US state. Empty = everywhere.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "boundingBox": {
            "title": "Bounding box",
            "type": "object",
            "description": "Optional: {\"minLat\": 32, \"maxLat\": 42, \"minLon\": -125, \"maxLon\": -114}. Events without coordinates are dropped when a box is set. minLon greater than maxLon crosses the antimeridian."
          },
          "sortBy": {
            "title": "Sort by",
            "enum": [
              "severity",
              "newest"
            ],
            "type": "string",
            "description": "severity = most severe first, then newest (so Max events returned gives you the most severe N). newest = latest update first.",
            "default": "severity"
          },
          "onlyNewSinceLastRun": {
            "title": "Delta mode: only new or updated events",
            "type": "boolean",
            "description": "Return only events that are new or changed since the previous run with the same State name. The first run returns everything. Every row carries changeStatus (new, updated, unchanged) once a previous run exists.",
            "default": false
          },
          "stateKey": {
            "title": "State name (for delta mode)",
            "type": "string",
            "description": "Name of the saved snapshot. Use different names for different watchlists.",
            "default": "default"
          },
          "maxItems": {
            "title": "Max events returned",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Stop after this many events. You are charged per event returned. If more events match, the cap is shared across sources so both USGS and EONET appear.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}