# USGS Landslide Proximity Screener — Hazard by Coordinate (`malonestar/usgs-landslide-proximity-screener`) Actor

Landslide proximity & hazard screener: per-coordinate point-in-polygon + nearest mapped landslide over the 680k-feature USGS US Landslide Inventory. Batch lat/lon; get in\_mapped\_landslide, count within radius, nearest type/distance & a hazard flag.

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

## Pricing

from $5.50 / 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

## USGS Landslide Proximity Screener — Hazard by Coordinate

**Landslide proximity screener.** Give it a batch of coordinates (lat/lon) and it returns, per site, whether the point falls **inside a mapped landslide**, how many mapped landslides sit **within your search radius**, the **nearest landslide's type, confidence and distance**, and a single **landslide hazard flag** — computed over the **USGS US Landslide Inventory v3** (~680,000 mapped landslide polygons plus a national point inventory).

This is a **landslide hazard screener** built for batch, programmatic due diligence: one billable row per asset, even when the site is clear.

### Who it's for
- **Phase I ESA / environmental due-diligence firms** screening a property list for geologic hazards before a site visit.
- **P&C and specialty insurers** flagging landslide exposure across a book of locations.
- **Site-selection & development teams** ranking candidate parcels by proximity to historically mapped slides.
- **CRE lenders & portfolio managers** adding a fast landslide-inventory check to collateral screening.

### What it does
For each asset `{ lat, lon, label }` the actor:
1. Runs an **authoritative point-in-polygon** query against the USGS landslide **polygon** layer — `in_mapped_landslide` is TRUE only if the coordinate actually falls inside a mapped landslide.
2. Runs an **envelope (bounding-box ≈ radius)** query on both the **polygon** and **point** layers to gather nearby mapped landslides.
3. Computes a haversine distance from the asset to each nearby record's mapped location to derive `landslide_count_within_radius`, `nearest_landslide_type`, `nearest_confidence`, and `nearest_distance_km`.
4. Sets `landslide_hazard_flag = true` if the site is inside a mapped landslide **or** any mapped landslide is within the radius.

### Example input
```json
{
  "assets": [
    { "lat": 34.3617, "lon": -119.4437, "label": "La Conchita, CA (landslide-prone)" },
    { "lat": 37.6872, "lon": -97.3301, "label": "Wichita, KS (flat control)" }
  ],
  "radiusMeters": 1000,
  "maxAssets": 500
}
````

### Output fields (one row per asset)

| Field | Meaning |
|-------|---------|
| `asset_label`, `asset_lat`, `asset_lon` | Echo of the input site. |
| `radius_meters` | Search radius used. |
| `in_mapped_landslide` | TRUE if the point is inside a USGS mapped-landslide polygon (authoritative). |
| `landslide_count_within_radius` | Distinct mapped landslides within the radius (proxy from record location). |
| `nearest_landslide_type` | LS\_Type of the nearest landslide (slide, flow, fall, rock avalanche, etc.). |
| `nearest_confidence` / `nearest_confidence_label` | USGS mapping-confidence code (1/2/3/5/8) and its label. |
| `nearest_distance_km` | Great-circle distance to the nearest mapped landslide (0 when inside a polygon). |
| `landslide_hazard_flag` | TRUE if inside a mapped landslide or any within radius. |
| `error` | Per-asset error (invalid coordinate / query failure); null when OK. |
| `disclaimer`, `source_url`, `checked_at` | Provenance. |

### Use as an MCP tool

This actor is a clean, chainable **MCP tool** for AI agents (Claude, Cursor, etc.) via `mcp.apify.com`: pass a list of coordinates, receive structured landslide-proximity rows. Field-level output descriptions make the results self-documenting for tool use.

### Important — what this is (and is not)

This is an **editorial proximity screen over the USGS mapped-landslide INVENTORY** (a record of *where landslides have been observed and mapped*). It is **NOT** a probabilistic landslide-**susceptibility** or hazard model, and not an engineering or insurance determination. `in_mapped_landslide` is an exact point-in-polygon test; `landslide_count_within_radius` and `nearest_distance_km` are **proxies** derived from each record's mapped `Lat_N`/`Lon_W` (polygon centroid or point location) and can under- or over-state true distance for large or elongated features. Always confirm with USGS maps and a licensed geotechnical engineer before any decision.

### FAQ

**Is this coordinate on a landslide?** Check `in_mapped_landslide` — it is TRUE only when the point falls inside a USGS mapped-landslide polygon.

**How close is the nearest landslide?** See `nearest_distance_km` (0 means the site is inside a mapped landslide).

**How many landslides are near my site?** `landslide_count_within_radius`, using the `radiusMeters` you set.

**Which data source?** The USGS US Landslide Inventory v3 (ScienceBase item 671eef1f…), served from ArcGIS Online. Keyless and public.

**Does an empty/clear result cost much?** No — clear sites still return a row (for auditability) billed as a single result; there is no separate charge.

### Pricing

Pay-per-result: one row per screened asset. Suggested **$10 / 1,000 results ($0.01 per asset)**.

# Actor input Schema

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

List of sites to screen for landslide proximity. Each item is an object with numeric lat and lon (WGS84 decimal degrees) and an optional label. One billable result row is returned per asset, even when the site is clear.

## `radiusMeters` (type: `integer`):

Radius around each asset used for the nearby-landslide search box and the landslide\_count\_within\_radius / nearest\_distance\_km proxy. Clamped to 100-50000 m.

## `maxAssets` (type: `integer`):

Safety cap on how many assets to screen in one run.

## Actor input object example

```json
{
  "assets": [
    {
      "lat": 34.3617,
      "lon": -119.4437,
      "label": "La Conchita, CA (landslide-prone)"
    },
    {
      "lat": 37.6872,
      "lon": -97.3301,
      "label": "Wichita, KS (flat control)"
    }
  ],
  "radiusMeters": 1000,
  "maxAssets": 500
}
```

# Actor output Schema

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

The default dataset.

# 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": 34.3617,
            "lon": -119.4437,
            "label": "La Conchita, CA (landslide-prone)"
        },
        {
            "lat": 37.6872,
            "lon": -97.3301,
            "label": "Wichita, KS (flat control)"
        }
    ],
    "radiusMeters": 1000,
    "maxAssets": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("malonestar/usgs-landslide-proximity-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": 34.3617,
            "lon": -119.4437,
            "label": "La Conchita, CA (landslide-prone)",
        },
        {
            "lat": 37.6872,
            "lon": -97.3301,
            "label": "Wichita, KS (flat control)",
        },
    ],
    "radiusMeters": 1000,
    "maxAssets": 500,
}

# Run the Actor and wait for it to finish
run = client.actor("malonestar/usgs-landslide-proximity-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": 34.3617,
      "lon": -119.4437,
      "label": "La Conchita, CA (landslide-prone)"
    },
    {
      "lat": 37.6872,
      "lon": -97.3301,
      "label": "Wichita, KS (flat control)"
    }
  ],
  "radiusMeters": 1000,
  "maxAssets": 500
}' |
apify call malonestar/usgs-landslide-proximity-screener --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USGS Landslide Proximity Screener — Hazard by Coordinate",
        "description": "Landslide proximity & hazard screener: per-coordinate point-in-polygon + nearest mapped landslide over the 680k-feature USGS US Landslide Inventory. Batch lat/lon; get in_mapped_landslide, count within radius, nearest type/distance & a hazard flag.",
        "version": "1.0",
        "x-build-id": "6SZCPVvFMBydtvdkd"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/malonestar~usgs-landslide-proximity-screener/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-malonestar-usgs-landslide-proximity-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~usgs-landslide-proximity-screener/runs": {
            "post": {
                "operationId": "runs-sync-malonestar-usgs-landslide-proximity-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~usgs-landslide-proximity-screener/run-sync": {
            "post": {
                "operationId": "run-sync-malonestar-usgs-landslide-proximity-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 (coordinates to screen)",
                        "type": "array",
                        "description": "List of sites to screen for landslide proximity. Each item is an object with numeric lat and lon (WGS84 decimal degrees) and an optional label. One billable result row is returned per asset, even when the site is clear.",
                        "default": [
                            {
                                "lat": 34.3617,
                                "lon": -119.4437,
                                "label": "La Conchita, CA (landslide-prone)"
                            },
                            {
                                "lat": 37.6872,
                                "lon": -97.3301,
                                "label": "Wichita, KS (flat control)"
                            }
                        ]
                    },
                    "radiusMeters": {
                        "title": "Search radius (meters)",
                        "minimum": 100,
                        "maximum": 50000,
                        "type": "integer",
                        "description": "Radius around each asset used for the nearby-landslide search box and the landslide_count_within_radius / nearest_distance_km proxy. Clamped to 100-50000 m.",
                        "default": 1000
                    },
                    "maxAssets": {
                        "title": "Max assets",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Safety cap on how many assets to screen in one run.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
