# Levee Flood Risk Screener — USACE National Levee Database (`malonestar/usace-levee-flood-risk-screener`) Actor

Check if a property sits behind a US levee and how much to trust it. Screens assets or a state/county inventory against USACE's National Levee Database with a composite risk score from FEMA accreditation, overtopping chance, rehab status, warning system and egress routes.

- **URL**: https://apify.com/malonestar/usace-levee-flood-risk-screener.md
- **Developed by:** [Kyle Maloney](https://apify.com/malonestar) (community)
- **Categories:** Agents, Developer tools, Real estate
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.40 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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/docs.md):

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

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.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/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

## USACE Levee Flood Risk Screener — National Levee Database

This actor answers the question a FEMA flood-zone lookup **cannot**:

> **"Is there a levee between this property and the water — and can I actually trust it?"**

It screens locations (or a state/county inventory) against the US Army Corps of
Engineers **National Levee Database (NLD)** — the authoritative federal registry
of ~30,000 leveed areas — and computes an editorial **levee risk score** from the
attributes that actually predict levee failure risk: FEMA accreditation status,
overtopping chance, PL 84-99 rehab-program enrollment, warning-system presence,
and mapped egress routes.

This is deliberately **not** a flood-zone lookup. A property can sit in FEMA
Zone X (no flood insurance required) purely because it's "protected" by a levee
FEMA itself rates **Non-Accredited** — meaning FEMA does not actually trust that
levee to hold back a 1%-annual-chance flood. That gap is the whole point of
this actor.

### Who it's for

- **Insurance & underwriting teams** — screen a book of insured properties for hidden levee-dependent flood exposure that flood-zone data alone misses.
- **Real-estate & title due diligence** — check a parcel before close; a Non-Accredited levee is a material disclosure risk.
- **Lenders & mortgage risk** — flag levee-protected collateral that FEMA maps understate.
- **Municipal & emergency management** — rank levees in your county by risk to prioritize inspection and rehab funding requests.
- **AI agents** — a clean, chainable "levee check" tool: coordinates in, structured risk verdict out.

### Two modes (auto-detected from input)

#### 1. Assets mode — screen specific points

Set `assets` (a list of `{lat, lon, label}`). The actor runs a server-side
point-in-polygon query against every NLD leveed-area polygon for each point.
One row out per asset — **assets with no levee overlap are still returned**
(`behind_levee: false`) so a batch never silently drops rows.

```json
{
  "assets": [
    { "lat": 45.903, "lon": -111.53, "label": "Gallatin County, MT (Madison River levee)" },
    { "lat": 38.075, "lon": -102.28, "label": "Granada, CO (Granada Right Levee)" }
  ]
}
````

#### 2. Inventory mode — rank levees in an area

Leave `assets` empty and set `states` and/or `counties` instead. The actor
pages the NLD, computes a risk score for every matching leveed area, and
outputs the **top `maxResults` ranked by leveeRiskScore descending** — the
worst levees in your area of interest, first.

```json
{
  "states": ["CO"],
  "counties": [],
  "maxResults": 100
}
```

### Output fields

| Field | Meaning |
|---|---|
| `asset_label`, `asset_lat`, `asset_lon` | Your input point, echoed back (assets mode) |
| `behind_levee` | True if the point falls inside a mapped leveed area (assets mode) |
| `leveed_area_count` | How many leveed-area polygons contain the point (assets mode) |
| `rank` | 1 = highest risk in the fetched set (inventory mode) |
| `system_name`, `system_id` | Official NLD system name / ID |
| `states`, `counties`, `community_names` | Where the leveed area sits (systems can span multiple states) |
| `sponsors`, `sponsor_type` | Who owns/maintains the levee |
| `fema_accreditation_rating` | FEMA's certification status for the levee |
| `non_accredited_flag` | True unless the rating is exactly "Accredited Levee System" |
| `overtopping_ace` | Parsed annual chance of overtopping, when known |
| `rehab_program_status` | PL 84-99 federal rehab enrollment: Active / Inactive / Not Enrolled |
| `warning_system` | Whether a flood warning system is documented |
| `egress_number` | Mapped evacuation routes out of the leveed area (0 = none on file) |
| `leveed_area_sq_mi`, `flood_sources` | Size and the water body it protects against |
| `leveeRiskScore` | 0-100 editorial composite risk score (see below) |
| `checked_at`, `disclaimer`, `source_url`, `error` | Run metadata and advisory notice |

Invalid asset points produce an `error` row and the run continues — one bad
coordinate never fails a large batch.

### How `leveeRiskScore` is computed

`leveeRiskScore` is an **editorial model**, not a FEMA or USACE figure:

```
leveeRiskScore = accreditationFactor x overtoppingFactor x rehabFactor
                 x warningBoost x egressBoost   (scaled to 0-100)
```

- **accreditationFactor** — Non-Accredited scores highest, Provisionally
  Accredited (PAL) next, unclear/no-info text next, Accredited lowest.
- **overtoppingFactor** — derived from the NLD's reported annual chance of
  overtopping; unknown/missing chance is treated as **elevated** risk, not
  neutral, because a levee with no data on file is not one you can verify.
- **rehabFactor** — Active PL 84-99 rehab enrollment (a known, currently
  flagged deficiency) scores higher than Not Enrolled.
- **warningBoost** — a documented flood warning system reduces the score;
  no/unknown warning system boosts it.
- **egressBoost** — zero mapped evacuation routes boosts the score the most;
  1 route is a smaller boost; 2+ routes add nothing.

Missing data is deliberately treated as risk-elevating throughout — a levee
the NLD has no accreditation, overtopping, or egress data for is exactly the
kind of levee that hasn't been checked recently, which is itself a risk
signal.

**This is not a flood-zone lookup or engineering certification.** Confirm any
insurance, lending, or life-safety decision against official FEMA flood maps
and a licensed engineer.

### Data source

**USACE National Levee Database**, "Leveed Areas" layer (ArcGIS FeatureServer,
`geospatial.sec.usace.army.mil/dls/rest/services/NLD/Public/FeatureServer/16`).
Keyless, official, and free — you pay only for the records this actor returns.

### Use as an MCP tool

This actor is exposed via [mcp.apify.com](https://mcp.apify.com) — AI agents
(Claude, Cursor, etc.) can call it as a levee-exposure verification tool. The
input schema (lat/lon/label list, or states/counties) and field-level output
descriptions are designed to be read and chained by agents: geocode an
address upstream, screen it here, branch on `behind_levee` / `leveeRiskScore`
downstream.

### FAQ

**How do I check if my property is behind a levee?**
Geocode the address to lat/lon (any geocoder), pass it in `assets`, and read
`behind_levee` and `leveeRiskScore` on the row.

**Is a FEMA flood-zone "X" (no insurance required) always safe if there's a levee?**
No. FEMA can zone land as protected by a levee it separately rates
**Non-Accredited** — the levee doesn't meet FEMA's engineering standard, but
the flood-zone map hasn't been updated to reflect that. Check
`fema_accreditation_rating` and `non_accredited_flag` directly; don't rely on
flood-zone letter alone.

**What does `leveeRiskScore: null` with `behind_levee: false` mean?**
The point is not inside any NLD-mapped leveed area — no levee-dependent risk
to score from this data source. It says nothing about general flood risk.

**Why might a point I expect to be "behind a levee" come back `behind_levee: false`?**
The NLD only maps levees the Corps has surveyed and digitized; some small,
private, or unmapped levees aren't in the database yet. This is a screen
against the federal registry, not a guarantee of ground truth.

**Can I rank all the levees in my county?**
Yes — leave `assets` empty, set `states: ["CO"]` and `counties: ["Prowers"]`,
and the top `maxResults` leveed areas by `leveeRiskScore` come back ranked.

**Why is `overtopping_ace` sometimes null even though the levee has data?**
The NLD itself reports "Unknown" for many systems — that's parsed to `null`
and is treated as an elevated-risk input in the score, not a data gap on our
side.

# Actor input Schema

## `assets` (type: `array`):

List of asset locations to check against USACE leveed-area polygons. Each item is an object: {"lat": \<number -90..90>, "lon": \<number -180..180>, "label": "<your name for the asset>"}. One dataset row (one billable check) is produced per asset, even if it matches no levee. When this is non-empty the actor runs in assets mode and ignores states/counties. Leave empty and set states/counties instead to run in inventory mode.

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

Only used when assets is empty. US states to search, as 2-letter postal codes (CO, TX) or full names (Colorado). Leave empty (with counties also empty) to search the whole national inventory, bounded by Max results.

## `counties` (type: `array`):

Only used when assets is empty. County names to search (matched as a substring, e.g. "Gallatin"). Combine with states to narrow a multi-county state search.

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

In assets mode: caps how many of your assets are screened (one billed row per asset). In inventory mode: how many top leveed areas to output, ranked by leveeRiskScore descending (each row is one billed result). Default 500.

## Actor input object example

```json
{
  "assets": [
    {
      "lat": 45.903,
      "lon": -111.53,
      "label": "Gallatin County, MT (Madison River levee)"
    },
    {
      "lat": 38.075,
      "lon": -102.28,
      "label": "Granada, CO (Granada Right Levee)"
    }
  ],
  "maxResults": 500
}
```

# Actor output Schema

## `dataset` (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 = {
    "assets": [
        {
            "lat": 45.903,
            "lon": -111.53,
            "label": "Gallatin County, MT (Madison River levee)"
        },
        {
            "lat": 38.075,
            "lon": -102.28,
            "label": "Granada, CO (Granada Right Levee)"
        }
    ],
    "maxResults": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("malonestar/usace-levee-flood-risk-screener").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 = {
    "assets": [
        {
            "lat": 45.903,
            "lon": -111.53,
            "label": "Gallatin County, MT (Madison River levee)",
        },
        {
            "lat": 38.075,
            "lon": -102.28,
            "label": "Granada, CO (Granada Right Levee)",
        },
    ],
    "maxResults": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("malonestar/usace-levee-flood-risk-screener").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 '{
  "assets": [
    {
      "lat": 45.903,
      "lon": -111.53,
      "label": "Gallatin County, MT (Madison River levee)"
    },
    {
      "lat": 38.075,
      "lon": -102.28,
      "label": "Granada, CO (Granada Right Levee)"
    }
  ],
  "maxResults": 500
}' |
apify call malonestar/usace-levee-flood-risk-screener --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=malonestar/usace-levee-flood-risk-screener",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Levee Flood Risk Screener — USACE National Levee Database",
        "description": "Check if a property sits behind a US levee and how much to trust it. Screens assets or a state/county inventory against USACE's National Levee Database with a composite risk score from FEMA accreditation, overtopping chance, rehab status, warning system and egress routes.",
        "version": "1.0",
        "x-build-id": "NngAwNuIJUrP5TlfL"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/malonestar~usace-levee-flood-risk-screener/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-malonestar-usace-levee-flood-risk-screener",
                "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/malonestar~usace-levee-flood-risk-screener/runs": {
            "post": {
                "operationId": "runs-sync-malonestar-usace-levee-flood-risk-screener",
                "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/malonestar~usace-levee-flood-risk-screener/run-sync": {
            "post": {
                "operationId": "run-sync-malonestar-usace-levee-flood-risk-screener",
                "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",
                "properties": {
                    "assets": {
                        "title": "Assets to screen (assets mode)",
                        "type": "array",
                        "description": "List of asset locations to check against USACE leveed-area polygons. Each item is an object: {\"lat\": <number -90..90>, \"lon\": <number -180..180>, \"label\": \"<your name for the asset>\"}. One dataset row (one billable check) is produced per asset, even if it matches no levee. When this is non-empty the actor runs in assets mode and ignores states/counties. Leave empty and set states/counties instead to run in inventory mode."
                    },
                    "states": {
                        "title": "States (inventory mode)",
                        "type": "array",
                        "description": "Only used when assets is empty. US states to search, as 2-letter postal codes (CO, TX) or full names (Colorado). Leave empty (with counties also empty) to search the whole national inventory, bounded by Max results.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "counties": {
                        "title": "Counties (inventory mode)",
                        "type": "array",
                        "description": "Only used when assets is empty. County names to search (matched as a substring, e.g. \"Gallatin\"). Combine with states to narrow a multi-county state search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxResults": {
                        "title": "Max results",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "In assets mode: caps how many of your assets are screened (one billed row per asset). In inventory mode: how many top leveed areas to output, ranked by leveeRiskScore descending (each row is one billed result). Default 500.",
                        "default": 500
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
