# EPA ECHO Enforcement Scraper (`nexgendata/epa-echo-enforcement-scraper`) Actor

Scrape EPA ECHO facilities — CWA, CAA, RCRA programs. Identity, address, NAICS, NPDES/AIR/RCRA permits, inspections, SNC status, qtrs in significant violation, total penalties USD, 13-qtr compliance history. ESG screens, plaintiff law firms, M\&A diligence, journalism.

- **URL**: https://apify.com/nexgendata/epa-echo-enforcement-scraper.md
- **Developed by:** [Stephan Corbeil](https://apify.com/nexgendata) (community)
- **Categories:** Business, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $80.00 / 1,000 epa facilities

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

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

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

## 🌍 EPA ECHO Enforcement Scraper — Environmental Compliance Intel

**Pull every EPA-regulated facility — Clean Water Act, Clean Air Act, RCRA — with full compliance, inspection, and penalty history. Direct from the EPA's ECHO data services. No API key, no paywall, ESG-grade.**

The EPA's [Enforcement and Compliance History Online (ECHO)](https://echo.epa.gov/) is the canonical compliance database for every Industrial site, refinery, wastewater plant, hazardous-waste handler, and air emitter regulated by the federal government. This Actor wraps the official `cwa_rest_services` / `air_rest_services` / `rcra_rest_services` two-step Query-ID API and ships clean rows ready for ESG screening, plaintiff prospecting, M&A diligence, and investigative journalism.

### What you get (per facility)

- `program` — `CWA` / `CAA` / `RCRA`
- `facility_name`, `epa_registry_id`, `source_id` — identity + EPA's master 12-digit Registry ID
- `address_street` / `_city` / `_state` / `_zip`, `epa_region`, `latitude`, `longitude`
- `naics_codes`, `sic_codes` — industry classification
- `npdes_ids`, `air_ids`, `rcra_ids`, `sdwa_ids`, `tri_ids` — cross-program permit IDs
- `inspection_count`, `date_last_inspection`, `inspected_in_last_5_years`
- `snc_status` — Significant Non-Complier flag (CWA / CAA HPV / RCRA SNC)
- `snc_event_description` — narrative
- `qtrs_with_non_compliance`, `qtrs_with_significant_violation`
- `violation_status`, `current_violation_flag`
- `total_penalties_usd`, `date_last_penalty`
- `compliance_history_13qtrs` — 13-quarter history string (V/S/-/N indicators)
- `echo_facility_url` — direct link to ECHO Detailed Facility Report
- `raw_columns` — the entire ECHO column payload for downstream parsing

### Six high-leverage use cases

1. **ESG screen at the facility level** — pull every CWA facility in a state with `snc_status = "Y"` to flag environmental risk before fund inclusion.
2. **Plaintiff law-firm prospecting** — facilities with `qtrs_with_significant_violation > 4` AND `total_penalties_usd > 0` are prime mass-tort + citizen-suit candidates.
3. **M&A diligence** — given a target's address list, pull EPA program coverage + outstanding violations before signing the LOI.
4. **Industry compliance benchmark** — filter `naicsCodes: ["324110"]` (petroleum refining) and compare SNC quarter ratios across regions.
5. **Local investigative journalism** — set `state: "WV"`, `program: "CWA"` and surface every wastewater discharger with active violations in your beat.
6. **GovTech sales** — environmental software sells on outstanding violations. Use this feed to enrich your CRM with active-non-compliance prospects.

### JSON quick start

```json
{
  "state": "TX",
  "program": "CWA",
  "complianceStatus": "Significant Violation",
  "maxFacilities": 50
}
````

POST to `https://api.apify.com/v2/acts/nexgendata~epa-echo-enforcement-scraper/runs?token=YOUR_TOKEN`.

### Python SDK example

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("nexgendata/epa-echo-enforcement-scraper").call(
    run_input={"state": "TX", "program": "CWA", "maxFacilities": 50}
)
flagged = [
    item for item in client.dataset(run["defaultDatasetId"]).iterate_items()
    if item.get("snc_status") == "Y" or (item.get("total_penalties_usd") or 0) > 100_000
]
print(f"{len(flagged)} flagged facilities in Texas CWA")
```

### cURL one-liner

```bash
curl -X POST "https://api.apify.com/v2/acts/nexgendata~epa-echo-enforcement-scraper/runs?token=$APIFY_TOKEN" \
  -H "content-type: application/json" \
  -d '{"state":"TX","program":"CWA","maxFacilities":50}'
```

### Pipe the output anywhere

- **Zapier** — daily watcher → SNC-flag rows → Slack alert
- **Make.com** — Apify trigger → Airtable / Google Sheets
- **n8n** — Apify run → enrichment workflow → MailerLite
- **Snowflake / BigQuery** — schedule daily ingest into your ESG warehouse

### Pricing — pay only for what you get

| Event | Cost |
|---|---|
| Actor start | $0.00005 (one-time per run, scaled by GB-RAM) |
| Each facility | **$0.08** |

A statewide pull (~1,000 facilities) is ~$80. A nationwide CWA SNC list (~10K facilities) is ~$800. Compare to commercial environmental-data subscriptions like Verisk 3E ($25K+/yr), Enhesa ($15K+/yr), or Definitive Healthcare's environmental tier.

**Cost calculator:** `facilities × $0.08 + $0.00005 × memoryGB`. No subscription, no minimum.

### FAQ

**Q. What's the difference between CWA, CAA, and RCRA?**
A. CWA = Clean Water Act (NPDES wastewater permits). CAA = Clean Air Act (Title V air permits). RCRA = Resource Conservation & Recovery Act (hazardous-waste generators / TSDFs). Each program has its own facility universe; some facilities show up in multiple programs.

**Q. What's "SNC"?**
A. Significant Non-Complier (CWA term). For CAA the equivalent is HPV (High Priority Violator). For RCRA it's also SNC. We surface all three under `snc_status` and `qtrs_with_significant_violation`.

**Q. Why is the inspection date sometimes null?**
A. Some facilities have never been formally inspected (e.g. low-priority general-permit covered facilities). The null is fidelity to the source.

**Q. Can I pull historical penalty events / formal enforcement actions?**
A. ECHO's Enforcement Case (FEA) endpoint is a separate dataset. This Actor surfaces the *aggregate* `total_penalties_usd` and `date_last_penalty` per facility. For per-case detail, follow the `echo_facility_url` link.

**Q. Does the data include state-only enforcement?**
A. Yes — ECHO aggregates federal AND state-led enforcement (state programs delegated under EPA primacy authority).

### Related actors from the same author

- **[CMS Open Payments Scraper](https://apify.com/nexgendata/cms-open-payments-scraper)** — pharma-physician payments, $0.008/record. Companion compliance dataset.
- **[FDA Recall Monitor](https://apify.com/nexgendata/fda-recalls-scraper)** — food/drug/device recalls. (Coming soon — register interest in the Apify Console.)
- **[FTC Enforcement Actions Scraper](https://apify.com/nexgendata/ftc-enforcement-actions-scraper)** — antitrust + consumer-protection cases.

### Try the full nexgendata fleet

[Browse 170+ scrapers](https://apify.com/nexgendata?fpr=2ayu9b) — SEC EDGAR, government contracts, ATS jobs, FEC, court records, real estate, MCP servers and more. Get $5 free Apify credit when you sign up via that link.

***

Built and maintained by the [nexgendata](https://apify.com/nexgendata) team. Bug reports & feature requests welcome via Apify Console messaging.

# Actor input Schema

## `state` (type: `string`):

Two-letter US state postal code (e.g. CA, TX, NY, VT). ECHO facilities are state-scoped.

## `program` (type: `string`):

Which environmental program to query: CWA (Clean Water Act), CAA (Clean Air Act), or RCRA (Resource Conservation & Recovery Act / hazardous waste). Each program has its own facility universe.

## `complianceStatus` (type: `string`):

Restrict to facilities matching one of: 'Significant Violation' (SNC flag), 'Non-Compliance' (currently NC), 'Violation' (currently violating). Leave empty for all active facilities.

## `naicsCodes` (type: `array`):

Restrict to facilities tagged with one of these NAICS codes (e.g. \['324110','325'] = petroleum refining + chemicals). Leave empty for all industries.

## `maxFacilities` (type: `integer`):

Maximum number of facilities to return (1–5000). Each facility is one dataset row with full compliance + inspection + penalty fields.

## Actor input object example

```json
{
  "state": "VT",
  "program": "CWA",
  "naicsCodes": [],
  "maxFacilities": 5
}
```

# 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 = {
    "state": "VT",
    "program": "CWA",
    "complianceStatus": "",
    "naicsCodes": [],
    "maxFacilities": 5
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgendata/epa-echo-enforcement-scraper").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 = {
    "state": "VT",
    "program": "CWA",
    "complianceStatus": "",
    "naicsCodes": [],
    "maxFacilities": 5,
}

# Run the Actor and wait for it to finish
run = client.actor("nexgendata/epa-echo-enforcement-scraper").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 '{
  "state": "VT",
  "program": "CWA",
  "complianceStatus": "",
  "naicsCodes": [],
  "maxFacilities": 5
}' |
apify call nexgendata/epa-echo-enforcement-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nexgendata/epa-echo-enforcement-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "EPA ECHO Enforcement Scraper",
        "description": "Scrape EPA ECHO facilities — CWA, CAA, RCRA programs. Identity, address, NAICS, NPDES/AIR/RCRA permits, inspections, SNC status, qtrs in significant violation, total penalties USD, 13-qtr compliance history. ESG screens, plaintiff law firms, M&A diligence, journalism.",
        "version": "0.0",
        "x-build-id": "fuiEgeMKX0sbuGMCH"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/nexgendata~epa-echo-enforcement-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-nexgendata-epa-echo-enforcement-scraper",
                "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/nexgendata~epa-echo-enforcement-scraper/runs": {
            "post": {
                "operationId": "runs-sync-nexgendata-epa-echo-enforcement-scraper",
                "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/nexgendata~epa-echo-enforcement-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-nexgendata-epa-echo-enforcement-scraper",
                "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",
                "required": [
                    "state"
                ],
                "properties": {
                    "state": {
                        "title": "State",
                        "type": "string",
                        "description": "Two-letter US state postal code (e.g. CA, TX, NY, VT). ECHO facilities are state-scoped."
                    },
                    "program": {
                        "title": "EPA program",
                        "enum": [
                            "CWA",
                            "CAA",
                            "RCRA"
                        ],
                        "type": "string",
                        "description": "Which environmental program to query: CWA (Clean Water Act), CAA (Clean Air Act), or RCRA (Resource Conservation & Recovery Act / hazardous waste). Each program has its own facility universe.",
                        "default": "CWA"
                    },
                    "complianceStatus": {
                        "title": "Compliance status filter (optional)",
                        "type": "string",
                        "description": "Restrict to facilities matching one of: 'Significant Violation' (SNC flag), 'Non-Compliance' (currently NC), 'Violation' (currently violating). Leave empty for all active facilities."
                    },
                    "naicsCodes": {
                        "title": "NAICS code filter (optional)",
                        "type": "array",
                        "description": "Restrict to facilities tagged with one of these NAICS codes (e.g. ['324110','325'] = petroleum refining + chemicals). Leave empty for all industries.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxFacilities": {
                        "title": "Max facilities",
                        "minimum": 1,
                        "maximum": 5000,
                        "type": "integer",
                        "description": "Maximum number of facilities to return (1–5000). Each facility is one dataset row with full compliance + inspection + penalty fields.",
                        "default": 50
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
