# FEMA Disaster Declarations Scraper (`devilscrapes/fema-disaster-declarations-scraper`) Actor

Export US federal disaster declaration history from OpenFEMA by state, county, incident type, declaration type and date range as clean JSON, CSV or Excel rows — no FEMA.gov hand-paging or OData client required.

- **URL**: https://apify.com/devilscrapes/fema-disaster-declarations-scraper.md
- **Developed by:** [DevilScrapes](https://apify.com/devilscrapes) (community)
- **Categories:** Real estate, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

<div align="center">
  <img src=".actor/icon.svg" width="160" alt="Devil Scrapes mark" />

## FEMA Disaster Declarations Scraper

**💰 $2.20 / 1 000 results**  ·  pay only for results  ·  no credit card to try

*We do the dirty work so your dataset stays clean.* 😈

Export US federal disaster declaration history from OpenFEMA by state, county, incident type, declaration type and date range as clean JSON, CSV or Excel rows — no FEMA.gov hand-paging or OData client required.

</div>

***

### 🎯 What this scrapes

OpenFEMA publishes every US federal disaster declaration — hurricanes, floods, fires, severe storms — back to 1953, but reaching a specific slice (one state, one county, one incident type, one date range) means hand-paging FEMA.gov or writing your own OData client against a filter syntax that rejects a malformed clause with a bare 400. This Actor builds that `$filter` expression from up to five inputs, pages it deterministically with `$top`/`$skip`, and hands back clean, typed rows — disaster number, declaration type, incident dates, program flags, county — ready for a spreadsheet or a risk model.

### 🔥 What we handle for you

- 🧱 **Multi-filter OData query building** — combine state, county, incident type, declaration type and date range in one request instead of hand-writing `$filter` syntax.
- 📄 **Deterministic paging** — `$top`/`$skip` walked against OpenFEMA's own result count, capped by your `maxResults`, never over- or under-fetching.
- ✅ **Honest zero-row handling** — a narrow filter that matches nothing finishes as a successful run with a clear status message, not a failed one.
- 🔁 **Retries transient 429/5xx responses** with exponential backoff instead of failing the whole run.
- 🧊 **Per-record fault isolation** — one malformed record is skipped and logged; it never takes down the rest of the run.
- 💰 **Pay-Per-Event pricing** — you only pay for results that hit your dataset. No data, no charge.

### 💡 Use cases

- Back a county-level insurance or restoration-contractor lead list with real declaration history.
- Feed a real-estate risk model with disaster frequency by state or county.
- Build an emergency-management consulting briefing on a state's declaration record.
- Track new declarations for a state or incident type on a schedule.

### ⚙️ How to use it

1. Click **Try for free** at the top of the page.
2. Fill in the input form — most fields have sensible defaults.
3. Click **Start**. Output streams into the run's dataset.
4. Export from **Storage → Dataset** as JSON, CSV, or Excel — or fetch via the API.

### 📥 Input

| Field | Type | Required | Default | Notes |
|---|---|:--:|---|---|
| `state` | `string` | no | 'FL' | 2-letter US postal code (e.g. <code>FL</code>). Leave empty for all states. |
| `county` | `string` | no | '—' | Free-text county / designated-area match (e.g. <code>Pinellas</code>). Leave empty for all counties. |
| `incidentType` | `string` | no | 'Hurricane' | Free text, e.g. <code>Hurricane</code>, <code>Flood</code>, <code>Fire</code>. Leave empty for all incident types. |
| `declarationType` | `string` | no | '—' | Restrict to one declaration type. Leave unset for all. |
| `dateFrom` | `string` | no | '—' | Only declarations on or after this date, as <code>YYYY-MM-DD</code>. Leave empty for no floor. |
| `dateTo` | `string` | no | '—' | Only declarations on or before this date, as <code>YYYY-MM-DD</code>. Leave empty for no ceiling. |
| `maxResults` | `integer` | no | 20 | Hard cap on total rows fetched across all pages. Each row is one billed result event. |
| `proxyConfiguration` | `object` | no | {'useApifyProxy': False} | OpenFEMA is a public API and does not need a proxy. Leave this off unless your account requires egress through Apify… |

#### Example input

```json
{
  "state": "FL",
  "incidentType": "Hurricane",
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

### 📤 Output

Every row is one dataset item.

| Field | Type | Notes |
|---|---|---|
| `fema_declaration_string` | `string` | Combined declaration identifier, e.g. `DR-4734-FL`. |
| `disaster_number` | `integer` | FEMA disaster number. |
| `state` | `string` | 2-letter state postal code. |
| `declaration_type` | `string` | `DR` (major disaster), `EM` (emergency) or `FM` (fire management). |
| `declaration_date` | `string` | Date the declaration was issued (ISO datetime string). |
| `fy_declared` | `integer` | Federal fiscal year the declaration was made in. |
| `incident_type` | `string` | e.g. `Hurricane`, `Flood`, `Fire`, `Severe Storm`. |
| `declaration_title` | `string` | Official title of the declared incident. |
| `incident_begin_date` | `string` | Start date of the underlying incident. |
| `incident_end_date` | `string` | End date of the underlying incident. |
| `disaster_closeout_date` | `string` | Date FEMA closed out the disaster, when available. |
| `designated_area` | `string` | County or other designated jurisdiction covered by the declaration. |
| `place_code` | `string` | FEMA place code for the designated area. |
| `ih_program_declared` | `boolean` | Whether the Individuals & Households program was declared. |
| `ia_program_declared` | `boolean` | Whether the Individual Assistance program was declared. |
| `pa_program_declared` | `boolean` | Whether the Public Assistance program was declared. |
| `hm_program_declared` | `boolean` | Whether the Hazard Mitigation program was declared. |
| `region` | `integer` | FEMA region number. |
| `last_refresh` | `string` | When OpenFEMA last refreshed this record. |
| `source_hash` | `string` | OpenFEMA's content hash for this record. |
| `source_id` | `string` | OpenFEMA's internal record ID. |
| `fips_state_code` | `string` | FIPS state code — join key for other geo/incident datasets. |
| `fips_county_code` | `string` | FIPS county code — join key for other geo/incident datasets. |
| `incident_id` | `string` | OpenFEMA's incident ID — join key across related disaster records. |

#### Example output

```json
{
  "fema_declaration_string": "DR-4734-FL",
  "disaster_number": 4734,
  "state": "FL",
  "declaration_type": "DR",
  "declaration_date": "2025-09-28T00:00:00.000Z",
  "fy_declared": 2025,
  "incident_type": "Hurricane",
  "declaration_title": "HURRICANE HELENE",
  "incident_begin_date": "2025-09-26T00:00:00.000Z",
  "incident_end_date": "2025-10-01T00:00:00.000Z",
  "disaster_closeout_date": null,
  "designated_area": "Pinellas (County)",
  "place_code": "12103",
  "ih_program_declared": true,
  "ia_program_declared": true,
  "pa_program_declared": true,
  "hm_program_declared": true,
  "region": 4,
  "last_refresh": "2026-01-05T10:12:00.000Z",
  "source_hash": "a1b2c3d4e5f6",
  "source_id": "5f8a1c2e-0000-0000-0000-000000000000",
  "fips_state_code": "12",
  "fips_county_code": "103",
  "incident_id": "5f9a1c2e-0000-0000-0000-000000000001"
}
```

### 💰 Pricing

Pay-Per-Event — you pay only when these events fire:

| Event | USD | What it is |
|---|---:|---|
| `actor-start` | $0.2 | One-off warm-up charge per run |
| `result` | $0.002 | Per dataset item |

Example: 1 000 results at the rates above ≈ **$2.20**. No subscription, no minimum, no card to start — Apify gives every new account $5 of free credit.

### 🚧 Limitations

- Returns the declaration-summary fields OpenFEMA publishes — not the full disaster narrative or FEMA's individual-assistance case data.
- `county` matches OpenFEMA's raw `designatedArea` text, which mixes formats (e.g. "Pinellas (County)"), so it is a substring match rather than a normalized county lookup.

### ❓ FAQ

**Do I need an API key?**

No. OpenFEMA is a public, keyless API, so a run needs no credentials from you.

**How far back does this go?**

OpenFEMA's disaster declarations dataset goes back to 1953; leave the date fields empty to search the full history.

**What happens if my filters match nothing?**

The run finishes successfully with zero rows and a status message describing exactly what was searched — a narrow filter is not a failure.

### 💬 Your feedback

Spotted a bug, hit a weird edge case, or need a new field? Open an
issue on the Actor's **Issues** tab on Apify Console — we ship
fixes weekly and we read every report.

***

<div align="center">

Built by **[Devil Scrapes](https://apify.com/DevilScrapes)** 😈 — a small fleet of
opinionated public-data Actors. Honest pricing, real engineering, zero fine print.

</div>

# Actor input Schema

## `state` (type: `string`):

2-letter US postal code (e.g. <code>FL</code>). Leave empty for all states.

## `county` (type: `string`):

Free-text county / designated-area match (e.g. <code>Pinellas</code>). Leave empty for all counties.

## `incidentType` (type: `string`):

Free text, e.g. <code>Hurricane</code>, <code>Flood</code>, <code>Fire</code>. Leave empty for all incident types.

## `declarationType` (type: `string`):

Restrict to one declaration type. Leave unset for all.

## `dateFrom` (type: `string`):

Only declarations on or after this date, as <code>YYYY-MM-DD</code>. Leave empty for no floor.

## `dateTo` (type: `string`):

Only declarations on or before this date, as <code>YYYY-MM-DD</code>. Leave empty for no ceiling.

## `maxResults` (type: `integer`):

Hard cap on total rows fetched across all pages. Each row is one billed result event.

## `proxyConfiguration` (type: `object`):

OpenFEMA is a public API and does not need a proxy. Leave this off unless your account requires egress through Apify Proxy.

## Actor input object example

```json
{
  "state": "FL",
  "incidentType": "Hurricane",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `datasetItems` (type: `string`):

All dataset items as JSON.

## `datasetItemsCsv` (type: `string`):

Same data exported to CSV.

## `datasetView` (type: `string`):

Open the run dataset in the Console.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "state": "FL",
    "incidentType": "Hurricane",
    "maxResults": 20,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("devilscrapes/fema-disaster-declarations-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "state": "FL",
    "incidentType": "Hurricane",
    "maxResults": 20,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("devilscrapes/fema-disaster-declarations-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "state": "FL",
  "incidentType": "Hurricane",
  "maxResults": 20,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call devilscrapes/fema-disaster-declarations-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,devilscrapes/fema-disaster-declarations-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/RvTdLNiKs0BOwD2Gw/builds/LuTAMcgwWEPapQ0Z4/openapi.json
