# FMCSA Carrier Lookup - USDOT Safety & Census Data (`hamsmoothie/fmcsa-carrier-safety-lookup`) Actor

Look up US trucking carriers on FMCSA SAFER by USDOT number, MC number or company name: authority status, fleet size, inspections, crashes, safety rating.

- **URL**: https://apify.com/hamsmoothie/fmcsa-carrier-safety-lookup.md
- **Developed by:** [Maybe Quark](https://apify.com/hamsmoothie) (community)
- **Categories:** Other, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 one fmcsa-registered motor carriers

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

## FMCSA Carrier Lookup: USDOT Number, Safety Rating and Fleet Size

**FMCSA Carrier Safety Lookup** looks up US motor carriers (trucking companies, brokers, bus operators) in the official FMCSA Company Census File on data.transportation.gov, the same USDOT registration data behind the SAFER Company Snapshot. Search by USDOT number, company name, state or city and get one flat row per carrier: status, legal and DBA name, operation type, address, power units, drivers, safety rating and a link to the SAFER snapshot. It uses public open data only.

### Input

Provide `usdotNumbers` for exact lookups, or combine the name, state and city filters. This example looks up two carriers by USDOT number:

```json
{
  "usdotNumbers": ["9694", "1234567"],
  "maxResults": 100
}
```

Or search by name and place:

```json
{
  "companyName": "express",
  "state": "TX",
  "city": "Marshall",
  "activeOnly": true,
  "maxResults": 100
}
```

- `usdotNumbers`: exact USDOT numbers. If set, all other filters are ignored.
- `companyName`: text matched against legal name or DBA name, case-insensitive.
- `state`: two-letter code of the carrier's physical address (default `TX`).
- `city`: city of the physical address.
- `activeOnly`: return only carriers with Active census status (default true).
- `maxResults`: maximum carriers returned (default 100, maximum 5000).

### Output

One row per carrier. Real example row for USDOT 9694:

```json
{
  "usdotNumber": "9694",
  "legalName": "COAST COUNTIES EXPRESS INC",
  "dbaName": null,
  "status": "Inactive",
  "carrierOperation": "A",
  "entityType": "CORPORATION",
  "city": "MARSHALL",
  "state": "TX",
  "zip": "75670-3301",
  "powerUnits": 39,
  "totalDrivers": 34,
  "safetyRating": "S",
  "safetyRatingDate": "19900828",
  "hazmat": false,
  "mcs150Date": null,
  "url": "https://safer.fmcsa.dot.gov/query.asp?searchtype=ANY&query_type=queryCarrierSnapshot&query_param=USDOT&query_string=9694"
}
```

`safetyRating` and `carrierOperation` are the codes as published in the FMCSA census file. Values the file leaves blank come back as `null`.

### Use cases

Search phrases this actor is built for:

- **"Check USDOT carrier safety rating"**: pass the USDOT number and read `safetyRating`, `safetyRatingDate` and `status`.
- **"FMCSA carrier lookup by USDOT number"**: vet a whole list of carriers before tendering freight.
- **"Trucking company fleet size and drivers"**: read `powerUnits` and `totalDrivers`, or build a prospect list of active carriers in a state or city.

Typical users are freight brokers, shippers, insurers, factoring companies and sales teams. It also works as a tool for AI agents through the Apify MCP server.

### Pricing

Pay per result: each carrier row returned is one billable result, listed at $0.002 per carrier ($2 per 1,000). Set a maximum charge on the run for a hard ceiling.

### Limits

- Data is the FMCSA Company Census File, refreshed by FMCSA about daily, so it can be up to a day old.
- Inspection counts, crash counts and out-of-service rates are not included; use the `url` SAFER link for those.
- Contact details of individuals are not returned.
- `maxResults` is capped at 5,000 per run.

### FAQ

**Where does the data come from?** The FMCSA Company Census File on data.transportation.gov (dataset az4n-8mr2).

**Is it real-time?** No. The census file is refreshed daily by FMCSA.

**Can I look up by MC number?** Not in this version. Use USDOT number, company name, state or city.

# Actor input Schema

## `usdotNumbers` (type: `array`):

Optional list of USDOT numbers to look up exactly. If set, other filters are ignored.

## `companyName` (type: `string`):

Optional text matched against legal name or DBA name (case-insensitive).

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

Optional US state or province code of the carrier's physical address, e.g. TX.

## `city` (type: `string`):

Optional city of the physical address.

## `activeOnly` (type: `boolean`):

Return only carriers whose census status is Active.

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

Maximum number of carriers to return.

## Actor input object example

```json
{
  "usdotNumbers": [],
  "companyName": "",
  "state": "TX",
  "city": "",
  "activeOnly": true,
  "maxResults": 100
}
```

# Actor output Schema

## `results` (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 = {
    "usdotNumbers": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hamsmoothie/fmcsa-carrier-safety-lookup").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 = { "usdotNumbers": [] }

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

```

## MCP server setup

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

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/rdwqBduWA76mdzZkd/builds/ddvNmXsQuLlhjcUhw/openapi.json
