MSHA Compliance Action (Assessed Violations) Data Scraper
Pricing
from $3.00 / 1,000 results
MSHA Compliance Action (Assessed Violations) Data Scraper
Scrape the U.S. Mine Safety and Health Administration's (MSHA) full case-level Assessed Violations enforcement dataset - 3M+ citations and orders since 2000, joined with mine details (state, commodity, operator). Filter by mine, violator, state, commodity, penalty amount, date range, and more.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Crawler Bros
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
5 days ago
Last modified
Categories
Share
Scrape the U.S. Mine Safety and Health Administration's (MSHA) full case-level enforcement data — 3M+ citations and orders, 1.1M+ inspections, and 270K+ accidents since 2000 — joined with each mine's state, commodity, operator, district, and status. Search assessed penalties, raw citations (with negligence/gravity/likelihood detail), accidents & injuries, or inspection activity; filter by name, state, commodity, date range, and dozens more axes; or look up every record for specific mine IDs. Sourced directly from MSHA's public Open Government Data bulk files. No auth, no API key, no cookies, no proxy.
What this actor does
- Five modes:
search— filtered scan of MSHA's Assessed Violations dataset (penalty-focused)byMineId— exact lookup of assessed violations for one or more mine IDsviolations— MSHA's broader raw Violations dataset: every citation issued (including cases still in process), with negligence level, likelihood of injury, injury/illness potential, and contest/docket status the Assessed Violations dataset doesn't carryaccidents— MSHA's Accidents/Injuries/Illness dataset: degree of injury, classification, accident type, body part, narrativeinspections— MSHA's Inspections dataset: every inspection event, by activity code, date range, and office
- 30+ filters across the five modes: violator/mine name, state, commodity type, coal vs. metal/nonmetal, MSHA district, mine status (active/abandoned/etc.), violator type, violation type (legal basis), citation type, case status, negligence level, likelihood, injury/illness potential, contested/special-assessment flags, penalty amount range, date ranges, mine type, degree of injury, accident classification/type, immediate-notification type, inspection activity code, inspecting office code
- Mine enrichment: every record is joined against MSHA's Mines dataset for state, commodity, operator/controller name, district, mine type/status, employee count, and coordinates
- Penalty-scoring detail: exposes the gravity/negligence/history points MSHA's formula uses to calculate each penalty, not just the final dollar amount
- Empty fields are omitted — every field on every record is real, populated data
Data source
This actor scrapes MSHA's Open Government Data bulk files at arlweb.msha.gov — no login, no API key, no registration required:
AssessedViolations.zip— the case-level "Assessed Violations" dataset: every citation/order that reached a penalty assessment since January 2000, ~3M rows (mode=search, byMineId)Violations.zip— MSHA's broader raw citation dataset: every violation issued since 2000 (assessed or not), ~3.08M rows, with negligence/likelihood/gravity detail (mode=violations)Accidents.zip— every accident, injury, and illness reported since 2000, ~274K rows (mode=accidents)Inspections.zip— every MSHA inspection event since 2000, ~1.15M rows (mode=inspections)Mines.zip— the mine lookup table (~92K mines): name, state, commodity classification, operator, district, mine type/status
All are official MSHA data exports, refreshed regularly by the agency, and are joined against Mines.zip at scrape time by MINE_ID.
Feature surface: what was checked and why it's/isn't included
MSHA's Open Government Data portal (arlweb.msha.gov/opengovernmentdata/ogimsha.asp) lists 20 public bulk datasets. Beyond the four scraped above, these were checked and intentionally excluded:
- Employment/Production (quarterly & yearly) — aggregate hours/production by mine, not a compliance-action or per-case record; out of scope for an enforcement-data actor.
- Coal Dust / Quartz / Noise / Area / Personal Health Samples — industrial-hygiene sampling data, not enforcement actions; a different research domain.
- Conferences, Civil Penalty Dockets & Decisions, Contested Violations, 107(a) Orders Issued — narrower subsets of data already covered by
mode=violations(which includescontested,docketNumber,docketStatus, and every citation type including 107(a) imminent-danger orders). - Controller/Operator History, Address of Record — ownership-history and mailing-address lookups, not violation/accident/inspection activity — a reasonable future addition but out of scope for this pass.
- Per-inspector search — MSHA's bulk exports report only the inspecting office code (
inspectOfficeCode) and an inspector head-count (inspectorCount); no individual inspector name is published, so "search by inspector" is not reliably supportable without a different (non-bulk) data source.
Why MSHA instead of DOL Wage & Hour Division (WHD)
This actor was originally scoped as a DOL Wage & Hour Division "Workers Owed Wages" / compliance-action case-level scraper. During implementation, enforcedata.dol.gov (the WHD public data UI) and webapps.dol.gov (the consumer-facing search tool) were confirmed — via curl_cffi with Chrome TLS impersonation, a real headless-Chromium browser, Python's stdlib urllib, and an independent fetch from a completely different network — to return an identical, byte-for-byte 403 Forbidden on every path tested, including the bare domain root. The consistent AWS load-balancer error page across four unrelated HTTP client implementations rules out a TLS-fingerprint or headless-browser detection block; it indicates a blanket WAF rule against automated/cloud traffic, which would equally block Apify's datacenter proxy ranges. The only alternative case-level path, apiprod.dol.gov/v4/..., requires a registered API key (dataportal.dol.gov) — a hard violation of this project's zero-cost policy, since the actor must return real data with no user-supplied credentials. DOL's own aggregate CSV (dol.gov/.../all-acts.csv) is reachable but is year/state-level summary data only, with no employer names, case IDs, or per-case penalty amounts.
MSHA is itself a U.S. Department of Labor agency — a different sub-agency than WHD, but still core "DOL enforcement/compliance action data." Its Open Government Data bulk files are freely downloadable with no auth of any kind, confirmed reachable via a plain, unimpersonated HTTP client. This actor was built against MSHA's Assessed Violations dataset as a genuinely zero-cost-compliant replacement within the same DOL enforcement-data scope.
A note on industry classification (no NAICS)
MSHA classifies mines using its own SIC-based taxonomy (PRIMARY_SIC / PRIMARY_CANVASS), not NAICS. Rather than fabricate NAICS codes that MSHA's data doesn't contain, this actor exposes commodityType (Coal / Metal / Nonmetal / Sand & Gravel / Stone) and primarySicDescription — the real classification MSHA actually reports.
Output
Output shape depends on mode (recordType: mshaViolation / mshaViolationDetail / mshaAccident / mshaInspection). All four share the same mine-enrichment fields (state, county, district, commodityType, mineType, mineStatus, latitude, longitude, etc.) joined from MSHA's Mines dataset.
mode=search / byMineId (mshaViolation)
Identity & parties
eventNumber,violationNumber,assessCaseNumber— MSHA's case identifiersmineId,mineName— the cited mineviolatorId,violatorName,violatorType(Operator/Contractor)officeCode— MSHA field office that issued the citation
Violation details
primaryActionCode— legal basis (e.g.104(a),104(d)(1),107(a))citationType(Citation/Order/Safeguard/Notice),assessType(Regular/Single/Special)coalMetalIndicator(C/M),coalMetalDescriptionsignificantAndSubstantial,goodFaith,excessiveHistory— inspector-flagged booleanscfrStandardCode,mineActSectionCode— the specific federal standard citedcaseStatus(Closed/Received/Printed/Invalid)
Dates (ISO YYYY-MM-DD)
occurrenceDate,issueDate,finalOrderDate,caseStatusDate,billPrintDate,delinquentDate,historyStartDate,historyEndDate,violatorStartDate,violatorEndDate
Money
proposedPenaltyAmount,currentAssessmentAmount,paidAmountmineActInterestAmount,exLateInterestAmount,paidMineActInterestAmount,paidExLateInterestAmount
Penalty-scoring detail (MSHA's point-based formula — populated for Regular assessments)
penaltyPoints,gravityPersonsPoints,gravityInjuryPoints,gravityLikelihoodPoints,negligencePoints,goodFaithPoints,contractorSizePoints,mineSizePoints,controllerSizePointsviolatorViolationCount,violatorInspectionDayCount,violatorRepeatedViolationCount,violatorRepeatedViolationPoints,violationPerInspectionDayPointsviolationsPerInspectionDayRatio,repeatedViolationRatio— the raw ratios behind the points aboveviolatorMineHours,violatorProductionAmount,sizeOfMine,controllerHours,controllerProductionAmount,sizeOfControllingEntity
Mine details (joined from MSHA's Mines dataset)
state,county,district,latitude,longitudecommodityType(Coal/Metal/Nonmetal/SandAndGravel/Stone),primarySicCode,primarySicDescriptionoperatorName,controllerName,mineType(Surface/Underground/Facility),mineStatus,numberOfEmployees
mode=violations (mshaViolationDetail)
Every violation MSHA has issued since 2000 — including citations still in process — with the negligence/gravity detail the Assessed Violations dataset doesn't carry:
- Identity:
eventNumber,violationNumber,mineId,mineName,mineType,controllerId/controllerName,violatorId/violatorName/violatorType,contractorId - Legal basis:
primaryActionCode,secondaryActionCode,sectionOfAct,cfrStandardCode,citationType(addsWritten Noticeto the values above) - Gravity/negligence:
negligenceLevel+negligenceLevelDescription,likelihood+likelihoodDescription,injuryIllnessPotential+injuryIllnessPotentialDescription,personsAffectedCount,significantAndSubstantial - Process:
contested,contestedDate,docketNumber,docketStatus,specialAssessment,writtenNotice,enforcementArea,primaryOrMill,assessmentGeneratedBy - Dates/times:
issueDate/issueTime,occurrenceDate,inspectionBeginDate/inspectionEndDate,originalAbateDueDate/Time,latestAbateDueDate/Time,terminationDate/Time/terminationType,vacateDate/Time,rightToConferenceDate,finalOrderIssueDate,billPrintDate,lastActionCode/lastActionDate - Money:
proposedPenaltyAmount,currentAssessmentAmount,paidAmount - Counts:
violatorViolationCount,violatorInspectionDayCount,initialViolationNumber,replacedByOrderNumber - Mine enrichment:
state,county,district,commodityType,primarySicCode/Description,currentOperatorName,currentControllerName,mineStatus,numberOfEmployees,latitude/longitude
mode=accidents (mshaAccident)
- Identity:
documentNumber,mineId,mineName,operatorId/operatorName,controllerId/controllerName,contractorId,subunitCode/subunit - When/where:
accidentDate,accidentTime,shiftBeginTime,calendarYear/calendarQuarter,fiscalYear/fiscalQuarter - Severity/classification:
degreeOfInjuryCode/degreeOfInjury,classificationCode/classification,accidentTypeCode/accidentType,immediateNotificationCode/immediateNotificationType - Injury detail:
injuryCount,natureOfInjury,injuredBodyPart,injurySource,scheduleChargeDays,restrictedDutyDays,daysLost,permanentTransferOrTermination,returnToWorkDate - Person/equipment:
occupation,activity,totalMiningExperienceYears,mineExperienceYears,jobExperienceYears,undergroundLocation,undergroundMiningMethod,miningEquipment,equipmentManufacturer,equipmentModelNumber - Narrative:
narrative,investigationBeginDate,closedDocumentNumber - Mine enrichment:
state,county,district,commodityType,mineType,mineStatus,latitude/longitude
mode=inspections (mshaInspection)
- Identity:
eventNumber,mineId,mineName,controllerId/controllerName,operatorId/operatorName - Activity:
activityCode,activity,programArea,inspectOfficeCode,inspectorCount - Dates:
inspectionBeginDate,inspectionEndDate,calendarYear/calendarQuarter,fiscalYear/fiscalQuarter - Scope inspected (booleans):
companyRecordsInspected,surfaceUndergroundMineInspected,surfaceFacilityInspected,refusePilesInspected,explosiveStorageInspected,outbyAreasInspected,majorConstructionInspected,shaftsSlopesInspected,impoundmentsInspected,miscellaneousAreaInspected - Scope inspected (counts):
activeSectionsInspected,idleSectionsInspected,shaftSlopeSinkingInspected,impoundmentConstructionInspected,buildingConstructionSitesInspected,draglineOperationsInspected,unclassifiedConstructionInspected - Sampling & hours:
airSampleCount,dustSpotSampleCount,dustSurveySampleCount,respirableDustSampleCount,noiseSampleCount,otherSampleCount,totalInspectionHours,totalOnSiteHours,totalInspectionSupervisorTraineeHours,totalOnSiteSupervisorTraineeHours - Mine enrichment:
state,county,district,commodityType,mineType,mineStatus,latitude/longitude
Always present on every mode
sourceUrl,scrapedAt,recordType
Input
| Field | Type | Default | Applies to | Description |
|---|---|---|---|---|
mode | string | search | all | search / byMineId / violations / accidents / inspections |
violatorName | string | – | search, byMineId, violations | Substring match on operator/contractor name |
mineId | array | – | byMineId (required), violations, accidents, inspections (optional) | MSHA Mine IDs, e.g. 0800823 |
mineName | string | – | all except byMineId | Substring match on mine name |
state | string | – | all | US state/territory (2-letter code) |
commodityType | string | – | all | Coal / Metal / Nonmetal / SandAndGravel / Stone |
coalMetalInd | string | – | all | C (Coal) / M (Metal/Nonmetal) |
district | string | – | all | MSHA district code, e.g. C04, M3 (13 values) |
mineStatus | string | – | all | Active / Abandoned / Abandoned and Sealed / Intermittent / Temporarily Idled / NonProducing / New Mine |
violatorType | string | – | search, byMineId, violations | Operator / Contractor |
violationType | string | – | search, byMineId, violations | Legal basis, e.g. 104(a), 104(d)(1), 107(a) (10 values) |
citationType | string | – | search, byMineId, violations | Citation / Order / Safeguard / Notice / Written Notice |
caseStatus | string | – | search, byMineId | Received / Closed / Printed / Invalid |
significantAndSubstantialOnly | bool | false | search, byMineId, violations | Only inspector-flagged S&S violations |
negligenceLevel | string | – | violations | NoNegligence / LowNegligence / ModNegligence / HighNegligence / Reckless |
likelihood | string | – | violations | NoLikelihood / Unlikely / Reasonably / Highly / Occurred |
injuryIllnessPotential | string | – | violations | NoLostDays / LostDays / Permanent / Fatal |
contestedOnly | bool | false | violations | Only violations formally contested with FMSHRC |
specialAssessmentOnly | bool | false | violations | Only violations designated for Special Assessment |
penaltyAmountMin / penaltyAmountMax | int | – | search, byMineId, violations | Assessed penalty range (USD) |
issueDateFrom / issueDateTo | string | – | search, byMineId, violations | Issue-date range, YYYY-MM-DD |
mineType | string | – | all | Surface / Underground / Facility |
accidentDateFrom / accidentDateTo | string | – | accidents | Accident-date range, YYYY-MM-DD |
degreeOfInjury | string | – | accidents | 2-digit severity code, e.g. 01 (Fatality) (11 values) |
accidentClassification | string | – | accidents | 2-digit hazard-category code, e.g. 07 (Fall of Roof or Back) (28 values) |
accidentType | string | – | accidents | 2-digit event code, e.g. 04 (Struck by falling object) (44 values) |
immediateNotificationType | string | – | accidents | 2-digit emergency-notification code, e.g. 01 (Death) (13 values) |
inspectionDateFrom / inspectionDateTo | string | – | inspections | Inspection end-date range, YYYY-MM-DD |
activityCode | string | – | inspections | Inspection activity code, e.g. E01 (86 values) |
inspectOfficeCode | string | – | inspections | Exact match on the inspecting office code, e.g. M5852 |
maxItems | int | 50 | all | Records to return (1–5000) |
The source files are sorted oldest-first and have 270K-3M+ rows depending on mode. Restrictive filters (especially a recent date-from filter) may require scanning most or all of the file, which can take a few minutes — this is expected, not a malfunction.
Example: Coal violations in West Virginia
{"mode": "search","state": "WV","commodityType": "Coal","maxItems": 50}
Example: high-penalty significant & substantial violations
{"mode": "search","significantAndSubstantialOnly": true,"penaltyAmountMin": 5000,"maxItems": 50}
Example: full violation history for specific mines
{"mode": "byMineId","mineId": ["0800823", "4603341"],"maxItems": 200}
Example: recent citations by a specific operator
{"mode": "search","violatorName": "Coal","issueDateFrom": "2024-01-01","maxItems": 100}
Example: high-negligence, contested citations (mode=violations)
{"mode": "violations","negligenceLevel": "HighNegligence","contestedOnly": true,"maxItems": 50}
Example: fatal accidents in coal mines (mode=accidents)
{"mode": "accidents","coalMetalInd": "C","degreeOfInjury": "01","maxItems": 50}
Example: regular safety inspections in a district (mode=inspections)
{"mode": "inspections","district": "C04","activityCode": "E01","maxItems": 50}
Use cases
- Mine safety compliance research — track an operator's citation and penalty history
- ESG / investor due diligence — screen mining companies for safety violation patterns before investment
- Journalism & advocacy — investigate patterns of significant & substantial violations by state or commodity
- Legal & insurance — pull case-level enforcement history for a specific mine or operator
- Academic research — analyze mine safety enforcement trends across commodities, states, and time
- Competitive/industry benchmarking — compare violation rates across operators in the same commodity sector
FAQ
What is MSHA? The Mine Safety and Health Administration, a U.S. Department of Labor agency responsible for enforcing safety and health standards at the nation's mines. See msha.gov.
How far back does the data go? From January 1, 2000 to the most recent MSHA data refresh.
How fresh is the data? MSHA republishes its Open Government Data bulk files on its own schedule (typically at least monthly); each run downloads the latest available file.
Why do some records have penalty-scoring fields (points/ratios) and others don't? MSHA's point-based penalty formula only applies to Regular assessments. Single and Special assessments (roughly 20% of records) are penalized under a different process and don't carry gravity/negligence points — those fields are simply omitted rather than set to a fake zero.
Is violatorEndDate usually missing? Yes — MSHA's source file marks an ongoing violator relationship with a placeholder end date (09/09/9999); this actor treats that as "no end date yet" and omits the field, since the underlying data has no real information there. The same applies to a small number of violatorStartDate values using an obviously placeholder date (07/06/1776).
Why is there no NAICS code? MSHA's own taxonomy is SIC-based (primarySicCode / primarySicDescription / commodityType), not NAICS. Rather than invent NAICS mappings MSHA doesn't provide, the actor surfaces MSHA's real classification.
What does assessCaseNumber mean vs. eventNumber/violationNumber? eventNumber identifies the inspection event; violationNumber is the unique citation/order number; assessCaseNumber is MSHA's penalty-assessment case identifier, which can bundle multiple violations from the same inspection.
Is this affiliated with MSHA or the Department of Labor? No — this is an independent, third-party actor built on MSHA's public Open Government Data bulk files.
What's the difference between mode=search/byMineId and mode=violations? search/byMineId use MSHA's Assessed Violations dataset — the penalty-focused subset of violations that have completed MSHA's assessment process, with the full points-based penalty-scoring breakdown. mode=violations uses MSHA's broader Violations dataset — every citation issued, including ones still being processed, with negligence level, likelihood of injury, and injury/illness potential that Assessed Violations doesn't carry. Use violations for gravity/negligence analysis; use search/byMineId for penalty-scoring detail.
Does mode=inspections tell me which inspector conducted an inspection? No — MSHA's public bulk export reports only the inspecting field office code (inspectOfficeCode) and a headcount (inspectorCount), not individual inspector names. This is a genuine limitation of the source data, not a scraping gap.
Why do some accident records have missing equipment/location fields? MSHA's Accidents dataset uses literal placeholder text ("NO VALUE FOUND", "?", "Not Reported") when a field doesn't apply — e.g. undergroundLocation doesn't apply to a surface-mine accident. This actor omits those placeholders rather than surfacing them as fake data.