# Epa Echo Facility Compliance Scraper (`real-estate-api/epa-echo-facility-compliance-scraper`) Actor

EPA ECHO Facility Compliance Scraper is a Python tool to extract facility compliance status, inspection histories, formal enforcement actions, and penalty data from the EPA ECHO REST APIs. It exports structured environmental compliance datasets into clean CSV or JSON formats

- **URL**: https://apify.com/real-estate-api/epa-echo-facility-compliance-scraper.md
- **Developed by:** [real-estate-api](https://apify.com/real-estate-api) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

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

### EPA ECHO Facility Compliance Scraper — Search Public Environmental Compliance Records

![EPA ECHO Facility Compliance Scraper cover](https://images.bigibyte.com/cdn-cgi/image/width=1260,height=540,fit=cover,format=webp/apify-actors-covers/epa-echo-facility-compliance-scraper-cover.png)

Collect publicly available facility compliance records from the US Environmental Protection Agency's Enforcement and Compliance History Online (ECHO) system. Search by state, city, or NAICS code, limit the number of results, and export facility records in JSON, CSV, Excel, and other supported dataset formats.

### Overview

The EPA ECHO Facility Compliance Scraper retrieves facility search results from public EPA ECHO data.

Each dataset item represents a facility and includes its name, location, Registry ID, and related search information. Duplicate records are removed using the facility's Registry ID.

You can narrow searches by state, optionally specify a city or NAICS code, and control the maximum number of records collected.

### Features

- **State-based search:** Retrieve facilities using a two-letter US state code.
- **City filtering:** Narrow results to a specific city.
- **NAICS filtering:** Search for facilities associated with particular industry codes.
- **Custom result limits:** Set the maximum number of facility records to collect.
- **Duplicate removal:** Avoid duplicate facility records using Registry IDs.
- **Structured output:** Collect facility details in a consistent dataset.
- **Multiple export formats:** Download results as JSON, CSV, Excel, and other supported formats.
- **Scheduled collection:** Configure recurring runs to refresh facility datasets.

### Use Cases

- **Environmental compliance research:** Collect facility records for a selected state or city.
- **NAICS-based screening:** Identify facilities associated with specific industries.
- **Environmental due diligence:** Build facility lists for research and preliminary screening.
- **Business research:** Organize facility names and addresses for further analysis.
- **Geographic analysis:** Export facility locations for mapping and regional research.
- **Dataset management:** Maintain organized facility records for reporting and analysis.

### Input Parameters

| Field | Type | Default | Description |
|---|---|---|---|
| `state` | string | `RI` | Two-letter US state code used to filter facilities. |
| `city` | string | Empty | Optional city name for narrowing the search. |
| `naics` | string | Empty | Optional NAICS code or codes for filtering facilities. |
| `qcolumns` | string | `1,2,3,4,5` | Comma-separated column identifiers used for the facility search results. |
| `maxItems` | integer | `100` | Maximum number of facility records to collect. Hard maximum: 1,000. |

### Example Input

```json
{
  "state": "RI",
  "city": "Providence",
  "maxItems": 50,
  "qcolumns": "1,2,3,4,5"
}
```

### Extracted Data

Each dataset item represents an EPA ECHO facility record.

| Field | Description |
|---|---|
| `FacName` | Facility name. |
| `FacStreet` | Facility street address. |
| `FacCity` | Facility city. |
| `FacState` | Facility state abbreviation. |
| `FacZip` | Facility ZIP code. |
| `RegistryID` | EPA facility Registry ID. |
| `QueryID` | Identifier associated with the facility search. |
| `PageNo` | Page number associated with the returned record. |
| `scraped_at` | Timestamp indicating when the record was collected. |

### Example Output

```json
{
  "FacName": "(EMPTY LOT)",
  "FacStreet": "286-288 BROAD ST",
  "FacCity": "PAWTUCKET",
  "FacState": "RI",
  "FacZip": "02863",
  "RegistryID": "110070041111",
  "QueryID": "848",
  "PageNo": "1",
  "scraped_at": "2026-10-26T00:00:00+00:00"
}
```

### Working with Dataset

After the Actor finishes running, open its dataset to review the collected facility records.

You can export the dataset in several formats:

- **JSON:** For applications and data processing workflows.
- **CSV:** For spreadsheets, filtering, and reporting.
- **Excel:** For reviewing and organizing facility information.
- **Other supported formats:** For additional data analysis workflows.

### FAQ

**Who can use this scraper?**

Environmental researchers, compliance analysts, consultants, and developers who need structured EPA ECHO facility records.

**Can I search by city and state together?**

Yes. Provide a state code and optionally specify a city to narrow the results.

**Can I filter facilities by industry?**

Yes. You can provide NAICS code(s) to narrow the facility search.

**How many records can I collect?**

You can collect up to 1,000 facility records per run.

**Can I schedule recurring runs?**

Yes. You can configure Apify schedules to repeat searches using your preferred state, city, or NAICS filters.

**How current are the records?**

Records are collected from ECHO responses when the Actor runs. Their accuracy and freshness depend on the information currently published by the EPA.

**Does the scraper remove duplicate facilities?**

Yes. Duplicate records are identified using the facility's Registry ID.

### Disclaimer

This Actor is an independent tool and is not affiliated with, endorsed by, sponsored by, or otherwise officially associated with the US Environmental Protection Agency. All data is collected from publicly available sources. Users are responsible for ensuring that their use of collected information complies with applicable laws and relevant website terms.

### Is Web Scraping Legal?

Collecting information that is already public is generally legal. There is no single law that bans all forms of web scraping. The limits are the usual ones: do not break into accounts, do not take private or confidential data, and be careful with personal data and copyrighted works. A site's terms can also restrict how you access it. Facts such as a public name, price, or rating are not the same thing as republishing someone's article or photo.

This actor collects information from public pages. It does not log in and it does not bypass access controls.

For a longer explanation, see Apify's article [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/).

# Actor input Schema

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

Two-letter state code for p_st (e.g. RI).

## `city` (type: `string`):

Optional facility city filter (p_ct).

## `naics` (type: `string`):

Optional NAICS code(s) for p_ncs. Comma-separated 2, 4, or 6-digit codes.

## `qcolumns` (type: `string`):

Comma-separated ECHO column IDs for facility output.

## `maxItems` (type: `integer`):

Stop after this many successful facility rows. Hard max is 1000.

## `requestDelayMs` (type: `integer`):

Polite pacing in milliseconds.

## `userAgent` (type: `string`):

User-Agent header sent with each request.

## `timeoutSecs` (type: `integer`):

Overall run budget in seconds.

## `requestTimeoutSecs` (type: `integer`):

Per-request timeout in seconds.

## `proxyConfiguration` (type: `object`):

Optional proxy. Leave off unless you need it.

## Actor input object example

```json
{
  "state": "RI",
  "city": "Providence",
  "qcolumns": "1,2,3,4,5",
  "maxItems": 100,
  "requestDelayMs": 500,
  "userAgent": "ActorResearch/1.0",
  "timeoutSecs": 300,
  "requestTimeoutSecs": 30,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

Dataset rows in the overview table.

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

Full dataset for this run.

## `items` (type: `string`):

Dataset items as JSON.

# 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": "RI",
    "city": "Providence"
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/epa-echo-facility-compliance-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": "RI",
    "city": "Providence",
}

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/epa-echo-facility-compliance-scraper").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 '{
  "state": "RI",
  "city": "Providence"
}' |
apify call real-estate-api/epa-echo-facility-compliance-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,real-estate-api/epa-echo-facility-compliance-scraper"
        }
    }
}
```

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/IiDjXL4PadmD4bK0n/builds/Xa4uza5tJIzpYdSbW/openapi.json
