# PHMSA Pipeline Enforcement Cases (`defenestrator/phmsa-pipeline-enforcement-cases`) Actor

Monitor official PHMSA pipeline enforcement cases and export structured rows for NOPV, warning letters, notices, orders, penalties, operators, and dates. Unofficial public-record scraper.

- **URL**: https://apify.com/defenestrator/phmsa-pipeline-enforcement-cases.md
- **Developed by:** [Defenestrator](https://apify.com/defenestrator) (community)
- **Categories:** Business, News
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 phmsa enforcement case rows

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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## PHMSA Pipeline Enforcement Cases

Export official PHMSA pipeline-safety enforcement case rows into a structured, source-linked Apify dataset for regulatory monitoring, compliance research, infrastructure risk review, insurance research, and legal/regulatory triage.

This Actor reads PHMSA public enforcement-data page JSON and defaults to Notices of Probable Violation (`NOPV`). It can also include Warning Letters (`WL`), Notices of Amendment (`NOA`), Corrective Action Orders (`CAO`), and Safety Orders (`PSO`).

Unofficial / not affiliated: this Actor is not operated by, endorsed by, or affiliated with PHMSA, the U.S. Department of Transportation, or any government agency.

### Common use cases

| Use case | Why it helps |
|---|---|
| Pipeline-safety monitoring | Track new or open enforcement cases from the public PHMSA source. |
| Compliance triage | Filter by case type, status, year, region, operator, or proposed penalty. |
| Infrastructure risk research | Export normalized rows for repeatable review and downstream analysis. |
| Insurance / legal research | Create source-linked datasets before manual document review. |
| Regulatory watchlists | Run bounded scheduled checks for specific operators or regions. |

### Example input

```json
{
  "maxItems": 25,
  "caseTypes": ["NOPV"],
  "statuses": ["OPEN"],
  "openedYearFrom": 2025,
  "minProposedPenaltyUsd": 1
}
```

### Input fields

| Field | Notes |
|---|---|
| `maxItems` | Maximum rows to save, 1–1000. |
| `caseTypes` | One or more of `NOPV`, `WL`, `NOA`, `CAO`, `PSO`; defaults to `NOPV`. |
| `statuses` | Optional `OPEN` / `CLOSED` filter. |
| `openedFrom`, `openedTo` | Optional `YYYY-MM-DD` opened-date bounds. |
| `openedYearFrom`, `openedYearTo` | Optional opened-year bounds. |
| `region` | Optional case-insensitive PHMSA region filter. |
| `operatorSearch` | Optional case-insensitive filter on operator name or CPF number. |
| `minProposedPenaltyUsd` | Optional minimum proposed civil penalty. |
| `includeRawFields` | Optional sanitized source-field debugging output when enabled. |

### Output

Each dataset row includes:

- PHMSA CPF number / record key
- case type and status
- opened and closed dates
- operator name and operator ID
- PHMSA region
- proposed, assessed, and collected penalty amounts
- final-order / consent-order dates when present
- source URL and collection timestamp

### Source

Official source: https://primis.phmsa.dot.gov/enforcement-data

PHMSA notes that enforcement data is intended to enhance public understanding, is updated as cases are initiated or resolved, and historical totals may change over time. The source search may not retrieve every document associated with every enforcement action. Use this Actor for monitoring and triage, then verify important decisions against official PHMSA records.

### Pricing

from $3.00 / 1,000 PHMSA pipeline enforcement case rows

This Actor uses Apify Pay per Event pricing with platform usage included. The row event is charged only for useful rows written to the default dataset.

| Event | Price | Unit |
|---|---:|---|
| Actor start (`apify-actor-start`) | `$0.00005` | Once when the run starts. |
| PHMSA Enforcement Case Row (`apify-default-dataset-item`) | `$0.003` | Per PHMSA pipeline enforcement case row. |

A row is one PHMSA pipeline enforcement case row. Apify plan discounts, user-configured max-charge limits, and any future Apify pricing UI changes may affect final charges.

### Limitations and responsible use

- This output is not legal, regulatory, investment, safety, or compliance advice.
- Do not rely on the dataset as the sole basis for legal/regulatory decisions, public accusations, unsolicited mass outreach, or automated adverse actions.
- PHMSA records can change as cases progress; verify high-stakes findings against the official source.
- No browser, proxy, login, private API, external paid API, or LLM is used. The Actor performs bounded HTTPS requests to official public PHMSA data and writes normalized rows.

### Related Actors in this portfolio

This Actor is part of the **Public risk and enforcement monitors** group. These are narrow, source-specific Apify Actors intended for scheduled checks and repeatable dataset exports — not broad scraped-content feeds.

- [Texas Data Breach Reports Scraper](https://apify.com/defenestrator/texas-data-breach-reports) — Official Texas data-breach notice rows for cybersecurity/compliance monitoring.
- [OSHA Severe Injury Reports Scraper](https://apify.com/defenestrator/osha-severe-injury-reports) — Official OSHA severe-injury report rows for workplace-safety research.
- [CFPB Enforcement Actions Monitor](https://apify.com/defenestrator/cfpb-enforcement-actions-monitor) — Official CFPB enforcement-action rows for financial regulatory monitoring.
- [PHMSA Pipeline Enforcement Cases](https://apify.com/defenestrator/phmsa-pipeline-enforcement-cases) — Official PHMSA pipeline enforcement case rows for safety/compliance monitoring.

Each listing includes its own source notes, limits, pricing, and responsible-use caveats. Use the official source links in each Actor when decisions require verification.

# Actor input Schema

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

Maximum number of case rows to save.

## `caseTypes` (type: `array`):

PHMSA enforcement case types to include. Supported values: NOPV, WL, NOA, CAO, PSO. Defaults to Notices of Probable Violation (NOPV).

## `statuses` (type: `array`):

Optional PHMSA case statuses to include. Supported values: OPEN, CLOSED.

## `openedFrom` (type: `string`):

Optional inclusive opened-date lower bound in YYYY-MM-DD format.

## `openedTo` (type: `string`):

Optional inclusive opened-date upper bound in YYYY-MM-DD format.

## `openedYearFrom` (type: `integer`):

Optional inclusive opened-year lower bound.

## `openedYearTo` (type: `integer`):

Optional inclusive opened-year upper bound.

## `region` (type: `string`):

Optional case-insensitive region filter, e.g. Eastern, Central, Southwest.

## `operatorSearch` (type: `string`):

Optional case-insensitive filter applied to operator name and CPF number.

## `minProposedPenaltyUsd` (type: `integer`):

Optional minimum proposed civil penalty in USD.

## `includeRawFields` (type: `boolean`):

Include selected raw PHMSA field names for debugging/source reconciliation.

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

HTTP timeout for the PHMSA page-data request.

## Actor input object example

```json
{
  "maxItems": 25,
  "caseTypes": [
    "NOPV"
  ],
  "statuses": [],
  "includeRawFields": false,
  "timeoutSecs": 45
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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("defenestrator/phmsa-pipeline-enforcement-cases").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("defenestrator/phmsa-pipeline-enforcement-cases").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 '{}' |
apify call defenestrator/phmsa-pipeline-enforcement-cases --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=defenestrator/phmsa-pipeline-enforcement-cases",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9RKIRWicAh2EMRWDf/builds/ARQKUR2O48c7yn5Fg/openapi.json
