# Epa Facility Registry Envirofacts Scraper (`real-estate-api/epa-facility-registry-envirofacts-scraper`) Actor

EPA Facility Registry Envirofacts Scraper is a Python tool to extract facility names, FRS registry IDs, geographic coordinates, environmental interest types, and regulatory program cross-references from the EPA Envirofacts API. It exports structured datasets into clean CSV or JSON formats

- **URL**: https://apify.com/real-estate-api/epa-facility-registry-envirofacts-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 Facility Registry (Envirofacts) Scraper — Public TRI Facility Records

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

Collect publicly available EPA Toxics Release Inventory (TRI) facility records from the US Environmental Protection Agency's Envirofacts database. Choose a collection mode, apply state or other filters, set a record limit, and export structured results in JSON, CSV, Excel, or other supported dataset formats.

### Overview

This actor collects facility records from the public Envirofacts TRI facility dataset. Records can include facility names, identification numbers, physical and mailing addresses, parent company information, geographic coordinates, and other facility details.

You can retrieve TRI facilities by state or use a custom table and column-value filters to narrow your results.

### Features

- Collect publicly available EPA TRI facility records.
- Filter facilities by state, city, or other supported fields.
- Select an Envirofacts table for collection.
- Apply multiple column-value filters.
- Set a maximum number of records to collect.
- Retrieve facility identity and address information.
- Collect parent company details when available.
- Retrieve preferred geographic coordinates and location accuracy information.
- Export structured results in multiple formats.
- Store collected records in an Apify dataset.

### Use Cases

- Build lists of TRI facilities by state or city.
- Research industrial and manufacturing facilities.
- Identify facility locations and parent companies.
- Support environmental compliance research.
- Analyze publicly available facility information.
- Prepare facility datasets for geographic and market analysis.
- Organize environmental research records in spreadsheets.

### Input Parameters

| Parameter | Type | Description |
|---|---|---|
| `mode` | String | Collection mode: `tri_facility` or `any_table`. |
| `table` | String | Envirofacts table to collect records from. |
| `filters` | Object | Column-value pairs used to narrow results. |
| `maxItems` | Integer | Maximum number of records to collect. Default: 100; maximum: 1,000. |
| `requestDelayMs` | Integer | Delay between collection requests in milliseconds. |

### Example Input

**Collect TRI facilities by state**

```json
{
  "mode": "tri_facility",
  "table": "tri_facility",
  "filters": {
    "state_abbr": "RI"
  },
  "maxItems": 50,
  "requestDelayMs": 500
}
```

**Collect records using a city filter**

```json
{
  "mode": "any_table",
  "table": "tri_facility",
  "filters": {
    "city_name": "PROVIDENCE"
  },
  "maxItems": 25,
  "requestDelayMs": 500
}
```

### Collection Modes

- **TRI Facilities by State:** Collects facility records from the `tri_facility` table using filters such as `state_abbr=RI`.
- **Any Table:** Collects records from your selected table using column-value filters, allowing you to explore other supported Envirofacts datasets.

### Extracted Data

Each collected facility record can include the following fields:

| Field | Description |
|---|---|
| `tri_facility_id` | Unique TRI facility identifier. |
| `facility_name` | Facility name. |
| `street_address` | Physical street address. |
| `city_name` | Facility city. |
| `county_name` | Facility county. |
| `state_county_fips_code` | State and county FIPS code. |
| `state_abbr` | State abbreviation. |
| `zip_code` | Facility ZIP code. |
| `region` | EPA region number. |
| `fac_closed_ind` | Facility closure indicator. |
| `mail_name` | Mailing recipient or organization name. |
| `mail_street_address` | Mailing street address. |
| `mail_city` | Mailing city. |
| `mail_state_abbr` | Mailing state abbreviation. |
| `mail_province` | Mailing province, when available. |
| `mail_country` | Mailing country, when available. |
| `mail_zip_code` | Mailing ZIP code. |
| `asgn_federal_ind` | Federal assignment indicator. |
| `parent_co_db_num` | Parent company identification number. |
| `parent_co_name` | Parent company name. |
| `fac_latitude` | Facility latitude value. |
| `fac_longitude` | Facility longitude value. |
| `pref_latitude` | Preferred geographic latitude. |
| `pref_longitude` | Preferred geographic longitude. |
| `pref_accuracy` | Preferred coordinate accuracy value. |
| `pref_collect_meth` | Preferred coordinate collection method. |
| `pref_desc_category` | Preferred coordinate description category. |
| `pref_horizontal_datum` | Preferred horizontal datum. |
| `epa_registry_id` | EPA facility registry identifier. |
| `scraped_at` | Timestamp when the record was collected. |

### Example Output

```json
{
  "tri_facility_id": "02804MPRLW50CHA",
  "facility_name": "IMPERIAL WALLCOVERINGS INC",
  "street_address": "50 CHASE HILL RD",
  "city_name": "ASHAWAY",
  "county_name": "WASHINGTON",
  "state_county_fips_code": "44009",
  "state_abbr": "RI",
  "zip_code": "02804",
  "region": "1",
  "fac_closed_ind": "0",
  "mail_name": "IMPERIAL WALLCOVERINGS INC.",
  "mail_street_address": "P.O. BOX 609",
  "mail_city": "ASHAWAY",
  "mail_state_abbr": "RI",
  "mail_province": null,
  "mail_country": null,
  "mail_zip_code": "02804",
  "asgn_federal_ind": "C",
  "parent_co_db_num": "198492514",
  "parent_co_name": "COLLINS & AIKMAN CORP",
  "fac_latitude": 412210,
  "fac_longitude": 774510,
  "pref_latitude": 41.4257,
  "pref_longitude": 71.7817,
  "pref_accuracy": 11000,
  "pref_collect_meth": "Z1",
  "pref_desc_category": "UN",
  "pref_horizontal_datum": "1",
  "epa_registry_id": "110009439508",
  "scraped_at": "2026-10-26T00:00:00+00:00"
}
```

### Working with the Dataset

All collected records are stored in the Apify dataset. You can:

- Export results as JSON, CSV, Excel, and other supported formats.
- Review individual facility records.
- Filter facilities by state, city, or other collected attributes.
- Analyze parent company and location information.
- Use geographic coordinates for mapping and spatial analysis.
- Integrate collected records into your own research and data processing workflows.

### FAQ

**Who can use this actor?**

Environmental researchers, compliance analysts, consultants, and developers who need structured EPA TRI facility information.

**What is the TRI facility dataset?**

It contains facility records associated with the Toxics Release Inventory program, including facility identification and location information.

**Can I filter facilities by state?**

Yes. Use `tri_facility` mode and provide a state abbreviation in the `filters` object, such as `state_abbr: "RI"`.

**Can I search by city?**

Yes. Use `any_table` mode with the `tri_facility` table and a filter such as `city_name: "PROVIDENCE"`.

**Can I collect records from other tables?**

Yes. Use `any_table` mode and specify a supported table name and the column-value filters you want to apply.

**Can I limit the number of records?**

Yes. Set `maxItems` to control the maximum number of records collected. The default is 100, and the maximum is 1,000.

**Can I run the actor automatically?**

Yes. Apify schedules can be used to run the actor periodically.

**How current is the collected information?**

The actor collects information available in the public Envirofacts dataset when it runs. The freshness of individual records depends on the underlying dataset.

### Disclaimer

This is an independent data collection tool and is not affiliated with, endorsed by, sponsored by, or officially associated with the US Environmental Protection Agency. The collected information comes from publicly available records. Dataset information may change or contain outdated entries. Verify important environmental and facility details with the appropriate official resources before relying on them. Users are responsible for ensuring their use of collected information complies with applicable laws and requirements.

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

## `mode` (type: `string`):

What to collect.

## `table` (type: `string`):

Envirofacts table name used in the URL path.

## `filters` (type: `object`):

Column/value pairs placed in the Envirofacts URL path.

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

Stop after this many successful 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
{
  "mode": "tri_facility",
  "table": "tri_facility",
  "filters": {
    "state_abbr": "RI"
  },
  "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 = {
    "table": "tri_facility",
    "filters": {
        "state_abbr": "RI"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("real-estate-api/epa-facility-registry-envirofacts-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 = {
    "table": "tri_facility",
    "filters": { "state_abbr": "RI" },
}

# Run the Actor and wait for it to finish
run = client.actor("real-estate-api/epa-facility-registry-envirofacts-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 '{
  "table": "tri_facility",
  "filters": {
    "state_abbr": "RI"
  }
}' |
apify call real-estate-api/epa-facility-registry-envirofacts-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-facility-registry-envirofacts-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/kRxVzbipWy85v7BnH/builds/C4IGilAiJQGdi6Ome/openapi.json
