Query Any OpenFEMA Dataset
fema_query_datasetGeneric OData query against any OpenFEMA v2 dataset — the escape hatch for datasets the convenience tools do not cover (e.g., FimaNfipPolicies, IndividualAssistanceHousingRegistrantsLargeDisasters, FemaWebDeclarationAreas, PublicAssistanceApplicants). Accepts raw OData filter, select, orderby, and pagination parameters. For NFIP Policies, use propertyState (not state) as the state field — always include a county or ZIP filter to avoid timeout. The dataset name must match the exact OpenFEMA v2 entity name (case-sensitive, e.g., FimaNfipClaims). Unknown dataset names return an unknown_dataset error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum records to return (1–10000, default 100). | |
| filter | No | OData $filter expression (e.g., "state eq 'TX' and declarationDate ge '2024-01-01T00:00:00.000Z'"). String values in single quotes. | |
| offset | No | Pagination offset (default 0). | |
| select | No | Comma-separated field names to return (e.g., "disasterNumber,state,declarationDate"). | |
| dataset | Yes | OpenFEMA v2 dataset entity name (case-sensitive, e.g., FimaNfipPolicies, FemaWebDeclarationAreas, PublicAssistanceApplicants). | |
| orderby | No | OData $orderby expression (e.g., "declarationDate desc"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Records returned from the dataset. Field names depend on the queried dataset. | |
| error | No | Present when the call failed. Absent on success. | |
| notice | No | Guidance when no results were found. | |
| dataset | No | The dataset that was queried. | |
| totalCount | No | Total matching records before pagination — exceeds returned_count when results were capped at the limit. | |
| total_count | No | Total matching records before pagination. | |
| returned_count | No | Number of records in this response. |