# FMCSA New Active Trucking Authorities & Fleet Leads (`afkdigital/newapi21-fmcsa-new-trucking-authorities`) Actor

Verified newly granted active US FMCSA Motus operating authorities joined to carrier and census data; not evidence of adequate insurance or sales readiness.

- **URL**: https://apify.com/afkdigital/newapi21-fmcsa-new-trucking-authorities.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 verified fmcsa active authorities

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

## US FMCSA Newly Authorized Trucking & Fleet Insurance Leads

**Actor:** `newapi21-fmcsa-new-trucking-authorities`\
**Production code:** NEWAPI21\
**Version:** 1.0.0 (Actor source version 1.0)\
**Source:** U.S. Department of Transportation / FMCSA public Motus operating authority and Company Census records\
**Target Store pricing:** Pay per event, **$0.005 per unique output Dataset record**, **$5 per 1,000 results** (configure and verify on the Apify Publication tab)

Discover newly **granted and currently active** FMCSA operating authorities, filtered by state, carrier category and the documented number of power units. Export a ready-to-map Apify Dataset as JSON or CSV for Clay, n8n or a lawful CRM enrichment workflow.

> **Verification warning:** An active FMCSA authority is not proof that an insurance policy provides adequate coverage, that filings are sufficient for a particular customer or route, that a business is looking for insurance, or that the business is ready to purchase. This Actor does not evaluate insurance compliance or outreach eligibility. **No automated contact or messaging is performed.**

### Quick start

Default input (start/end omitted intentionally):

```json
{
  "states": ["TX", "FL"],
  "carrierType": "motor_carrier",
  "authorityTypes": [],
  "minPowerUnits": 1,
  "maxResults": 20,
  "maxCostUsd": 0.1,
  "pageSize": 100,
  "maxSourceRecords": 3000
}
```

Date-filtered example:

```json
{
  "startDate": "2026-10-20",
  "endDate": "2026-10-22",
  "states": ["TX", "FL"],
  "carrierType": "motor_carrier",
  "minPowerUnits": 1,
  "maxResults": 100,
  "maxCostUsd": 0.5
}
```

When dates are omitted, the end date is **yesterday UTC**, and the start date is six days earlier. This avoids confusing in-flight data updates with completed daily authority events. Filter dates are **FMCSA Granted authority-event dates**, never the Actor's first-observation date, a company's formation date or an insurance filing date. Results depend on what the official source published by the time of the run.

#### Input parameters

| Field | Purpose |
|---|---|
| `startDate`, `endDate` | Optional inclusive UTC Grant event date range in `YYYY-MM-DD` |
| `states` | Two-letter physical-business state codes (default `["TX","FL"]`) |
| `carrierType` | `motor_carrier`, `broker`, `freight_forwarder` or `all`; default motor carriers |
| `authorityTypes` | Exact optional Motus `op_auth_type` names to narrow type |
| `minPowerUnits` | Minimum non-null FMCSA Census power unit count (default 1) |
| `maxResults` | Maximum unique authority identities emitted per run (1 to 1000) |
| `maxCostUsd` | Cap on result event charges ($0.005 each; zero emits no rows) |
| `pageSize` | Official history API page size, 10–500 |
| `maxSourceRecords` | Limit on eligible history pages; report explicitly indicates capped scans |

**Pending authority is not a new grant.** The Actor deliberately requires a history row with `reason = Granted`, `op_auth_status = Active` and a matching current **Active** Carrier authority. It excludes `Pending`, `Initial Status`, `Published to FMCSA Register`, `Reinstated`, withdrawn and inactive rows. The source's **legacy common/contract consolidation** reinstatement events are not treated as new grants.

### Official FMCSA datasets and mapping

| Purpose | Dataset | ID |
|---|---|---|
| Historical authority change events, including Grant date | [Motus AuthHist - All With History](https://data.transportation.gov/d/yu5v-wbh6) | `yu5v-wbh6` |
| Current authority status, legal name and physical business address | [Motus Carrier - All With History](https://data.transportation.gov/d/inys-ebih) | `inys-ebih` |
| Fleet, driver counts, cargo classification and fallback company phone | [Company Census File](https://data.transportation.gov/d/az4n-8mr2) | `az4n-8mr2` |
| Optional daily difference verification; not used as historical range source | [Motus AuthHist daily](https://data.transportation.gov/d/dm5j-zc6c) | `dm5j-zc6c` |
| Optional daily difference verification | [Motus Carrier daily](https://data.transportation.gov/d/nakq-58th) | `nakq-58th` |

Live metadata verified 23 Oct 2026: Motus datasets refreshed that day and Census last refreshed 22 Oct 2026. Metadata and actual row updates may change.

**Legacy warning:** `AuthHist - All With History` dataset ID `9mw4-x3tu` (and old `Carrier All With History`) stopped receiving new source records in May 2026. They are **not** used for newly granted authority decisions.

**Matching and deduplication:** Historical event -> current authority via normalized `(docket_number, USDOT number, exact operating-authority type)`, then Census via exact USDOT. Under legacy authority rules one docket may have several distinct authority types, so deduplicating on USDOT alone would be wrong. Missing or conflicting current authority states are rejected. All optional values come from official fields and remain null if not found. `mc_number` is populated only when the actual docket uses the `MC` prefix; the general `docket_number` field preserves `FF` and `MX` identifiers.

**Temporal semantics:** `authorization_date` comes from `status_change_date` on a real `Granted` Motus history event, formatted as ISO date. `observed_at` is the Actor's UTC reading time, NOT the grant date. A newly granted authority is not necessarily a newly formed company or first-time carrier.

### Output Dataset (JSON and CSV)

Every row is one unique verified `USDOT + docket + authority type`. Apify supplies native JSON and CSV downloads. Structured fields:

- `dot_number`, `docket_number`, `mc_number` (null for FF/MX)
- `legal_name`, `dba_name`, `business_phone`, `physical_address`
- `power_units_count`, `drivers_count`, `cargo_carried`
- `authority_type`, `authorization_date`, `authority_status`
- `source_url` (official filtered FMCSA source), `observed_at` (UTC)

For Clay, import the default Apify Dataset CSV and map `dot_number` and `docket_number` as **text identifiers**. For n8n, use the Apify Dataset items endpoint as JSON with `dot_number`, `docket_number` and `authority_type` as a combined record key. This Actor itself does **not** email, call, scrape personal social profiles, send cold outreach or make contact.

Run's default key-value store also includes `RUN_SUMMARY` (counts, source IDs, filtering, cost estimate, source scan status) and `CHECKPOINT` (source offset and already seen identities, for interrupted-restart recovery **within the same run's KV store**). If a source limit is hit, do not interpret output as an exhaustive scan.

### Cost controls and publication pricing

Expected Apify pricing configuration: **Pay per event (PPE)**, with exactly one event:
`apify-default-dataset-item` at **$0.005**, **primary event**, **no actor-start fee**, and **no second custom record event**. The SDK's `Actor.pushData()` automatically charges that configured synthetic event. The Actor never calls `Actor.charge()` for the same record.

The configured input `maxCostUsd` caps these result event charges, not all independent platform resource costs. No proxy is required. Verify the Console pricing before public release.

| Unique returned authorities | Customer result event charge |
|---:|---:|
| 1 | $0.005 |
| 100 | $0.50 |
| 1,000 | $5.00 |

Per Apify PPE's published economics, the developer receives 80% of gross event revenue before underlying platform costs. At 1,000 paid records, $5 billed, $4 before platform costs; net profit requires the actual Actor platform usage measurement. Publishing and billing are **not** complete until the Apify Console confirms the price and publication visibility.

### Reliability

- Socrata API v2 endpoints over HTTPS; one authenticated `X-App-Token` can be supplied from optional environment variable `SOCRATA_APP_TOKEN` (never hardcode or log it).
- Date-filtered history pages with explicit deterministic `$order`, `$limit`, `$offset`.
- Current authority / Census joins in bounded batches (45 docket identities per lookup).
- HTTP request timeouts (12 s), bounded 3 attempts for transient network/429/server errors, `Retry-After` capped backoff.
- Request budget 160, record cap, output cap, event price cap and approximately 245 s processing deadline.
- Checkpoint per history page; emitted default Dataset IDs are loaded on restarts to avoid duplicate output billing. No cross-run state guarantee or cross-run atomic transaction is claimed.
- No automatic outreach; source business telephone and address are published FMCSA fields, not evidence of consent for any specific marketing channel.

#### Run locally

```bash
cd /opt/NEWAPI/NEWAPI21
npm ci
npm test
mkdir -p storage/key_value_stores/default
cp .actor/INPUT.json storage/key_value_stores/default/INPUT.json
npm start
```

The working tree is scoped to `/opt/NEWAPI/NEWAPI21`; it does not modify any other API/NEWAPI project.

#### Quality acceptance

Automated unit scenarios include active `Granted`, `Pending`, `Reinstated`, duplicated dockets, absent business phone, null-value behavior, state/fleet filters, 429 retry, pricing cap and resume/replay avoidance. Integration tests use genuine FMCSA records for Texas and Florida; official data contents and source freshness are time-dependent.

**Use responsibly:** Check actual registration and applicable insurance requirements directly with FMCSA and a qualified insurance professional before relying on an authority for underwriting or solicitation. Follow the laws and contact-channel rules that apply to the use of public contact records.

# Actor input Schema

## `startDate` (type: `string`):

YYYY-MM-DD. Omit for 7-day window ending yesterday; date is FMCSA Granted status-change date, not first observed.

## `endDate` (type: `string`):

YYYY-MM-DD. Omit for yesterday UTC; grant-event status-change dates only.

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

Exact FMCSA business address state codes; default Texas and Florida.

## `carrierType` (type: `string`):

Which category of FMCSA operating authority to include.

## `authorityTypes` (type: `array`):

Optional precise FMCSA op_auth_type labels from Motus. Empty matches the selected category.

## `minPowerUnits` (type: `integer`):

Null or unknown fleet count cannot satisfy any positive threshold. Default 1.

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

Maximum number of unique active Granted authority records to emit.

## `maxCostUsd` (type: `number`):

$0.005 per unique emitted authority; a 0 cap emits no billable items. Platform costs are managed separately.

## `pageSize` (type: `integer`):

Number of Motus history rows per paginated Socrata request.

## `maxSourceRecords` (type: `integer`):

Bounded source processing to avoid long or expensive requests. A capped scan may have more matching rows.

## Actor input object example

```json
{
  "states": [
    "TX",
    "FL"
  ],
  "carrierType": "motor_carrier",
  "authorityTypes": [],
  "minPowerUnits": 1,
  "maxResults": 20,
  "maxCostUsd": 0.1,
  "pageSize": 100,
  "maxSourceRecords": 3000
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

## `checkpoint` (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 = {
    "states": [
        "TX",
        "FL"
    ],
    "carrierType": "motor_carrier",
    "authorityTypes": [],
    "minPowerUnits": 1,
    "maxResults": 20,
    "maxCostUsd": 0.1,
    "pageSize": 100,
    "maxSourceRecords": 3000
};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/newapi21-fmcsa-new-trucking-authorities").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": [
        "TX",
        "FL",
    ],
    "carrierType": "motor_carrier",
    "authorityTypes": [],
    "minPowerUnits": 1,
    "maxResults": 20,
    "maxCostUsd": 0.1,
    "pageSize": 100,
    "maxSourceRecords": 3000,
}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/newapi21-fmcsa-new-trucking-authorities").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": [
    "TX",
    "FL"
  ],
  "carrierType": "motor_carrier",
  "authorityTypes": [],
  "minPowerUnits": 1,
  "maxResults": 20,
  "maxCostUsd": 0.1,
  "pageSize": 100,
  "maxSourceRecords": 3000
}' |
apify call afkdigital/newapi21-fmcsa-new-trucking-authorities --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/newapi21-fmcsa-new-trucking-authorities"
        }
    }
}
```

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/TAgwlnBWlhVAEwVUN/builds/HmbXJ5T7QGHfO0Jca/openapi.json
