{
  "openapi": "3.0.1",
  "info": {
    "title": "Storm Hail Damage Leads — NOAA Reports to Affected Addresses",
    "description": "Turns NOAA SPC hail reports into a deduplicated list of street addresses inside each hail swath buffer. Built for roofing lead gen, storm-marketing agencies, and AI agents.",
    "version": "0.1",
    "x-build-id": "VfaSwA9E5xB6hqeUI"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/industrious_emphasis~storm-hail-lead-finder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-industrious_emphasis-storm-hail-lead-finder",
        "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/industrious_emphasis~storm-hail-lead-finder/runs": {
      "post": {
        "operationId": "runs-sync-industrious_emphasis-storm-hail-lead-finder",
        "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/industrious_emphasis~storm-hail-lead-finder/run-sync": {
      "post": {
        "operationId": "run-sync-industrious_emphasis-storm-hail-lead-finder",
        "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": [
          "dateMode"
        ],
        "properties": {
          "dateMode": {
            "title": "Which storm day(s)",
            "enum": [
              "today",
              "yesterday",
              "last3days",
              "dateRange"
            ],
            "type": "string",
            "description": "The only required choice. Pick a preset, or pick 'Custom date range' and fill in the two date fields below (they are ignored otherwise). Note: NOAA 'convective days' run 12:00 UTC to 12:00 UTC, and 'Today' is still filling in — 'Yesterday' is the most recent complete day.",
            "default": "yesterday"
          },
          "startDate": {
            "title": "Start date — only used with 'Custom date range'",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Ignored unless 'Which storm day(s)' above is set to 'Custom date range'. Format YYYY-MM-DD. Max 31 days per run."
          },
          "endDate": {
            "title": "End date — only used with 'Custom date range'",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "type": "string",
            "description": "Ignored unless 'Which storm day(s)' above is set to 'Custom date range'. Format YYYY-MM-DD."
          },
          "states": {
            "title": "States filter (optional)",
            "type": "array",
            "description": "Optional. 2-letter US state codes like TX, FL, OK. Leave empty to include every state — recommended for a first run so you always see live data.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "minHailSizeInches": {
            "title": "Minimum hail size (inches)",
            "minimum": 0.25,
            "maximum": 6,
            "type": "number",
            "description": "Optional, default 1.0 (quarter size — the typical roof-damage threshold). 1.75 = golf ball. Lower it for more, weaker events.",
            "default": 1
          },
          "radiusMiles": {
            "title": "Address search radius around each hail report (miles)",
            "minimum": 0.1,
            "maximum": 10,
            "type": "number",
            "description": "Optional, default 1.5. Addresses within this distance of each hail report are returned. 1-2 miles is sensible; max 10.",
            "default": 1.5
          },
          "maxReports": {
            "title": "Spend cap: max hail events to process",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Optional, default 25. Biggest hail is processed first, so a low cap keeps the most damaging events. This is your cost control on big storm days.",
            "default": 25
          },
          "maxAddresses": {
            "title": "Spend cap: max addresses to return",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Optional, default 500. Hard cap on billed address rows for the whole run.",
            "default": 500
          },
          "addressSource": {
            "title": "Address source",
            "enum": [
              "osm",
              "openaddresses_grid",
              "none"
            ],
            "type": "string",
            "description": "Default (OpenStreetMap) needs zero setup. 'OpenAddresses grid' is for operators hosting their own pre-sharded address data (see README). 'Events only' skips addresses entirely — cheap storm monitoring.",
            "default": "osm"
          },
          "openAddressesBaseUrl": {
            "title": "OpenAddresses shard base URL — only for 'OpenAddresses grid'",
            "type": "string",
            "description": "Required only when Address source is 'OpenAddresses grid'; ignored otherwise. Public base URL of shards produced by scripts/preprocess_openaddresses.py (see README)."
          },
          "overpassEndpoint": {
            "title": "Overpass endpoint (optional)",
            "type": "string",
            "description": "Leave the default unless you run your own OpenStreetMap Overpass server or prefer a specific mirror.",
            "default": "https://overpass-api.de/api/interpreter"
          },
          "overpassDelaySeconds": {
            "title": "Delay between Overpass queries in seconds (optional)",
            "minimum": 0,
            "maximum": 30,
            "type": "number",
            "description": "Politeness delay for the shared public endpoint, default 2. Only lower it on a private endpoint.",
            "default": 2
          },
          "maxRuntimeSeconds": {
            "title": "Runtime budget for address lookups (seconds)",
            "minimum": 0,
            "maximum": 3600,
            "type": "integer",
            "description": "Optional, default 270. Address lookups stop after this many seconds and the run returns what it has (a partial list beats a timed-out, failed run). Raise it — or set 0 for no limit — for large multi-state runs where you want every address.",
            "default": 270
          },
          "contactEmail": {
            "title": "Contact email (optional)",
            "type": "string",
            "description": "Added to the HTTP User-Agent per OpenStreetMap etiquette so operators can reach you instead of blocking you. Recommended if you schedule frequent runs."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}