{
  "openapi": "3.0.1",
  "info": {
    "title": "FEMA Disaster Declarations & NFIP Flood Claims - OpenFEMA",
    "description": "Federal disaster declarations and NFIP flood insurance claims and policies from FEMA's official OpenFEMA API (current v3 NFIP endpoints). Filter by state, county, ZIP, census tract, dates and flood zone; optional summaries; no silent page limits. Unofficial; not endorsed by FEMA.",
    "version": "0.1",
    "x-build-id": "lHNDyL6aofDb2CdWV"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jpopendata~fema-openfema/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jpopendata-fema-openfema",
        "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/jpopendata~fema-openfema/runs": {
      "post": {
        "operationId": "runs-sync-jpopendata-fema-openfema",
        "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/jpopendata~fema-openfema/run-sync": {
      "post": {
        "operationId": "run-sync-jpopendata-fema-openfema",
        "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": {
          "mode": {
            "title": "Dataset",
            "enum": [
              "disasterDeclarations",
              "nfipClaims",
              "nfipPolicies"
            ],
            "type": "string",
            "description": "Which OpenFEMA dataset to read. Disaster declarations: one row per declared county/tribal area (state, county FIPS, incident type, dates, programs). NFIP claims: one row per flood insurance claim (date of loss, flood event, ZIP, census block group, flood zone, amounts paid). NFIP policies: one row per policy transaction (effective dates, flood zone, coverage, premium). The NFIP data is FEMA's redacted public version: no names, no street addresses, coordinates rounded to 0.1 degree.",
            "default": "disasterDeclarations"
          },
          "states": {
            "title": "States",
            "type": "array",
            "description": "Optional. US states or territories as 2-letter USPS codes, e.g. TX, FL, LA, PR. Full names (Texas) and FIPS codes (48) also work. Empty = all states.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "countyFips": {
            "title": "County FIPS codes",
            "type": "array",
            "description": "Optional. 5-digit county FIPS codes (state 2 digits + county 3 digits), e.g. 48201 (Harris County, TX), 12086 (Miami-Dade, FL), 22071 (Orleans Parish, LA). County names are not accepted. Must lie inside the States filter if both are set.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "zipCodes": {
            "title": "ZIP codes (NFIP modes)",
            "type": "array",
            "description": "Optional, NFIP claims/policies only. 5-digit ZIP codes as reported on the policy, e.g. 77096, 33139. ZIP+4 (77096-1234) is accepted.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "censusTracts": {
            "title": "Census tracts (NFIP modes)",
            "type": "array",
            "description": "Optional, NFIP claims/policies only. 11-digit census tract GEOIDs (state 2 + county 3 + tract 6), e.g. 22071013200. The census tract is the finest geography this Actor filters by.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "dateFrom": {
            "title": "From date",
            "type": "string",
            "description": "Optional start date (inclusive), YYYY-MM-DD, e.g. 2017-08-25. Applies to the declaration date (declarations), the date of loss (claims) or the policy effective date (policies). YYYY-MM, YYYY and MM/DD/YYYY also work.",
            "default": ""
          },
          "dateTo": {
            "title": "To date",
            "type": "string",
            "description": "Optional end date (inclusive), YYYY-MM-DD, e.g. 2017-09-30. Same date field as From date.",
            "default": ""
          },
          "daysBack": {
            "title": "Days back (declarations only)",
            "minimum": 1,
            "maximum": 36500,
            "type": "integer",
            "description": "Disaster declarations only, used when From date is empty: how many days back from To date (or from today) to look. Ignored when disaster numbers are given.",
            "default": 90
          },
          "incidentTypes": {
            "title": "Incident types",
            "type": "array",
            "description": "Optional. FEMA incident types, e.g. Hurricane, Flood, Fire, Severe Storm, Tornado, Winter Storm, Tropical Storm, Earthquake, Biological. Case does not matter; Wildfire, Floods, Hurricanes are understood.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "declarationTypes": {
            "title": "Declaration types",
            "type": "array",
            "description": "Optional. DR (major disaster), EM (emergency), FM (fire management). Empty = all three.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "programsDeclared": {
            "title": "Programs declared (all must apply)",
            "type": "array",
            "description": "Optional. Keep only declarations where every listed program was declared: IA (Individual Assistance), IH (Individuals and Households), PA (Public Assistance), HM (Hazard Mitigation).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "disasterNumbers": {
            "title": "Disaster numbers",
            "type": "array",
            "description": "Optional. FEMA disaster numbers (4337) or declaration strings (DR-4337-FL). When set, the Days back window is not applied.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "updatedSince": {
            "title": "Changed since",
            "type": "string",
            "description": "Optional, declarations only. Only rows FEMA added or changed on or after this date (YYYY-MM-DD) — handy for scheduled monitoring.",
            "default": ""
          },
          "floodZones": {
            "title": "Flood zones",
            "type": "array",
            "description": "Optional. Rated flood zone codes, e.g. AE, VE, A, AO, AH, X, B, C, D. SFHA = every high-risk zone (all A* and V* zones).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "floodEvent": {
            "title": "Flood event contains (claims)",
            "type": "string",
            "description": "Optional, claims only. Text contained in FEMA's flood event name, e.g. Harvey, Hurricane Ida, Sandy.",
            "default": ""
          },
          "minTotalPaid": {
            "title": "Minimum total paid, USD (claims)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional, claims only. Keep claims whose building + contents + ICC payments add up to at least this amount, e.g. 50000. 0 = no filter. Applied after download, so FEMA's match count includes smaller claims.",
            "default": 0
          },
          "inForceOn": {
            "title": "Policies in force on (policies)",
            "type": "string",
            "description": "Optional, policies only. Keep policy transactions whose term covers this date (YYYY-MM-DD) and that were not cancelled on or before it.",
            "default": ""
          },
          "summarizeBy": {
            "title": "Summarize by (NFIP modes)",
            "type": "array",
            "description": "Optional. Instead of one row per claim/policy, return one row per group with counts and dollar totals. Up to 4 of: state, county, zip, censusTract, year, month, floodZone, floodEvent (claims only), occupancyType, community. Example: county, year. Summaries read every matching row, so raise Max API requests for big areas.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "fieldSet": {
            "title": "Columns (NFIP rows)",
            "enum": [
              "all",
              "essential"
            ],
            "type": "string",
            "description": "NFIP claims/policies rows only: every FEMA column, or a compact set (dates, location, zone, building facts, coverage, payments/premium).",
            "default": "all"
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 200000,
            "type": "integer",
            "description": "Most rows to return (for summaries: most groups). The log and RUN_SUMMARY always say how many rows FEMA matched, so nothing is cut off silently.",
            "default": 100
          },
          "maxApiRequests": {
            "title": "Max API requests",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Hard cap on requests to FEMA. Requests are at least 15 seconds apart (www.fema.gov robots.txt crawl-delay). One request returns up to 5,000 declarations, 2,000 NFIP rows with all columns, or 8,000 with essential columns or for summaries.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Not needed: FEMA's API answers Apify's servers directly. If set, one proxy session is used for the whole run (no rotation).",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}