# US Disaster Declaration Change Monitor (`enfex/us-disaster-declaration-monitor`) Actor

Monitor explicit US state and territory watchlists for changed public disaster declaration records with bounded OpenFEMA API queries and change-only output.

- **URL**: https://apify.com/enfex/us-disaster-declaration-monitor.md
- **Developed by:** [Marcel K](https://apify.com/enfex) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 checked disaster declaration jurisdictions

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## US Disaster Declaration Change Monitor

Monitor an explicit US state or territory watchlist for changed public disaster declaration records. The Actor uses one bounded OpenFEMA API query per state or territory, stores a compact baseline, and returns only changed snapshots by default.

### What it does

- Accepts explicit two-letter US state or territory codes only; it does not crawl arbitrary URLs, private portals, social accounts, or personal profiles.
- Queries public OpenFEMA Disaster Declarations Summaries records for major disaster (`DR`), emergency (`EM`), and fire management (`FM`) declarations.
- Retains a bounded newest-record snapshot per state, including source identifier, declaration identifier, date, type, title, incident type, designated area, program flags, and source refresh time when supplied.
- Persists normalized snapshots by `baselineKey` to detect declaration availability and metadata changes.
- Returns structured per-state errors instead of terminating a whole watchlist run.
- Omits unchanged state snapshots by default, keeping scheduled datasets compact.

### Good use cases

- Business-continuity teams collecting a review queue for explicit operational geographies.
- Logistics and insurance analysts linking public declaration metadata to their own internal assessments.
- Researchers tracking updates to a narrow, known state or territory watchlist.

### Input

- `stateCodes`: required two-letter state or territory codes, for example `CA`.
- `declarationTypes`: optional `DR`, `EM`, and/or `FM`; all three are queried by default.
- `maxStates`: run cap from 1 to 25; v1 defaults to 10.
- `maxDeclarationsPerState`: bounded newest source records from 1 to 10; v1 defaults to 3.
- `includeUnchanged`: include unchanged source snapshots after an initial baseline.
- `baselineKey`: separate stored baselines for environments, clients, or schedules.

Example:

```json
{
  "stateCodes": ["CA"],
  "declarationTypes": ["DR", "EM", "FM"],
  "maxStates": 1,
  "maxDeclarationsPerState": 1,
  "includeUnchanged": false,
  "baselineKey": "production"
}
````

### Output

Each dataset row represents one state or territory snapshot that changed, was explicitly requested as unchanged, or could not be checked.

```json
{
  "stateCode": "CA",
  "checkedAt": "2026-07-10T01:00:00.000Z",
  "status": "ok",
  "changed": true,
  "changeTypes": ["declarations"],
  "declarations": [{
    "sourceId": "5e102152-8ea8-43aa-b282-968eeefc21a0",
    "declarationIdentifier": "EM-3646-CA",
    "disasterNumber": 3646,
    "state": "CA",
    "declarationType": "EM",
    "declarationDate": "2026-05-25T00:00:00.000Z",
    "incidentType": "Chemical"
  }],
  "previousDeclarations": [],
  "sourceUrl": "https://www.fema.gov/api/open/v2/DisasterDeclarationsSummaries?...",
  "snapshotHash": "...",
  "warnings": []
}
```

`status` values:

- `ok`: the source returned usable declaration records.
- `not_found`: no matching public declaration records were returned.
- `partial`: usable records were returned but malformed source rows were omitted.
- `error`: invalid state input or a source failure; inspect `warnings` for a machine-readable code.

### Pricing status

Pay Per Event is enabled at **$0.002 per checked jurisdiction** using the `checked-disaster-declaration-jurisdiction` event. Input is capped at 25 state or territory codes, so a full run costs at most **$0.05** in event charges. Charging happens before each OpenFEMA source request and stops before the next source request when the Apify event-charge limit is reached.

### Source, terms, and limitations

- Source: OpenFEMA Disaster Declarations Summaries v2: <https://www.fema.gov/openfema-data-page/disaster-declarations-summaries-v2>.
- The source documents an official public API endpoint and a roughly 20-minute update frequency. This Actor uses one fixed-host HTTPS JSON query per explicit state, with a 8-second timeout, two redirect maximum, 256 KiB response cap, and no browser or proxy.
- The source describes this as raw, unedited source data and warns that it can contain a small percentage of human error. Use source metadata as an evidence cue, not as an emergency, eligibility, or operational decision system.
- This Actor does not provide emergency instructions, public-assistance eligibility, safety advice, forecasts, insurance advice, or legal advice. Verify information through official sources and responsible authorities before acting.
- Required OpenFEMA citation and non-endorsement notice: “This product uses the Federal Emergency Management Agency’s OpenFEMA API, but is not endorsed by FEMA. The Federal Government or FEMA cannot vouch for the data or analyses derived from these data after the data have been retrieved from the Agency's website(s).” Cite the dataset endpoint/version and the retrieval date/time (`sourceUrl` and `checkedAt` are supplied in each row).
- This is an unofficial independent tool and is not affiliated with, endorsed by, or sponsored by FEMA, DHS, or OpenFEMA. No government seal, logo, or third-party branded asset is used.

### Recommended workflow

1. Run once with a stable `baselineKey` to establish a state snapshot.
2. Schedule later checks with the same key.
3. Keep `includeUnchanged=false` for a compact change queue.
4. Verify each relevant result via official sources before any operational or policy decision.

# Actor input Schema

## `stateCodes` (type: `array`):

Explicit two-letter state or territory codes to check, for example CA. This Actor does not crawl arbitrary URLs or personal records.

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

FEMA source declaration-type codes: DR (major disaster), EM (emergency), and FM (fire management). Defaults to all three.

## `maxStates` (type: `integer`):

Maximum unique state/territory codes processed in a run. Hard-capped at 25.

## `maxDeclarationsPerState` (type: `integer`):

Maximum newest source records retained in each state snapshot. Hard-capped at 10.

## `includeUnchanged` (type: `boolean`):

When false, only changed state snapshots and structured errors are pushed after a baseline exists.

## `baselineKey` (type: `string`):

Namespace for stored declaration snapshots, for example production, client-a, or weekly.

## Actor input object example

```json
{
  "stateCodes": [
    "CA"
  ],
  "declarationTypes": [
    "DR",
    "EM",
    "FM"
  ],
  "maxStates": 10,
  "maxDeclarationsPerState": 3,
  "includeUnchanged": false
}
```

# Actor output Schema

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

Default dataset items. Each item contains one explicit state or territory snapshot and its public OpenFEMA source metadata.

# 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 = {
    "stateCodes": [
        "CA"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("enfex/us-disaster-declaration-monitor").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 = { "stateCodes": ["CA"] }

# Run the Actor and wait for it to finish
run = client.actor("enfex/us-disaster-declaration-monitor").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "stateCodes": [
    "CA"
  ]
}' |
apify call enfex/us-disaster-declaration-monitor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=enfex/us-disaster-declaration-monitor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "US Disaster Declaration Change Monitor",
        "description": "Monitor explicit US state and territory watchlists for changed public disaster declaration records with bounded OpenFEMA API queries and change-only output.",
        "version": "0.1",
        "x-build-id": "QOdFn0SD9iBfGfKtg"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/enfex~us-disaster-declaration-monitor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-enfex-us-disaster-declaration-monitor",
                "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/enfex~us-disaster-declaration-monitor/runs": {
            "post": {
                "operationId": "runs-sync-enfex-us-disaster-declaration-monitor",
                "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/enfex~us-disaster-declaration-monitor/run-sync": {
            "post": {
                "operationId": "run-sync-enfex-us-disaster-declaration-monitor",
                "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": [
                    "stateCodes"
                ],
                "properties": {
                    "stateCodes": {
                        "title": "US state or territory codes",
                        "minItems": 1,
                        "maxItems": 25,
                        "type": "array",
                        "description": "Explicit two-letter state or territory codes to check, for example CA. This Actor does not crawl arbitrary URLs or personal records.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "declarationTypes": {
                        "title": "Declaration types",
                        "type": "array",
                        "description": "FEMA source declaration-type codes: DR (major disaster), EM (emergency), and FM (fire management). Defaults to all three.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "DR",
                                "EM",
                                "FM"
                            ]
                        },
                        "default": [
                            "DR",
                            "EM",
                            "FM"
                        ]
                    },
                    "maxStates": {
                        "title": "Max states or territories",
                        "minimum": 1,
                        "maximum": 25,
                        "type": "integer",
                        "description": "Maximum unique state/territory codes processed in a run. Hard-capped at 25.",
                        "default": 10
                    },
                    "maxDeclarationsPerState": {
                        "title": "Latest declarations per state",
                        "minimum": 1,
                        "maximum": 10,
                        "type": "integer",
                        "description": "Maximum newest source records retained in each state snapshot. Hard-capped at 10.",
                        "default": 3
                    },
                    "includeUnchanged": {
                        "title": "Include unchanged states",
                        "type": "boolean",
                        "description": "When false, only changed state snapshots and structured errors are pushed after a baseline exists.",
                        "default": false
                    },
                    "baselineKey": {
                        "title": "Baseline key",
                        "type": "string",
                        "description": "Namespace for stored declaration snapshots, for example production, client-a, or weekly."
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
