# FEMA Disaster Declaration Search (`gubidonius/fema-disasters`) Actor

Searches US federal disaster declarations from OpenFEMA. FEMA returns one row per designated county, not per disaster, so a row count is not a disaster count. This Actor gives you either grain and always reports both numbers. No key and no login.

- **URL**: https://apify.com/gubidonius/fema-disasters.md
- **Developed by:** [Gregory Bolshakov](https://apify.com/gubidonius) (community)
- **Categories:** Business, News, MCP servers
- **Stats:** 1 total users, 0 monthly users, 0.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

## FEMA Disaster Declaration Search

Searches US federal disaster declarations from OpenFEMA. Fires, hurricanes, floods, severe
storms, biological events, back to 1953. You get the declaration, the incident type, the dates
and which counties were designated, as JSON, CSV or Excel.

No API key and no login. The data is public and this Actor reads it directly.

### A row is not a disaster

FEMA declares a disaster once, then designates counties under it one at a time. Every
designation is its own row, carrying the same disaster number, the same title and the same
dates.

So the row count is a county count. I checked Texas from 2020: 1,390 rows and 36 disasters.
That is 38.6 rows per disaster. COVID-19 alone is 257 rows, because it was declared in 257
Texas counties.

If you ask how many federal disasters hit Texas since 2020 and count rows, you get 1,390
instead of 36. FEMA's own total agrees with the wrong number, because it counts rows too.

This Actor gives you either shape. `disaster` is the default and gives one row per
declaration, with the counties listed and counted. `area` gives FEMA's own shape. Every row
says which one it is, and carries both totals so you can see the difference.

### Rolled up honestly

The four assistance programmes are declared county by county, not for the whole disaster. So
at disaster level you get counts, not flags: `areasWithPublicAssistance` says 257 of 257, or
3 of 40. A single true or false there would claim the whole disaster qualified when one county
did.

An incident end date stays empty while any one county is still open, because a disaster is not
over while one of its counties is not.

### Two things about the source worth knowing

If you call OpenFEMA yourself and leave off `$top`, you get 1,000 rows. Not all of them, and
not an error. There are 70,272.

And if you leave off `$inlinecount`, the response says `count: 0` while handing you a full
page of data. Read as a total, that turns a complete answer into an empty one. This Actor
always sends both.

### Filters

State, incident type, declaration type, disaster number, and a fiscal year range.

Declaration types are `DR` for a major disaster, `EM` for an emergency, and `FM` for a fire
management assistance grant. One event can produce more than one under different numbers, and
those are separate declarations rather than duplicates.

### Cost

Pay per event, priced on the Actor page. A search matching nothing is free, because nothing is
charged until rows are written to your dataset.

# Actor input Schema

## `rowsPer` (type: `string`):

disaster gives one row per federal declaration with its counties listed and counted. area gives FEMA's own shape, one row per designated county, which is 38 times more rows on a real query. Both are correct, they answer different questions, and every row says which one it is.

## `states` (type: `array`):

Two-letter state or territory codes, for example TX. Leave empty for all.

## `incidentTypes` (type: `array`):

FEMA incident types as it writes them, for example Fire, Hurricane, Severe Storm, Flood, Biological.

## `declarationTypes` (type: `array`):

DR for a major disaster declaration, EM for an emergency declaration, FM for a fire management assistance grant. One event can carry more than one: COVID-19 in Texas is both a DR and an EM, and they are separate declarations rather than duplicates.

## `disasterNumbers` (type: `array`):

Specific FEMA disaster numbers to fetch, for example 4485.

## `fromFiscalYear` (type: `integer`):

Earliest federal fiscal year of declaration, for example 2020.

## `toFiscalYear` (type: `integer`):

Latest federal fiscal year of declaration.

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

Stop after this many output rows. At disaster grain this counts disasters, not counties.

## Actor input object example

```json
{
  "rowsPer": "disaster",
  "states": [
    "TX"
  ],
  "fromFiscalYear": 2020,
  "maxResults": 5000
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "states": [
        "TX"
    ],
    "fromFiscalYear": 2020
};

// Run the Actor and wait for it to finish
const run = await client.actor("gubidonius/fema-disasters").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 = {
    "states": ["TX"],
    "fromFiscalYear": 2020,
}

# Run the Actor and wait for it to finish
run = client.actor("gubidonius/fema-disasters").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 '{
  "states": [
    "TX"
  ],
  "fromFiscalYear": 2020
}' |
apify call gubidonius/fema-disasters --silent --output-dataset

```

## MCP server setup

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

```

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/4dwuk7lhP6erQQpLZ/builds/GvgUuz7bVHt2ffz8U/openapi.json
