Search NFIP Flood Insurance Claims
fema_search_nfipSearch National Flood Insurance Program (NFIP) claims data by state, county, ZIP code, and year range. Returns claim counts, amounts paid on building and contents, flood zones, and loss years. state is required — the full NFIP dataset is 2.7 million rows; unfiltered access is prohibited. When DataCanvas is enabled (CANVAS_PROVIDER_TYPE=duckdb) and results exceed the inline preview, the full result set is staged on a canvas for SQL aggregation via fema_dataframe_query. Use fema_dataframe_describe to inspect the staged table schema before writing SQL. Without canvas, results are returned inline up to the limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum claim rows to return in the inline preview (1–10000, default 1000). When DataCanvas is enabled, the canvas stages the full matching result set regardless of this value. | |
| state | Yes | Two-letter US state code (required). NFIP dataset is 2.7M rows — state filter is mandatory. | |
| year_to | No | End year of loss, inclusive (e.g., 2023). | |
| zip_code | No | ZIP code to narrow results to a specific area (5-digit, e.g., 77002). | |
| canvas_id | No | Optional canvas ID from a prior call. Omit to create a fresh canvas. The response returns the canvas_id to pass to fema_dataframe_query. | |
| year_from | No | Start year of loss, inclusive (e.g., 2020). | |
| county_code | No | County code to narrow results within the state. Accepts the full 5-digit state+county FIPS (e.g., 48201 for Harris County TX) or the 3-digit county portion (e.g., 201) when state is provided — the server prepends the state FIPS automatically. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Present when the call failed. Absent on success. | |
| claims | No | Inline preview of claim records (first N rows). Full dataset available via canvas_id when spilled=true. | |
| notice | No | Guidance on canvas usage or result scope. | |
| spilled | No | True when the full result set was staged on DataCanvas; use canvas_id + fema_dataframe_query for SQL analysis. False when all results fit inline. | |
| canvas_id | No | Canvas ID for the staged full result set. Pass to fema_dataframe_query and fema_dataframe_describe. Present only when spilled=true. | |
| truncated | No | True when the canvas row cap (50,000) was reached before the full matching set was staged — the canvas holds a partial result. Apply tighter filters (county_code, zip_code, year range) to stage the complete set. | |
| total_count | No | Total matching claims in the filtered dataset before the limit. | |
| canvas_table | No | DuckDB table name on the canvas holding all fetched rows. Reference in SQL FROM clauses. Present when spilled=true. | |
| returned_count | No | Number of claim records in the inline preview. |