# USDA Cropland Data Layer Farmland & Land-Cover Screener (`malonestar/usda-cdl-farmland-siting-screener`) Actor

Farmland & land-cover API: batch coordinates to USDA Cropland Data Layer class (Corn, Soybeans, Developed, Forest, Water), an active-cropland flag, and a prime-farmland proxy. For solar-siting, land-use diligence, and farmland-protection screening. Keyless, MCP-ready. Prime-farmland is a proxy.

- **URL**: https://apify.com/malonestar/usda-cdl-farmland-siting-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, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

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

## USDA Cropland Data Layer Farmland & Siting Screener

Classifies a batch of coordinates against the USDA Cropland Data Layer (CDL) and returns, per site, the land-cover class, an active-cropland flag, and a prime-farmland proxy. Aimed at solar and wind site developers, land-use diligence teams, and ag lenders who need to know whether a candidate parcel is in active crop production before they act on it.

### How it works

For each site you supply (`lat`/`lon`, WGS84), the actor projects the point into the CDL's native CONUS Albers Equal Area projection (EPSG:5070) and samples it through USDA's public CropScape `GetCDLValue` point service (`nassgeodata.gmu.edu`). No API key, no login, no scraping. The CDL is a ~30 m annual satellite crop-classification raster; the sampled pixel gives you the class code (1 = Corn, 5 = Soybeans, 176 = Grassland/Pasture, 121–124 = Developed, 141–143 = Forest, 111 = Open Water, 0 = No Data outside CONUS).

Coverage is the Contiguous US. A point in the ocean or outside CONUS returns a valid `No Data` row, not an error, and a single bad coordinate produces an ERROR row without failing the run. Years 2008–2025 are available; default is 2024.

### Example input

```json
{
  "assets": [
    { "lat": 42.45, "lon": -93.55, "label": "Iowa cornfield" },
    { "lat": 42.30, "lon": -94.20, "label": "Iowa soybean field" },
    { "lat": 40.75, "lon": -73.98, "label": "Manhattan, NY (developed)" }
  ],
  "year": 2024
}
````

### Key output fields (one row per site)

- `cdl_code` — raw USDA CDL class code (0–255) at the point.
- `land_cover_class` — the human-readable name for that code (Corn, Soybeans, Developed/Medium Intensity, Deciduous Forest, and so on).
- `category` — coarse bucket: cropland, pasture, forest, developed, water, or other.
- `is_active_cropland` — true when the pixel is a cultivated crop (field/row crops, orchards, specialty and double crops; grassland/pasture, forest, developed, and water are excluded).
- `prime_farmland_flag` — a proxy that equals `is_active_cropland`; see the caveat below.
- `prime_farmland_basis` — how that flag was derived, in plain language.
- `cdl_color` — the official CDL legend hex color for map rendering.
- `albers_x`, `albers_y` — the EPSG:5070 coordinate actually sampled.
- `cdl_year`, `source_url`, `citation`, `checked_at`, `error`, `disclaimer`.

### About the prime-farmland flag

The CDL does not carry the legal "prime farmland" soil classification — that lives in NRCS SSURGO as the `farmlndcl` attribute. So `prime_farmland_flag` is a transparent proxy: true when the point is in active crop production, which strongly indicates farmland but is not a substitute for an SSURGO determination. For an authoritative answer (for example, a Farmland Protection Policy Act / AD-1006 review), use NRCS Web Soil Survey / SSURGO.

### Who uses it

- Solar and renewable-energy developers screening candidate parcels for active cropland or farmland-conversion sensitivity before acquisition.
- Land-use and environmental diligence teams (Phase I / ESA-adjacent) needing a fast land-cover read at many coordinates.
- Ag lenders, appraisers, and CRE analysts checking whether collateral is productive cropland.
- Farmland-protection and conservation planners flagging active-cropland parcels.
- AI agents needing a coordinate-to-land-cover lookup.

### Use as an MCP tool

This is a Pay-Per-Result API with field-level output descriptions, so AI agents (Claude, Cursor, and others) can call it over mcp.apify.com as a coordinate-to-land-cover tool. Empty input costs nothing beyond the actor start.

### FAQ

**Is this the legal prime-farmland determination?** No. It is a CDL active-cropland proxy; use NRCS SSURGO for the authoritative soil class.

**Does it need an API key?** No. The CropScape service is public and keyless.

**What happens for an ocean or non-US point?** You get a valid `No Data` (code 0, category `other`) row, not an error.

**How is billing calculated?** One dataset row per site.

# Actor input Schema

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

List of coordinates to classify against the USDA Cropland Data Layer. Each item is an object: {"lat": \<number -90..90>, "lon": \<number -180..180>, "label": "<your name for the site>"}. Coverage is the Contiguous United States (CONUS); points outside CONUS return a valid 'No Data' row. Each site produces exactly one billable dataset row. Invalid points produce an ERROR row and the run continues.

## `year` (type: `integer`):

USDA Cropland Data Layer vintage year to sample (national CDL is published annually). Values are clamped to 2008-2025; the most recent fully published year is recommended. Default 2024.

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

Safety cap on the number of sites classified per run. Sites beyond this cap are skipped with a warning.

## Actor input object example

```json
{
  "assets": [
    {
      "lat": 42.45,
      "lon": -93.55,
      "label": "Iowa cornfield (active cropland)"
    },
    {
      "lat": 42.3,
      "lon": -94.2,
      "label": "Iowa soybean field"
    },
    {
      "lat": 40.75,
      "lon": -73.98,
      "label": "Manhattan, NY (developed)"
    }
  ],
  "year": 2024,
  "maxAssets": 500
}
```

# Actor output Schema

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

The default dataset with one CDL land-cover row per site.

# 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": 42.45,
            "lon": -93.55,
            "label": "Iowa cornfield (active cropland)"
        },
        {
            "lat": 42.3,
            "lon": -94.2,
            "label": "Iowa soybean field"
        },
        {
            "lat": 40.75,
            "lon": -73.98,
            "label": "Manhattan, NY (developed)"
        }
    ],
    "year": 2024
};

// Run the Actor and wait for it to finish
const run = await client.actor("malonestar/usda-cdl-farmland-siting-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": 42.45,
            "lon": -93.55,
            "label": "Iowa cornfield (active cropland)",
        },
        {
            "lat": 42.3,
            "lon": -94.2,
            "label": "Iowa soybean field",
        },
        {
            "lat": 40.75,
            "lon": -73.98,
            "label": "Manhattan, NY (developed)",
        },
    ],
    "year": 2024,
}

# Run the Actor and wait for it to finish
run = client.actor("malonestar/usda-cdl-farmland-siting-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": 42.45,
      "lon": -93.55,
      "label": "Iowa cornfield (active cropland)"
    },
    {
      "lat": 42.3,
      "lon": -94.2,
      "label": "Iowa soybean field"
    },
    {
      "lat": 40.75,
      "lon": -73.98,
      "label": "Manhattan, NY (developed)"
    }
  ],
  "year": 2024
}' |
apify call malonestar/usda-cdl-farmland-siting-screener --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "USDA Cropland Data Layer Farmland & Land-Cover Screener",
        "description": "Farmland & land-cover API: batch coordinates to USDA Cropland Data Layer class (Corn, Soybeans, Developed, Forest, Water), an active-cropland flag, and a prime-farmland proxy. For solar-siting, land-use diligence, and farmland-protection screening. Keyless, MCP-ready. Prime-farmland is a proxy.",
        "version": "1.0",
        "x-build-id": "03PYpiJvRKzNjoscX"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/malonestar~usda-cdl-farmland-siting-screener/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-malonestar-usda-cdl-farmland-siting-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~usda-cdl-farmland-siting-screener/runs": {
            "post": {
                "operationId": "runs-sync-malonestar-usda-cdl-farmland-siting-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~usda-cdl-farmland-siting-screener/run-sync": {
            "post": {
                "operationId": "run-sync-malonestar-usda-cdl-farmland-siting-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": "Sites to screen",
                        "type": "array",
                        "description": "List of coordinates to classify against the USDA Cropland Data Layer. Each item is an object: {\"lat\": <number -90..90>, \"lon\": <number -180..180>, \"label\": \"<your name for the site>\"}. Coverage is the Contiguous United States (CONUS); points outside CONUS return a valid 'No Data' row. Each site produces exactly one billable dataset row. Invalid points produce an ERROR row and the run continues."
                    },
                    "year": {
                        "title": "CDL year",
                        "minimum": 2008,
                        "maximum": 2025,
                        "type": "integer",
                        "description": "USDA Cropland Data Layer vintage year to sample (national CDL is published annually). Values are clamped to 2008-2025; the most recent fully published year is recommended. Default 2024.",
                        "default": 2024
                    },
                    "maxAssets": {
                        "title": "Max site lookups",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Safety cap on the number of sites classified per run. Sites beyond this cap are skipped with a warning.",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
