# FMCSA Carrier Census Scraper - USDOT Company Data (`benthepythondev/fmcsa-carrier-census-scraper`) Actor

Search the official FMCSA Company Census open dataset for carriers, USDOT numbers, operating status, fleet size and business addresses.

- **URL**: https://apify.com/benthepythondev/fmcsa-carrier-census-scraper.md
- **Developed by:** [Ben](https://apify.com/benthepythondev) (community)
- **Categories:** Business, Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## FMCSA Carrier Census Scraper - USDOT Company Data

    Turn **FMCSA Company Census File** into clean JSON, CSV or Excel rows without maintaining a custom integration. This Actor is designed for freight brokers, logistics sales teams, insurance analysts, carrier compliance teams and transportation researchers. It uses the source's supported public feed, official API or open-data interface, keeps the default run intentionally small, and stores one normalized record per default-dataset item.

    The Actor is production-oriented rather than a demo. It includes bounded inputs, retries for transient service errors, explicit empty-result failures, a structured dataset view and source links that make each row traceable. Run it manually, call it through the Apify API, schedule it, or connect it to Make, Zapier and n8n.

    ## What this Actor returns

    Search the official FMCSA Company Census open dataset for carriers, USDOT numbers, operating status, fleet size and business addresses.

    Core output fields include:

    - `dot_number`
- `legal_name`
- `dba_name`
- `status_code`
- `business_type`
- `carrier_operation`
- `authority_number`
- `hazmat`
- `power_units`
- `truck_units`
- `drivers`
- `physical_address`
- `phone`
- `record_url`

    Additional source and search fields may be included when they improve traceability. Fields that are not available for a particular record are returned as `null` rather than guessed.

    ## Why use this data source?

    The US Department of Transportation publishes the FMCSA Company Census File through its public Socrata data portal. The dataset is refreshed daily and covers active, inactive and pending entities with USDOT registration, operating and fleet metadata.

    Using the first-party interface matters. It reduces blocking and proxy cost, makes daily monitoring practical, and preserves identifiers that can be checked against the publisher. The Actor does not copy a competitor implementation or depend on a third-party resale database. It normalizes current responses from the named source.

    ## Common use cases

    ### Create qualified carrier prospect lists by state

The structured output makes this workflow repeatable: run it on demand, schedule it, or pass the rows to the next system without manually copying records. Keep the input narrow enough to produce relevant results and retain the source identifiers for verification.

#### Verify a USDOT registration before onboarding

The structured output makes this workflow repeatable: run it on demand, schedule it, or pass the rows to the next system without manually copying records. Keep the input narrow enough to produce relevant results and retain the source identifiers for verification.

#### Segment fleets by trucks, power units or operation type

The structured output makes this workflow repeatable: run it on demand, schedule it, or pass the rows to the next system without manually copying records. Keep the input narrow enough to produce relevant results and retain the source identifiers for verification.

#### Monitor carrier status changes and authority identifiers

The structured output makes this workflow repeatable: run it on demand, schedule it, or pass the rows to the next system without manually copying records. Keep the input narrow enough to produce relevant results and retain the source identifiers for verification.

    ## Input

    | Field | Type | Description |
    | --- | --- | --- |
    | `query` | `string` | Company, DBA, city or other text to search across the official census record. Default: `"transport"`. |
| `dotNumber` | `string` | Optional exact USDOT number. When set, it takes priority over the general text query. Default: `""`. |
| `state` | `string` | Optional two-letter US state code, such as TX, CA or FL. Default: `""`. |
| `status` | `string` | Filter by FMCSA status code. A is active, I is inactive, P is pending, and all disables the filter. Default: `"A"`. |
| `maxResults` | `integer` | Maximum number of carrier records to save. Default: `10`. |

    The default `maxResults` is deliberately low so a first run finishes quickly and produces an inexpensive proof dataset. Increase it only after confirming that your filters return the records you need.

    ### Example input

    ```json
    {
  "query": "transport",
  "state": "TX",
  "status": "A",
  "maxResults": 25
}
    ```

    ## Output and export formats

    Every matching record is pushed separately to the default Apify dataset. From the Dataset tab you can download JSON, CSV, Excel, XML, RSS or JSONL. API clients can use the dataset-items URL returned by the run object. Because the schema is stable, the output can be loaded into a database, spreadsheet, data warehouse or agent workflow without scraping log text.

    A representative row contains the source identifier, human-readable title or name, the most useful status and date fields, and a direct source URL when the publisher exposes one. The exact fields are documented above and shown in the dataset table view.

    ## How it works

    1. The Actor validates and bounds the supplied input.
    2. It calls the supported **FMCSA Company Census File** interface with a descriptive request identity.
    3. Transient timeouts, rate limits and server errors are retried with backoff.
    4. Source-specific nested fields are normalized into one flat business-friendly row.
    5. Each row is written to the default dataset, where Apify automatically applies the configured pay-per-event result charge.
    6. A zero-row response fails clearly instead of reporting a misleading successful run.

    The Actor runs with limited permissions and only requests permission to write its result dataset. It does not require access to your other Actors, key-value stores or account resources.

    ## Scheduling and automation

    Create an Apify Schedule to run the Actor hourly, daily or weekly. A schedule is useful for monitoring fresh records, while a one-off run is better for research or backfills. Keep inputs in the Task rather than hard-coding them in an external workflow so they can be reviewed and changed safely.

    In Make, Zapier or n8n, use the Apify integration to run this Actor and then iterate over default-dataset items. For custom code, call `POST /v2/acts/benthepythondev~fmcsa-carrier-census-scraper/runs`, poll the run to a terminal state, and fetch items from the run's default dataset. Never place an Apify token in a public frontend.

    ## Pricing

    This Actor uses transparent pay-per-event pricing: `$0.00005` when a run starts and `$0.0030` for each record written to the default dataset. A run that returns 100 records therefore has a result charge of about `$0.30`, plus the small start event and normal Apify platform usage. The input limit controls both dataset size and result-event spend.

    ## Data quality and responsible use

    FMCSA states that the census file is roughly 24 hours behind its operational database and may differ from other agency systems. It is a registration dataset, not a safety rating or insurance guarantee. Verify consequential decisions with FMCSA directly.

    Public does not mean context-free. Preserve attribution and source URLs, respect intellectual-property and privacy obligations, and do not use the data for prohibited discrimination, harassment or unsolicited bulk messaging. If a record drives a legal, financial, safety or compliance decision, verify it with the authoritative publisher and a qualified professional.

    The upstream service can add fields, revise records, enforce quotas or experience downtime. The Actor retries transient failures, but it cannot guarantee that the source is always available or that every upstream record is complete. Scheduled users should monitor failed runs and retain the source ID so changed rows can be reconciled.

    ## FAQ

    ### Do I need an account or API key?

    The default workflow uses a public, supported interface and does not require a user login. If the publisher changes its access policy in the future, the Actor will fail clearly rather than collecting data through an unrelated account.

    ### Can I export the results to CSV or Excel?

    Yes. Open the default dataset after a run and select the desired download format. JSON and JSONL are best for code, while CSV and Excel are convenient for review and enrichment.

    ### Can I run it on a schedule?

    Yes. Save a Task with the filters you want, then attach an Apify Schedule. Start with a daily run and adjust only after observing result volume, change frequency and cost.

    ### How are duplicates handled?

    The Actor returns records supplied by the source for the requested query. Where the source exposes stable identifiers, those identifiers are included so downstream systems can upsert instead of append. Some sources intentionally publish several rows for one broader case or process; the README limitations explain those situations.

    ### Why did my run return no rows?

    A filter may be too narrow, a date range may have no current records, or the source may be temporarily unavailable. Review the Actor log, broaden one filter at a time and keep `maxResults` small while testing.

    ### Is this an official product of the source publisher?

    No. This is an independent Apify Actor that reads a public interface and links back to the authoritative source. Source names are used only to describe compatibility.

    ### How do I get support?

    Open an issue on the Actor page with the run ID, a redacted input example and the field you expected. Do not post API tokens, personal credentials or private feed URLs in a public issue.

    ## You might also like

    - [nhtsa-vin-decoder](https://apify.com/benthepythondev/nhtsa-vin-decoder)
- [cars-com-scraper](https://apify.com/benthepythondev/cars-com-scraper)
- [gleif-lei-scraper](https://apify.com/benthepythondev/gleif-lei-scraper)

    If the Actor produced a useful dataset, please leave a short Apify Store review. Reviews help prioritize maintenance and show other users which workflows are working in production.

    **Keywords:** fmcsa carrier census scraper, fmcsa company census file, data API, public data scraper, Apify Actor, automation, structured dataset, JSON export, CSV export, scheduled monitoring, market research, business intelligence.

# Actor input Schema

## `query` (type: `string`):

Company, DBA, city or other text to search across the official census record.
## `dotNumber` (type: `string`):

Optional exact USDOT number. When set, it takes priority over the general text query.
## `state` (type: `string`):

Optional two-letter US state code, such as TX, CA or FL.
## `status` (type: `string`):

Filter by FMCSA status code. A is active, I is inactive, P is pending, and all disables the filter.
## `maxResults` (type: `integer`):

Maximum number of carrier records to save.

## Actor input object example

```json
{
  "query": "transport",
  "dotNumber": "",
  "state": "TX",
  "status": "A",
  "maxResults": 10
}
````

# 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 = {
    "query": "transport",
    "dotNumber": "",
    "state": "TX",
    "status": "A",
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("benthepythondev/fmcsa-carrier-census-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 = {
    "query": "transport",
    "dotNumber": "",
    "state": "TX",
    "status": "A",
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("benthepythondev/fmcsa-carrier-census-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "query": "transport",
  "dotNumber": "",
  "state": "TX",
  "status": "A",
  "maxResults": 10
}' |
apify call benthepythondev/fmcsa-carrier-census-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=benthepythondev/fmcsa-carrier-census-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "FMCSA Carrier Census Scraper - USDOT Company Data",
        "description": "Search the official FMCSA Company Census open dataset for carriers, USDOT numbers, operating status, fleet size and business addresses.",
        "version": "1.0",
        "x-build-id": "uLKftWKv5EoIAJ2de"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/benthepythondev~fmcsa-carrier-census-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-benthepythondev-fmcsa-carrier-census-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/benthepythondev~fmcsa-carrier-census-scraper/runs": {
            "post": {
                "operationId": "runs-sync-benthepythondev-fmcsa-carrier-census-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/benthepythondev~fmcsa-carrier-census-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-benthepythondev-fmcsa-carrier-census-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "query": {
                        "title": "Company search",
                        "type": "string",
                        "description": "Company, DBA, city or other text to search across the official census record.",
                        "default": "transport"
                    },
                    "dotNumber": {
                        "title": "USDOT number",
                        "type": "string",
                        "description": "Optional exact USDOT number. When set, it takes priority over the general text query.",
                        "default": ""
                    },
                    "state": {
                        "title": "Physical state",
                        "type": "string",
                        "description": "Optional two-letter US state code, such as TX, CA or FL.",
                        "default": ""
                    },
                    "status": {
                        "title": "Carrier status",
                        "enum": [
                            "A",
                            "I",
                            "P",
                            "all"
                        ],
                        "type": "string",
                        "description": "Filter by FMCSA status code. A is active, I is inactive, P is pending, and all disables the filter.",
                        "default": "A"
                    },
                    "maxResults": {
                        "title": "Max carriers",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of carrier records to save.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
