# Carrier Inspections & Violations: Roadside Inspection History (`lepidata/carrier-inspections`) Actor

Roadside inspection history for US carriers by USDOT number: per-carrier out-of-service rates plus each inspection with level, state, OOS counts and violation codes. Unofficial. Not a CSA score or safety rating.

- **URL**: https://apify.com/lepidata/carrier-inspections.md
- **Developed by:** [Lepi Data](https://apify.com/lepidata) (community)
- **Categories:** Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.80 / 1,000 inspection or summary rows

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

## Carrier Inspections & Violations: Roadside Inspection History

*Unofficial tool. Not affiliated with, endorsed by, or sponsored by the Federal Motor Carrier Safety Administration (FMCSA), the U.S. Department of Transportation (DOT), or any government agency. No government seals or logos are used.*

Pull the roadside inspection history of US carriers by USDOT number: a summary per carrier with driver and vehicle out-of-service rates, plus every inspection with its level, state, out-of-service counts and violation codes. It's for freight brokers and shippers vetting carriers, insurance underwriters, fleet safety managers benchmarking their own record, and researchers.

**Input:** USDOT numbers and a look-back window of 1 to 24 months.

**Output:**

- `carrier-summary` row per carrier: inspections, violations, inspections with an out-of-service order, driver and vehicle out-of-service rates (standard inspection-level conventions), hazmat and post-crash inspections, newest inspection date.
- `inspection` row per inspection, newest first: inspection id, report number, date, state, level, location text, post-crash and interstate flags, violation and OOS counts by driver / vehicle / hazmat, and (optional) each violation's code, description, part, unit and OOS flag.

This is **not** a CSA / SMS BASIC score or a safety rating. Confirm on the official SAFER company snapshot before relying on it.

### Input

- `dotNumbers`: up to 500 USDOT numbers
- `months`: 1 to 24 (default 12)
- `includeViolations` (default true), `includeSummary` (default true)
- `maxInspectionsPerCarrier`: 0 to 5,000 (default 200; 0 = summary only)
- `maxResults`: up to 50,000 rows

### Output fields

Summary: `type`, `dot_number`, `months`, `from`, `to`, `inspections`, `violations`, `oos_violations`, `inspections_with_oos`, `driver_inspections`, `driver_oos_inspections`, `driver_oos_rate_pct`, `vehicle_inspections`, `vehicle_oos_inspections`, `vehicle_oos_rate_pct`, `hazmat_inspections_with_violations`, `hazmat_oos_inspections`, `post_crash_inspections`, `last_inspection_date`, `note`, `confirm_at`

Inspection: `type`, `dot_number`, `inspection_id`, `report_number`, `date`, `state`, `level`, `level_name`, `location`, `post_crash`, `interstate`, `violations`, `oos_violations`, `driver_violations`, `driver_oos`, `vehicle_violations`, `vehicle_oos`, `hazmat_violations`, `hazmat_oos`, `violation_details`, `confirm_at`

**Privacy.** Driver names are not in the public file. The carrier street address typed by the inspector, shipper names and citation numbers are left out.

**Opt-out.** Removal requests: support@lepidata.com. Requests are handled within 30 days; opted-out carriers are dropped from every result.

Free status rows (not charged): `not-found` (opted-out carrier), `invalid-input`, `api-error`, `free-plan-limit`, `charge-limit-reached`.

**Example:** `{"dotNumbers":["86876"],"months":12,"maxInspectionsPerCarrier":100}`

### Not a consumer report

Not a consumer report. Lepidata is not a consumer reporting agency. Do not use this data to decide credit, insurance, employment or housing eligibility for an individual.

You are responsible for your own CAN-SPAM, TCPA and do-not-call compliance when contacting any business found here.

### Data source and compliance

- Source credit: the Vehicle Inspection File (fx4q-ay7w) and Vehicle Inspections and Violations file (876r-jsdb), about the last 3 years, on the U.S. Department of Transportation open data portal, data.transportation.gov (FMCSA data). US government public data, updated daily. Requests are spaced at least 1 second apart, following the portal's robots.txt.
- Inspections are matched by the USDOT number the inspector recorded. Unofficial data: confirm on the official SAFER company snapshot. Not legal, safety or insurance advice.
- Free-plan accounts get up to 100 results per run.

**Pricing.** Pay per result: $1.80 per 1,000 rows ($0.0018 each, summary or inspection), the same price on every plan, no start fee. Free status rows are never charged.

# Actor input Schema

## `dotNumbers` (type: `array`):

USDOT numbers, up to 500.

## `months` (type: `integer`):

Inspection look-back window, 1 to 24 months.

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

Add violation codes and descriptions to each inspection.

## `includeSummary` (type: `boolean`):

One summary row per carrier: inspection counts and driver / vehicle out-of-service rates.

## `maxInspectionsPerCarrier` (type: `integer`):

Newest first. 0 = summary only.

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

Maximum rows (summaries + inspections), up to 50,000.

## Actor input object example

```json
{
  "dotNumbers": [
    "86876"
  ],
  "months": 12,
  "includeViolations": true,
  "includeSummary": true,
  "maxInspectionsPerCarrier": 200,
  "maxResults": 2000
}
```

# Actor output Schema

## `items` (type: `string`):

All rows from this run.

# 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 = {
    "dotNumbers": [
        "86876"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lepidata/carrier-inspections").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 = { "dotNumbers": ["86876"] }

# Run the Actor and wait for it to finish
run = client.actor("lepidata/carrier-inspections").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 '{
  "dotNumbers": [
    "86876"
  ]
}' |
apify call lepidata/carrier-inspections --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,lepidata/carrier-inspections"
        }
    }
}
```

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/thQW9ygunWLCCtQMJ/builds/RvOIZHWfd4S0WgEIe/openapi.json
