# US EPA Industrial Violations & ESG Compliance Leads Scraper (`grimbles/us-epa-compliance-violations-leads`) Actor

Extract regulated US industrial facilities, compliance violations, quarters in non-compliance, formal enforcement actions, and total EPA penalties ($) from the official US EPA ECHO REST API. Filter by state, NAICS/industry keyword, active violations, or minimum penalties with ESG risk scoring.

- **URL**: https://apify.com/grimbles/us-epa-compliance-violations-leads.md
- **Developed by:** [Grimbles Data Labs](https://apify.com/grimbles) (community)
- **Categories:** Lead generation, Automation, AI
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.35 / 1,000 us epa facility compliance record extracteds

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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## US EPA Industrial Violations & ESG Compliance Leads Scraper

**Extract regulated US industrial facilities, Clean Air Act / Clean Water Act / RCRA violations, quarters in non-compliance, formal enforcement actions, and total assessed EPA penalties ($) directly from the official US Environmental Protection Agency (EPA) ECHO REST API.**

Built for **EHS & ESG software vendors, environmental engineering consultants, industrial filtration & emissions-control suppliers, environmental law firms, commercial insurance underwriters, and ESG AI agents (MCP / n8n)** — with zero API keys and zero scraping overhead.

***

### Key Features

- **100% Official US EPA ECHO REST API**: Queries `echodata.epa.gov/echo/echo_rest_services` (`metadata`, `get_facilities`, and `get_qid`).
- **Violation & Penalty Filtering**: Isolate industrial plants with active non-compliance (`onlyWithViolations: true`), filter by NAICS industry sector (`325` Chemical, `324` Petroleum, `331` Metals), US states, or minimum monetary penalties (`minPenaltiesUsd`).
- **ESG Compliance Risk Score (`0–100`)**: Automatically prioritizes facilities by quarters in non-compliance, formal enforcement actions, and assessed dollar penalties.

***

### Sample Output JSON

```json
{
  "registryId": "110000300152",
  "facilityName": "GULF COAST CHEMICAL PLANT",
  "street": "2400 INDUSTRIAL PKWY",
  "city": "PASADENA",
  "state": "TX",
  "postalCode": "77507",
  "county": "HARRIS",
  "latitude": 29.6214,
  "longitude": -95.0721,
  "naicsCodes": "325199",
  "sicCodes": "2869",
  "complianceStatus": "Significant/Category I Violation",
  "quartersInViolation": 6,
  "formalEnforcementActions": 2,
  "totalPenaltiesUsd": 145000.0,
  "inspectionCount": 4,
  "esgComplianceRiskScore": 100,
  "dfrUrl": "https://echo.epa.gov/detailed-facility-report?fid=110000300152"
}
```

***

### AI Agent (MCP) & n8n Automation Integration

#### Apify MCP Server (Claude Desktop / Cursor / Windsurf)

```json
{
  "mcpServers": {
    "us-epa-compliance-violations-leads": {
      "url": "https://mcp.apify.com/?tools=grimbles/us-epa-compliance-violations-leads",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

#### n8n / Make HTTP Run-Sync Integration

```json
{
  "method": "POST",
  "url": "https://api.apify.com/v2/acts/grimbles~us-epa-compliance-violations-leads/run-sync-get-dataset-items",
  "headers": {
    "Authorization": "Bearer <YOUR_APIFY_API_TOKEN>",
    "Content-Type": "application/json"
  },
  "body": {
    "states": ["TX", "LA"],
    "naicsCode": "325",
    "onlyWithViolations": true,
    "minPenaltiesUsd": 10000,
    "maxResults": 50
  }
}
```

# Actor input Schema

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

List of 2-letter US state abbreviations to inspect (e.g. \['TX', 'OH']). Defaults to \['TX'].

## `facilityName` (type: `string`):

Optional partial facility or operator name filter.

## `naicsCode` (type: `string`):

Optional 2 to 6 digit NAICS code filter (e.g. '325' for Chemical Manufacturing, '324' for Petroleum).

## `onlyWithViolations` (type: `boolean`):

When enabled, returns facilities with 1+ quarters in non-compliance (p_qiv=1).

## `minPenaltiesUsd` (type: `number`):

Optional minimum assessed EPA monetary penalties in USD (0 = no penalty filter).

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

Maximum number of EPA facility compliance records to extract.

## Actor input object example

```json
{
  "states": [
    "TX"
  ],
  "facilityName": "",
  "naicsCode": "",
  "onlyWithViolations": true,
  "minPenaltiesUsd": 0,
  "maxResults": 25
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset containing extracted US EPA ECHO industrial facility compliance records and ESG risk scores.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("grimbles/us-epa-compliance-violations-leads").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("grimbles/us-epa-compliance-violations-leads").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call grimbles/us-epa-compliance-violations-leads --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,grimbles/us-epa-compliance-violations-leads"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qClSYmrOQ4lIDhPps/builds/bolE8doRb1rVEsdyR/openapi.json
