# DAT Freight Rates Scraper (`maximedupre/dat-freight-rates`) Actor

Collect public DAT freight rates, load-to-truck ratios, trend percentages, and the national diesel benchmark. Choose one data type and filters, then save source-linked rows.

- **URL**: https://apify.com/maximedupre/dat-freight-rates.md
- **Developed by:** [Maxime Dupré](https://apify.com/maximedupre) (community)
- **Categories:** Business, Automation, Developer tools
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $16.85 / 1,000 freight metrics

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

### 🚚 DAT freight rates for planning

Freight brokers, carrier teams, and logistics analysts can collect public DAT freight rates and related market measures in structured rows. Choose one data type and its filters to compare national rate history, regional load-to-truck ratios, national trend percentages, or the national diesel benchmark. Each row keeps the source URL so you can use the data in your own checks and workflows.

**Use it to**

- Review national freight measures with **[Freight Rates Today](https://apify.com/maximedupre/dat-freight-rates/examples/freight-rates-today)**.
- Focus on flatbed observations with **[Flatbed Freight Rates](https://apify.com/maximedupre/dat-freight-rates/examples/flatbed-freight-rates)**.
- Pull 2026 per-mile rate data with **[Trucking Rates Per Mile 2026](https://apify.com/maximedupre/dat-freight-rates/examples/trucking-rates-per-mile-2026)**.
- Turn structured rate rows into a **[Trucking Freight Rates Chart](https://apify.com/maximedupre/dat-freight-rates/examples/trucking-freight-rates-chart)**.
- Check owner-operator rate data with **[Owner Operator Trucking Rates Per Mile](https://apify.com/maximedupre/dat-freight-rates/examples/owner-operator-trucking-rates-per-mile)**.

#### 📊 DAT freight observations

Choose one result type per run. The Output section lists every public row shape and shows a genuine row from a successful run for each one.

#### ▶️ Choose a DAT data view

**Run steps**

1. Choose one result type.
2. Add only the filters that apply to that result type.
3. Leave Maximum results empty to return all available results until the source is exhausted, or set a row limit.
4. Start the run and open the default dataset.

#### ⚙️ Input

The form uses one result type per run. Rate type, country, and time period apply to National rate history. Published regions apply to Regional load-to-truck ratios. Equipment categories apply to rate history and regional ratios, and are ignored for the other two result types.

**Input fields**

| Field | Type | What it does |
| --- | --- | --- |
| `resultType` | string | Required. Chooses `national-rate-history`, `regional-load-to-truck-ratios`, `national-trend-percentages`, or `national-diesel-benchmark`. |
| `rateType` | string | Chooses `spot` or `contract` rates for National rate history. |
| `country` | string | Chooses `united-states` or `canada` for National rate history. |
| `period` | string | Chooses `weekly` or `monthly` time granularity for National rate history. |
| `regions` | array of strings | Adds published state or province codes for Regional load-to-truck ratios, such as `US-CA` or `CA-ON`. |
| `equipmentCategories` | array of strings | Chooses equipment categories for National rate history or Regional load-to-truck ratios. Leave it empty to include all available categories. It is ignored for National trend percentages and National diesel benchmark. |
| `maxItems` | integer | Stops after this many rows. Leave it empty to return all available results until the source is exhausted. |

**Example input**

This is the public input from the successful run using the default input.

```json
{
  "resultType": "national-rate-history",
  "rateType": "spot",
  "country": "united-states",
  "period": "weekly",
  "equipmentCategories": [
    "van"
  ],
  "maxItems": 100
}
```

#### 🧾 Output

The run output provides a link to the default dataset. Each run returns one of the four row shapes below, based on `resultType`.

**Dataset link**

| Field | Type | What it does |
| --- | --- | --- |
| `dataset` | string | Opens the successful freight observations from the run in the default dataset view. |

**National rate history row**

| Field | Type | What it does |
| --- | --- | --- |
| `datasetType` | string | Identifies this row as `national-rate-history`. |
| `period` | string | Shows the time granularity: `weekly` or `monthly`. |
| `periodStart` | string (date) | First date covered by the rate observation. |
| `periodEnd` | string (date) | Last date covered by the rate observation. |
| `rateType` | string | Shows `spot` or `contract`. |
| `country` | string | Shows `united-states` or `canada`. |
| `equipmentCategory` | string | Names the equipment category covered by the rate. |
| `rate` | number | Published DAT freight rate. |
| `fuelSurcharge` | number, optional | Published DAT fuel surcharge measure when available. |
| `sourceUrl` | string | Public source reference for the observation. |

**Example row from the successful run using the default input**

```json
{
  "datasetType": "national-rate-history",
  "period": "weekly",
  "periodStart": "2025-09-22",
  "periodEnd": "2025-09-28",
  "rateType": "spot",
  "country": "united-states",
  "equipmentCategory": "van",
  "rate": 1.63,
  "fuelSurcharge": 0.42,
  "sourceUrl": "https://analytics.api.dat.com/v2/trendlines/nationalHistory"
}
```

**Regional load-to-truck ratio row**

| Field | Type | What it does |
| --- | --- | --- |
| `datasetType` | string | Identifies this row as `regional-load-to-truck-ratios`. |
| `regionCode` | string | Published state or province code, such as `US-CA`. |
| `equipmentCategory` | string | Names the equipment category covered by the ratio. |
| `loadCount` | number | Published DAT load measure. |
| `truckCount` | number | Published DAT truck measure. |
| `loadToTruckRatio` | number | Published DAT load-to-truck ratio. |
| `sourceUrl` | string | Public source reference for the observation. |

**Example row from a successful regional run**

```json
{
  "datasetType": "regional-load-to-truck-ratios",
  "regionCode": "US-CA",
  "equipmentCategory": "van",
  "loadCount": 11821.90323,
  "truckCount": 1333.41935,
  "loadToTruckRatio": 8.86586,
  "sourceUrl": "https://www.dat.com/wp-admin/admin-ajax.php"
}
```

**National trend percentage row**

| Field | Type | What it does |
| --- | --- | --- |
| `datasetType` | string | Identifies this row as `national-trend-percentages`. |
| `weekOverWeekPercent` | number | Published national change from the previous week, in percent. |
| `monthOverMonthPercent` | number | Published national change from the previous month, in percent. |
| `yearOverYearPercent` | number | Published national change from the previous year, in percent. |
| `sourceUrl` | string | Public source reference for the observation. |

**Example row from a successful trend run**

```json
{
  "datasetType": "national-trend-percentages",
  "weekOverWeekPercent": 17.726,
  "monthOverMonthPercent": -9.266,
  "yearOverYearPercent": 35.272,
  "sourceUrl": "https://analytics.api.dat.com/v2/trendlines/trends"
}
```

**National diesel benchmark row**

| Field | Type | What it does |
| --- | --- | --- |
| `datasetType` | string | Identifies this row as `national-diesel-benchmark`. |
| `periodStart` | string (date) | First date covered by the diesel benchmark observation. |
| `periodEnd` | string (date) | Last date covered by the diesel benchmark observation. |
| `dieselPrice` | number | Published national DAT diesel fuel-price benchmark. |
| `sourceUrl` | string | Public source reference for the observation. |

**Example row from a successful diesel run**

```json
{
  "datasetType": "national-diesel-benchmark",
  "periodStart": "2026-09-21",
  "periodEnd": "2026-09-21",
  "dieselPrice": 6.53,
  "sourceUrl": "https://analytics.api.dat.com/v2/trendlines/fuel"
}
```

#### 💳 Pricing

**Charged event**

The `dat-freight-observation` event charges for one published freight metric saved to your dataset. The FREE tier price is $0.0225 per saved metric. Other Apify customer tiers use the rates shown in the Store pricing panel. A run with no saved rows does not trigger this event.

#### 🔌 Integrations

**Dataset access**

Open the default dataset link from the Output section, or use the Apify API and client libraries to read the saved rows. Each row includes its public source URL for reference.

**Video guide**

https://www.youtube.com/watch?v=bNACk1\_S\_6w\&list=PLObrtcm1Kw6MUrlLNDbK9QRg8VDJg0gOW\&index=4

#### ❓ FAQ

##### Can I get lane-specific freight quotes?

No. This Actor returns public DAT national rate history and related national or regional measures. It does not provide lane-specific, origin-destination, or shipment-level quotes.

##### Can one run return more than one data type?

No. Choose one result type for each run. This keeps the filters and returned row shape clear.

##### Which fields matter for regional ratios?

Use `regions` to choose published states or provinces and `equipmentCategories` to choose equipment. Rate type, country, and time period apply to National rate history instead.

##### What happens if I leave Maximum results empty?

The run returns all available results until the source is exhausted. The source may still publish no rows for a requested region, period, or filter combination.

##### Why might a result type return no rows?

The source may not publish the requested data for the chosen filters or region. Try a broader equipment choice or region selection when the source has more coverage.

##### Does every row include a source URL?

Yes. Each public dataset shape includes `sourceUrl`, which points to the source reference used for that observation.

##### Do I need a DAT login or API key?

No. The Actor uses public DAT Trendlines data and does not require a DAT login or API key.

### 📝 Changelog

**v0.0** (27-09-2026)

- Initial release.

### 🆘 Support

For issues, questions, or feature requests, [file a ticket](https://console.apify.com/actors/maximedupre~dat-freight-rates/issues) and I'll fix or implement it in less than 24h 🫡

### 🔗 Related Actors

- [GasBuddy Fuel Prices Scraper](https://apify.com/maximedupre/gasbuddy-fuel-prices): Compare local diesel and other fuel reports around a ZIP, city, state, or coordinate when national benchmark data needs local context.
- [Container Shipping Rates Scraper](https://apify.com/crawlerbros/container-shipping-rates-scraper): Compare public container freight rates and market indices on major shipping lanes.
- [SeaRates Ocean Freight Scraper](https://apify.com/crawlerbros/searates-scraper): Review ocean routes, ports, container types, and freight rate data.
- [BTS Supply Chain Pressure & Freight Indicator Monitor](https://apify.com/aether_studio/bts-supply-chain-pressure-monitor): Add port congestion, diesel, rail, barge, and freight indicators to market research.
- [FMCSA Carrier Safety Scraper](https://apify.com/parseforge/fmcsa-carrier-safety-scraper): Check public carrier authority, safety, insurance, and fleet details beside freight-rate work.

**Made with ❤️ by Maxime Dupré**

# Actor input Schema

## `resultType` (type: `string`):

Choose the DAT data category to return in this run.

## `rateType` (type: `string`):

Choose Spot or Contract rates for National rate history.

## `country` (type: `string`):

Choose the country for National rate history.

## `period` (type: `string`):

Choose the time granularity for National rate history.

## `regions` (type: `array`):

Enter one or more published state or province codes for Regional load-to-truck ratios, such as US-CA or CA-ON.

## `equipmentCategories` (type: `array`):

Choose one or more equipment categories for National rate history or Regional load-to-truck ratios. Leave this empty to include all available categories. This field is ignored for National trend percentages and National diesel benchmark.

## `maxItems` (type: `integer`):

Stop after this many rows. Leave this empty to return all available rows until the source is exhausted.

## Actor input object example

```json
{
  "resultType": "national-rate-history",
  "rateType": "spot",
  "country": "united-states",
  "period": "weekly",
  "equipmentCategories": [
    "van"
  ],
  "maxItems": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

Open the successful freight observations 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 = {
    "resultType": "national-rate-history",
    "rateType": "spot",
    "country": "united-states",
    "period": "weekly",
    "equipmentCategories": [
        "van"
    ],
    "maxItems": 100
};

// Run the Actor and wait for it to finish
const run = await client.actor("maximedupre/dat-freight-rates").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 = {
    "resultType": "national-rate-history",
    "rateType": "spot",
    "country": "united-states",
    "period": "weekly",
    "equipmentCategories": ["van"],
    "maxItems": 100,
}

# Run the Actor and wait for it to finish
run = client.actor("maximedupre/dat-freight-rates").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 '{
  "resultType": "national-rate-history",
  "rateType": "spot",
  "country": "united-states",
  "period": "weekly",
  "equipmentCategories": [
    "van"
  ],
  "maxItems": 100
}' |
apify call maximedupre/dat-freight-rates --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,maximedupre/dat-freight-rates"
        }
    }
}
```

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/p1RYisuc6HayHVFXF/builds/xyIC5Nl8R4Xfad8YL/openapi.json
