# Mine Operator & Safety Records — US MSHA (`nexgensignal/mine-operator-safety-records`) Actor

Keyless, pay-per-record MSHA mine register — one row per US mine with operator/controller entities, type, status, commodity, location and safety attributes. Public-domain; no inspector or person data.

- **URL**: https://apify.com/nexgensignal/mine-operator-safety-records.md
- **Developed by:** [NexGen Signal](https://apify.com/nexgensignal) (community)
- **Categories:** Business, News, Other
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $33.50 / 1,000 mine records

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?

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

## Mine Operator & Safety Records — US MSHA

**Keyless. Pay per record. Every US mine, its operator, and its safety profile.**

This actor turns the **US MSHA** (Mine Safety and Health Administration) Open Government Data into clean, per-mine records — the official register of every mine in the United States and the legal entity that operates it. Each run reads MSHA's keyless bulk data file and delivers one row per mine: its identity and location, the controlling and operating companies, the mine type and status, the commodity, and MSHA's own safety-relevant attributes — the Section 103(i) inspection-frequency designation, gas category, methane liberation, and more. Operator/organization grain, structured for engineering use, in the public domain, with **no inspector, contact, or other person-level fields ever emitted.**

### What this is, in one paragraph

MSHA regulates every mine in the country and publishes the master mine file as open data. This actor reads that file, filters to the state, commodity, and status you want, and flattens each mine into a single analysis-ready record: the mine and its coordinates, the **operator and controller legal entities** that run and own it, the mine type (surface, underground, facility) and current status, the primary commodity, the employment and shift profile, and the safety attributes MSHA tracks — most importantly the **103(i) inspection-frequency designation** that flags gassy mines for more frequent inspection, plus methane liberation and gas category. Values are exactly as published by MSHA. You are billed only for records actually delivered.

### Who buys this and for what job

- **Mining suppliers, insurers, and lenders** building an operator/mine reference keyed by MSHA id, enriched with type, status, commodity, and safety attributes for underwriting and territory planning.
- **ESG, supply-chain, and commodity analysts** mapping who operates which mines, where, for what commodity, and with what structural safety profile.
- **Researchers and journalists** studying the mining sector — ownership, activity, and safety designations across states and commodities.
- **Data engineers** who want the MSHA mine register as clean rows without parsing the fixed pipe-delimited open-data file.

### Public-domain data — attributes, not a verdict

Two honesty riders travel on every record. First, **licensing**: MSHA data is collected by the US Department of Labor — a **work of the US federal government**, no copyright, **public domain** under 17 U.S.C. §105 — free to reuse with attribution to MSHA. Second, **fitness**: the safety-related attributes here (the 103(i) inspection-frequency designation, gas category, methane liberation, mine type and status) are **facility characteristics, not a compliance verdict, citation history, or a prediction of any incident.** Operator and controller names are the **regulated legal entities**, not individuals.

### Operator/organization grain — no person data

This actor works at operator/organization grain: one record per mine, keyed to the legal entities that operate and control it. The MSHA mine file contains **no inspector names and no operator contact-person fields**, and this actor emits none; the one free-text field that could conceivably name an individual (driving directions to the mine) is dropped entirely, with a person-key guard on every record as a backstop, and the acceptance suite feeds a record whose directions field names individuals and asserts none of it can ever appear in output.

### Pricing

| Event | Free plan | Bronze | Silver | Gold / Platinum / Diamond |
|-------|-----------|--------|--------|---------------------------|
| `mine_record` | $0.05 | $0.045 | $0.04 | $0.0335 |

Delivered before charged. Blocked runs and empty results cost nothing.

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `state` | string | — | Optional. Keep only mines in this 2-letter state code (e.g. WV, KY, NV). |
| `coalMetal` | string | — | Optional. Coal or Metal/Non-Metal. |
| `status` | string | — | Optional. Keep only mines whose status contains this text (e.g. Active, Abandoned, Intermittent). |
| `maxRecords` | integer | 500 | Ceiling on records delivered and billed. |

### Output

One JSON object per mine. Real example (values as published by MSHA, Oak Grove Mine, Alabama):

```json
{
  "record_id": "0100851",
  "mine_id": "0100851",
  "mine_name": "Oak Grove Mine",
  "coal_or_metal": "Coal",
  "mine_type": "Underground",
  "mine_status": "Active",
  "controller_name": "Alabama Kanu Holdings LLC",
  "operator_name": "Crimson Oak Grove Resources LLC",
  "company_type": "Other",
  "state": "AL",
  "county_name": "Jefferson",
  "msha_district": "M3",
  "primary_commodity": "Coal",
  "inspection_frequency_103i": "Inspect Once Every 5-days",
  "employees": 499,
  "methane_liberation": 5882775,
  "safety_committee": "Y",
  "miners_representative": "N",
  "longitude": -87.141111,
  "latitude": 33.495556,
  "avg_mine_height_ft": 84,
  "source": "US MSHA Open Government Data",
  "licence": "US MSHA ... public domain (17 U.S.C. §105) ...",
  "disclaimer": "Mine and operator records ... NOT a compliance verdict ...",
  "observed_at": "2026-08-21T00:00:00Z"
}
```

An unbilled `RUN_RECEIPT` records the robots check, the filters, mines seen and delivered, whether charged equals delivered, and a note that no inspector/contact-person fields are emitted.

### Field reference

Each record is one mine. Identity: `record_id` / `mine_id`, `mine_name`, `coal_or_metal`, `mine_type`, `mine_status`, and `status_date`. Operator/organization: `controller_id`, `controller_name`, `operator_id`, `operator_name`, `company_type`, and `controller_since`. Location: `state`, `county_name`, `congressional_district`, `msha_district`, `msha_office`, `longitude`, and `latitude`. Industry: `primary_sic`, `secondary_sic`, `primary_commodity`, and `secondary_commodity`. Safety and operations: `inspection_frequency_103i`, `inspection_frequency_date`, `gas_category`, `methane_liberation`, `avg_mine_height_ft`, `portable_operation`, `days_per_week`, `hours_per_shift`, `prod_shifts_per_day`, `maint_shifts_per_day`, `employees`, `part48_training`, `producing_pits`, `nonproducing_pits`, `tailing_ponds`, `pillar_recovery_used`, `highwall_miner_used`, `multiple_pits`, `miners_representative`, and `safety_committee`. Provenance and caveats: `nearest_town`, `source`, `source_url`, `licence`, `attribution`, `disclaimer`, and `observed_at`.

### How a run works

A run first re-reads the source host's robots posture from your runtime — the MSHA Open Government Data host serves no robots file, a no-policy posture — and stops at the door if that ever changes. It then downloads the MSHA Mines bulk file (a pipe-delimited export) and streams it row by row. Each mine is checked against your optional `state`, `coalMetal`, and `status` filters before delivery, so you are billed only for mines that pass them. Each matching mine is flattened to one record — reading only mine, operator, and safety fields and **never** the free-text directions field — and delivered **before** it is charged, so a blocked or empty run costs you nothing. The actor stops at your `maxRecords` ceiling and records `charge_equals_delivered` in the receipt.

### Coverage and scope

The MSHA mine file covers roughly **92,000 mines** — active, intermittent, temporarily idled, abandoned, and sealed — split between Coal and Metal/Non-Metal, across every state. Active operations are a few thousand at any time; the rest are the full historical register. Because each record carries state, county, coordinates, commodity, and status, you can scope by geography, commodity, or activity. Pass a `state` to pull one state's mines, `coalMetal` to focus on coal or on metal/non-metal, or `status` to isolate active operations from the abandoned history. The 103(i) inspection-frequency designation and methane liberation make the gassy, higher-oversight mines easy to surface.

### Cost guidance

One `mine_record` per delivered mine: cost = mines delivered × your plan's per-record price. The full file is ~92,000 mines, so scope with `state`, `coalMetal`, and `status` to keep runs bounded — one state's active coal mines is typically a few dozen. 1,000 mines is **$50** (Free) / **$33.50** (Gold).

### Honest limitations

- **Attributes, not a verdict.** The safety fields are MSHA-tracked mine characteristics — not citations, penalties, injury history, or a compliance judgment. This actor never makes a safety determination.
- **Operators are entities.** Operator and controller names are the regulated legal entities on file with MSHA, not individuals.
- **Mine register, not citation history.** This is the master mine file; violation, inspection, and accident histories are separate MSHA datasets not joined here.
- **As published.** Values are exactly as MSHA distributes them; this actor reformats and decodes codes, it does not recompute.
- **No person data** — no inspector or contact-person fields; the free-text directions field is never emitted.

### Differentiation

This is a **net-new** category for the NexGenData fleet — no existing fleet actor covers US mines or mine operators. Its nearest neighbors are the fleet's other US federal-register products (facilities, rulemaking, grants), but none touch mining. This actor's specific job is the **MSHA mine + operator register with safety attributes**: who operates which mine, where, for what commodity, and with what MSHA-tracked safety profile — an operator/organization dataset, not a person dataset and not a citation-history score.

### The NexGen Signal family

Part of the NexGen Signal family of pay-per-record data products:

- [Airport Facility Records — US FAA NASR](https://apify.com/nexgensignal/airport-facility-records)
- [EPA Facility Compliance Records — Envirofacts](https://apify.com/nexgensignal/epa-facility-compliance-records)
- [Storm Event Records — US NOAA / NCEI](https://apify.com/nexgensignal/storm-event-records)
- [Federal Rulemaking Records — US Federal Register](https://apify.com/nexgensignal/federal-rulemaking-records)
- [Grant Opportunity Records — US Grants.gov](https://apify.com/nexgensignal/grant-opportunity-records)

*Source: US MSHA (Mine Safety and Health Administration) Open Government Data, Mines dataset. MSHA data is a work of the US Department of Labor / US federal government, no copyright, public domain (17 U.S.C. §105); free to reuse with attribution to MSHA. Safety-related fields are facility attributes, not a compliance verdict or citation history; operators/controllers are regulated legal entities, not individuals. Reformatted to mine records; no inspector or contact-person fields are emitted.*

# Actor input Schema

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

Optional. Keep only mines in this 2-letter state code (e.g. WV, KY, PA, NV).

## `coalMetal` (type: `string`):

Optional. Keep only Coal or Metal/Non-Metal mines.

## `status` (type: `string`):

Optional. Keep only mines whose status contains this text (e.g. Active, Abandoned, Intermittent, Temporarily Idled).

## `maxRecords` (type: `integer`):

Maximum records delivered and billed. You are billed only for records delivered.

## Actor input object example

```json
{
  "coalMetal": "",
  "maxRecords": 500
}
```

# Actor output Schema

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

The delivered MSHA mine operator records.

# 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 = {
    "maxRecords": 500
};

// Run the Actor and wait for it to finish
const run = await client.actor("nexgensignal/mine-operator-safety-records").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 = { "maxRecords": 500 }

# Run the Actor and wait for it to finish
run = client.actor("nexgensignal/mine-operator-safety-records").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 '{
  "maxRecords": 500
}' |
apify call nexgensignal/mine-operator-safety-records --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,nexgensignal/mine-operator-safety-records"
        }
    }
}

```

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/WPYtQq0q9oBxjbGgd/builds/hcmIT2zs1utu12fGQ/openapi.json
