{
  "openapi": "3.0.1",
  "info": {
    "title": "NOAA Storm Events Peril Climatology — County Risk Scores",
    "description": "County-level severe-weather climatology from NOAA's Storm Events Database. For any US county or state and year range, get per-peril event frequency, casualties, and property/crop damage, plus a composite peril risk score. Built for P&C underwriting, reinsurance, and catastrophe siting. Keyless.",
    "version": "1.1",
    "x-build-id": "AiNc4GVxkMJjrVUuo"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/malonestar~noaa-storm-events-peril-climatology/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-malonestar-noaa-storm-events-peril-climatology",
        "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/malonestar~noaa-storm-events-peril-climatology/runs": {
      "post": {
        "operationId": "runs-sync-malonestar-noaa-storm-events-peril-climatology",
        "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/malonestar~noaa-storm-events-peril-climatology/run-sync": {
      "post": {
        "operationId": "run-sync-malonestar-noaa-storm-events-peril-climatology",
        "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": {
          "states": {
            "title": "States",
            "type": "array",
            "description": "US states to profile, as 2-letter postal codes or full names (e.g. \"CO\" or \"Colorado\"). At least one is required for the run to return data; if empty the actor exits with zero results. Defaults to [\"Colorado\"] so an API call with no states still returns data instead of an empty dataset.",
            "default": [
              "Colorado"
            ],
            "items": {
              "type": "string"
            }
          },
          "counties": {
            "title": "Counties (optional filter)",
            "type": "array",
            "description": "Optional. Narrows the States above to specific counties. Each entry is either a 5-digit county FIPS (e.g. \"08031\") or a bare county name matched case-insensitively as a substring (e.g. \"Denver\"). Leave empty for all counties in the selected states.",
            "items": {
              "type": "string"
            }
          },
          "startYear": {
            "title": "Start year",
            "minimum": 1950,
            "maximum": 2035,
            "type": "integer",
            "description": "First calendar year of NOAA Storm Events data to include (inclusive). The live NCEI archive covers 1950 to the current year; the run clamps to whatever the directory index actually offers. Note that pre-1996 files only carry tornado, thunderstorm-wind and hail.",
            "default": 2023
          },
          "endYear": {
            "title": "End year",
            "minimum": 1950,
            "maximum": 2035,
            "type": "integer",
            "description": "Last calendar year of NOAA Storm Events data to include (inclusive). The most recent year is partial and is revised by NCEI throughout the year, which deflates its events-per-year contribution. Every output row reports years_retrieved and data_complete.",
            "default": 2025
          },
          "eventTypes": {
            "title": "Event types (optional filter)",
            "type": "array",
            "description": "Optional peril filter. Keep only these NOAA event types (case-insensitive exact match), e.g. [\"Hail\",\"Tornado\",\"Flash Flood\",\"Thunderstorm Wind\"]. Leave empty to include every peril type. If every peril you list is one NOAA records only against forecast zones (e.g. \"Wildfire\"), the run fails with an actionable message rather than returning an empty dataset -- set includeZones to true for those.",
            "items": {
              "type": "string"
            }
          },
          "includeZones": {
            "title": "Include forecast zones",
            "type": "boolean",
            "description": "NOAA records some perils against counties (CZ_TYPE=\"C\") and others against NWS forecast zones (CZ_TYPE=\"Z\"). 39 of NOAA's 50 peril types -- including Wildfire, Excessive Heat, Winter Storm, Heavy Snow, Drought, Hurricane (Typhoon), Coastal Flood, Storm Surge/Tide and High Wind -- have ZERO county-typed events, so with this OFF (the default) they cannot appear in the results at all. Turn it ON to include them. Either way, every output row reports zone_events_excluded and names the perils dropped in excluded_zone_perils.",
            "default": false
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Maximum number of output rows returned (each is one billed result). One row = one (county x peril type) climatology record, sorted by peril score descending.",
            "default": 2000
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}