# MSHA Mine, Quarry & Aggregates Operator Leads (`scrapesage/msha-mine-operations-scraper`) Actor

Scrape US mine, quarry & aggregates operators from official MSHA data: operator & parent controller, commodity, employees, full address, geo, production & violation/penalty intel. Filter by state, commodity, status & size. B2B leads + monitoring, no browser.

- **URL**: https://apify.com/scrapesage/msha-mine-operations-scraper.md
- **Developed by:** [Scrape Sage](https://apify.com/scrapesage) (community)
- **Categories:** Lead generation, Agents, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.75 / 1,000 mine / operator leads

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

## MSHA Mine, Quarry & Aggregates Operator Leads

Turn the official **MSHA (Mine Safety and Health Administration) Open Government Data** into a clean, ready-to-use **B2B lead list of every mine, quarry, sand & gravel pit, and processing plant in the United States** — with the **operator and its parent controlling company**, the **commodity** they produce, **employee count**, **full mailing address + geo**, latest-year **production & employment**, and optional **violation / penalty compliance intel**.

Every operating mine is a capital-intensive business that buys **heavy equipment, crushing & conveying gear, safety/PPE, explosives & blasting services, dust & water control, environmental & permitting consulting, MRO parts, insurance, and software**. This actor hands you the whole market, segmented and lead-scored.

No login, no API key, no browser — fast, direct download of the official government files.

### Why this MSHA scraper?

Other "mine safety" scrapers stop at citation records. This actor ships the **richest operator lead in the category** by joining MSHA's mine master, address-of-record, annual production, and violation datasets into one record:

| Data | Typical scrapers | This actor |
|---|---|---|
| Operator legal name | ✅ | ✅ |
| **Parent controlling company** (corporate owner) | ❌ | ✅ |
| Commodity + SIC (coal / sand & gravel / stone / metal / nonmetal) | partial | ✅ |
| Mine type & operational status (Active / New / Idled…) | partial | ✅ |
| **Employee count** (deal-size signal) | ❌ | ✅ |
| Full mailing address + ZIP + contact title | ❌ | ✅ |
| Latitude / longitude | partial | ✅ |
| **Latest-year production & employment** | ❌ | ✅ opt-in |
| **Violations, S\&S counts, total penalties, last citation** | safety only | ✅ opt-in |
| Lead score (0–100) + lead signals | ❌ | ✅ |
| New-operation & status-change monitoring | ❌ | ✅ |

### Use cases

- **Lead generation** — sell to mines, quarries and aggregate producers: heavy equipment & dealers, crushing/screening/conveying, safety & PPE, blasting & drilling, dust suppression, environmental & permitting consulting, MRO, insurance, ERP/fleet software. Score by `status`, `employees`, `commodityGroup` and contact them at the address on file.
- **Construction-materials sourcing** — find every **sand & gravel** and **crushed stone** producer in a state or county for ready-mix, asphalt, and aggregate supply.
- **Corporate mapping** — use `controllerNameQuery` to pull **every site a parent company controls** nationwide.
- **Compliance & safety intelligence** — turn on violations to rank operators by citation volume, **significant-and-substantial (S\&S)** counts and **total proposed penalties** — high-intent prospects for safety, training, PPE and insurance.
- **New-operation alerts** — monitor for **New Mine** registrations: brand-new operations that are buying everything right now.
- **Market & territory analysis** — count and map operators by commodity, size, and geography.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **MSHA Mine, Quarry & Aggregates Operator Leads** actor, choose your states, commodity groups, status and size filters, and click **Start**.
3. Watch results stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "states": ["WV", "PA"],
    "commodityGroups": ["coal", "stone"],
    "mineStatuses": ["Active"],
    "minEmployees": 20,
    "includeProduction": true,
    "includeViolations": false,
    "maxResults": 1000,
    "sortBy": "leadScore"
}
```

- **states** — two-letter USPS codes; empty = all states & territories.
- **commodityGroups** — `coal`, `sandGravel`, `stone`, `nonmetal`, `metal`. Sand & gravel + stone are the construction-aggregates producers.
- **coalOrMetal** — quick `coal` / `metalNonmetal` toggle.
- **counties** — filter by county name.
- **mineStatuses** *(default `["Active"]`)* — `Active`, `New Mine`, `Intermittent`, `NonProducing`, `Temporarily Idled`, `Abandoned`, `Abandoned and Sealed`.
- **mineTypes** — `Surface`, `Underground`, `Facility` (mill / plant).
- **newMinesOnly** — only brand-new (`New Mine`) operations — the highest-intent leads.
- **companyTypes** — `Corporation`, `Limited Liability Corporation`, `Partnership`, `Sole Proprietor`, `Other`.
- **minEmployees / maxEmployees** — size filter (deal-size proxy).
- **operatorNameQuery / controllerNameQuery** — match the operator/mine name or the parent controlling company.
- **includeProduction** *(default true)* — add latest-year average employment, coal tonnage and hours worked.
- **includeViolations** *(default false)* — add citation counts, S\&S counts, total penalties, amounts due and the last violation date. Records are charged at the compliance rate when this is on.
- **violationsLookbackYears** *(default 5)* — window for the "recent violations" tally.
- **maxResults / sortBy** — `leadScore`, `employeesHigh`, `recentStatus`, `productionHigh`, `penaltiesHigh`.
- **monitorMode / monitorKey** — emit only new / changed operations since the last run.

### Output

One record per mine / operation (`recordType: "mine"`):

```json
{
    "recordType": "mine",
    "mineId": "0100003",
    "mineName": "O'Neal Quarry & Mill",
    "businessName": "Lhoist North America of Alabama, LLC",
    "mshaUrl": "https://www.msha.gov/mine-data-retrieval-system?MineId=0100003",
    "operatorName": "Lhoist North America of Alabama, LLC",
    "operatorId": "L13586",
    "controllerName": "Lhoist Group",
    "controllerId": "0041044",
    "hasParentCompany": true,
    "controllerSince": "1989-07-01",
    "companyType": "Other",
    "coalOrMetal": "Metal/Nonmetal",
    "mineType": "Surface",
    "commodity": "Lime",
    "commoditySicCode": "1422",
    "commodityGroup": "Stone",
    "secondaryCommodity": "Crushed, Broken Limestone NEC",
    "isPortable": false,
    "status": "Active",
    "statusDate": "1979-01-22",
    "isActive": true,
    "isNewMine": false,
    "employees": 108,
    "contactTitle": "Operations Manager",
    "street": "2885 Hwy 31 South",
    "city": "Calera",
    "county": "Shelby",
    "state": "AL",
    "zip": "35040",
    "latitude": 33.17,
    "longitude": -86.758889,
    "congressionalDistrict": "AL-06",
    "fieldOffice": "Birmingham AL Field Office (A)",
    "latestProductionYear": 2024,
    "avgEmployeesReported": 112,
    "leadScore": 88,
    "leadSignals": ["activeOperation", "largeEmployer", "corporateParent", "recentlyProducing"],
    "scrapedAt": "2026-06-20T12:00:00.000Z"
}
```

With **includeViolations** on, each record also carries `violationCount`, `recentViolationCount`, `significantSubstantialCount`, `totalProposedPenaltyUsd`, `totalAmountDueUsd`, `lastViolationDate`.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it weekly/monthly to capture newly-registered operations; pair with **monitoring mode** for a clean new-leads feed.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (CRM import, Slack alert, email sequence) the moment a run finishes.

```js
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/msha-mine-operations-scraper').call({
    states: ['TX'],
    commodityGroups: ['sandGravel', 'stone'],
    mineStatuses: ['Active'],
    minEmployees: 10,
    maxResults: 1000,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} mine / operator leads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new operator leads straight into your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored search finds new operations.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. You can call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "list active stone quarries in Texas with 20+ employees" and let it run this scraper for you.

### Agent-ready: autonomous payments (x402 & Skyfire)

This actor is **agent-ready** — AI agents can discover it, run it, and **pay for it autonomously**, with no Apify account and no human in the loop. It uses [pay-per-event](https://docs.apify.com/platform/actors/publishing/monetize/pay-per-event) pricing and [limited permissions](https://docs.apify.com/platform/actors/development/permissions), so it qualifies for Apify's agentic-payment standards:

- **[x402](https://docs.apify.com/platform/integrations/x402)** — an open, HTTP-native payment protocol. Agents pay per run in USDC on the Base network directly through the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp) — no account, no API key.
- **[Skyfire](https://docs.apify.com/platform/integrations/skyfire)** — agent-to-service payments for fully autonomous AI-agent workflows.

Building an AI agent, MCP tool, or autonomous data pipeline? This scraper is ready to plug in and pay as it goes.

### More scrapers from scrapesage

Build a complete **US B2B / government-data lead stack**:

- **[SBA Loan Leads Scraper](https://apify.com/scrapesage/sba-loan-leads-scraper)** — 7(a) & 504 financed small businesses.
- **[PPP Loan Data Scraper](https://apify.com/scrapesage/ppp-loan-data-scraper)** — 11M+ PPP borrowers with owner demographics.
- **[Form 5500 ERISA Scraper](https://apify.com/scrapesage/form-5500-erisa-scraper)** — 401(k) & benefit-plan sponsors.
- **[EPA ECHO Scraper](https://apify.com/scrapesage/epa-echo-scraper)** — regulated facilities, violations & penalties.
- **[FMCSA Trucking Scraper](https://apify.com/scrapesage/fmcsa-trucking-scraper)** — motor carriers & new-authority leads.
- **[FAA Aircraft Registry Scraper](https://apify.com/scrapesage/faa-aircraft-registry-scraper)** — aircraft owners & operators.
- **[US Business Formation Scraper](https://apify.com/scrapesage/us-business-formation-scraper)** — newly registered companies.
- **[US Contractor License Scraper](https://apify.com/scrapesage/us-contractor-license-scraper)** — licensed contractors with bond & insurance.
- **[USASpending Scraper](https://apify.com/scrapesage/usaspending-scraper)** — federal contract & grant recipients.

### Tips

- **Construction aggregates**: filter `commodityGroups` to `sandGravel` + `stone` and `mineStatuses` to `Active` to get every operating aggregate producer in a state.
- **Biggest operators first**: sort by `employeesHigh`, or set `minEmployees` to focus on larger sites.
- **Cost control**: leave **includeViolations** off unless you need compliance intel — the base lead already carries operator, parent, commodity, size, address and production.
- **Fresh leads**: combine [Schedules](https://docs.apify.com/platform/schedules) with **monitoring mode** to receive only new or status-changed operations.

### FAQ

**Where does the data come from?** The official [MSHA Open Government Data sets](https://www.msha.gov/data-and-reports/mine-data-retrieval-system) — the same data behind MSHA's Mine Data Retrieval System. No API key or login required.

**Does it include phone numbers or emails?** MSHA publishes the operation's mailing address and contact title, but not operator phone or email. You get the company, parent, full address, size, commodity and geo — append contact details with your own tools if needed.

**How fresh is it?** MSHA refreshes these datasets regularly. Run on a [Schedule](https://docs.apify.com/platform/schedules) with monitoring mode to capture changes as they appear.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**A field is null — why?** Some operations genuinely don't report every field (e.g. new mines before their first filing, or operations without geo). Fields are `null` only when the source data doesn't have a value.

**Is this legal?** This actor collects publicly available US government data. You are responsible for using the data in compliance with applicable laws and MSHA's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Filter by the state the mine is located in — two-letter USPS codes, e.g. <code>TX</code>, <code>WV</code>, <code>PA</code>, <code>CA</code>, <code>KY</code>. Leave empty for all states & territories.

## `commodityGroups` (type: `array`):

Filter by what the operation mines. <b>Sand & Gravel</b> and <b>Stone</b> are the construction-aggregates producers (the largest, most accessible B2B segment); <b>Coal</b>, <b>Metal</b> and <b>Nonmetal</b> cover everything else. Leave empty for all.

## `coalOrMetal` (type: `string`):

Quick high-level filter. Use the more specific <b>Commodity groups</b> above when you need it.

## `counties` (type: `array`):

Filter by county name (case-insensitive), e.g. <code>Harris</code>, <code>Clearfield</code>, <code>Elko</code>.

## `mineStatuses` (type: `array`):

Operational status. Defaults to <b>Active</b> — operating businesses that make the best leads. Add <b>New Mine</b> for brand-new, high-intent operations, or others to widen the net.

## `mineTypes` (type: `array`):

Filter by mine type. <b>Facility</b> = a mill / preparation plant (no extraction).

## `newMinesOnly` (type: `boolean`):

Only return operations with status <b>New Mine</b> — brand-new mining operations just registering with MSHA. The highest-intent leads (they're buying equipment, services, insurance and PPE right now).

## `companyTypes` (type: `array`):

Filter by the operator's legal entity type.

## `minEmployees` (type: `integer`):

Only operations reporting at least this many employees (a proxy for deal size). Leave blank for any.

## `maxEmployees` (type: `integer`):

Only operations reporting at most this many employees.

## `operatorNameQuery` (type: `string`):

Only return operations whose operator name or mine name contains this text (case-insensitive).

## `controllerNameQuery` (type: `string`):

Only return operations whose parent / controlling company name contains this text — great for mapping every site owned by a target company.

## `includeProduction` (type: `boolean`):

Enrich each record with the latest reported year's average employment, coal tonnage (coal mines) and hours worked from MSHA's annual employment/production data. Cheap and recommended — gives a fresh activity & size signal.

## `includeViolations` (type: `boolean`):

Enrich each emitted record with MSHA citation counts, significant-and-substantial (S\&S) counts, total proposed penalties, amounts due and the last violation date. High-intent signal for safety, PPE, compliance, consulting and insurance vendors. Downloads MSHA's full national citation history (large), so these runs take longer — for the fastest results give the run 4096 MB or more memory (1+ vCPU). Records are charged at the compliance rate when this is on.

## `violationsLookbackYears` (type: `integer`):

How many recent years count toward the 'recent violations' tally (the full all-time totals are always included).

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

Maximum number of mine/operator records to return in this run.

## `sortBy` (type: `string`):

Ordering of the returned records.

## `deduplicateResults` (type: `boolean`):

Skip duplicate mine IDs within this run (recommended).

## `monitorMode` (type: `boolean`):

Remember which operations were already returned (in a named key-value store) and emit ONLY mines that are new or whose status changed since the last run — each tagged <code>monitorEvent: "new"</code> or <code>"status\_change"</code>. MSHA refreshes this data regularly; run on a Schedule to capture newly-registered operations as fresh leads. Works alongside Apify Schedules (the schedule starts the run; monitoring decides what's new).

## `monitorKey` (type: `string`):

Names the memory used by monitoring mode. Use a distinct key per saved watch (e.g. per state/commodity) so different monitors don't share state.

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

Optional proxy. MSHA open data is downloaded directly and needs no proxy — leave this off for the fastest downloads. Enable Apify Proxy only if your network requires it.

## Actor input object example

```json
{
  "states": [
    "WV"
  ],
  "coalOrMetal": "any",
  "mineStatuses": [
    "Active"
  ],
  "newMinesOnly": false,
  "includeProduction": true,
  "includeViolations": false,
  "violationsLookbackYears": 5,
  "maxResults": 1000,
  "sortBy": "leadScore",
  "deduplicateResults": true,
  "monitorMode": false,
  "monitorKey": "default",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

All scraped MSHA mine / operator records as JSON items in the default dataset.

# 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 = {
    "states": [
        "WV"
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/msha-mine-operations-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 = {
    "states": ["WV"],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/msha-mine-operations-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 '{
  "states": [
    "WV"
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call scrapesage/msha-mine-operations-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,scrapesage/msha-mine-operations-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/DxHB5NeFkCFvN3jZn/builds/ozqL7gqZbaGEgLqKG/openapi.json
