TruckRate Pro REST API · Enterprise Plan Only · v1.0 · Questions: billing@truckrate.pro
The TruckRate Pro API lets you generate full freight rate quotes programmatically. Send an origin, destination, and equipment type — get back a complete quote with fuel, tolls, linehaul, drayage, and margin applied.
Built for 3PLs, dispatch software integrations, and carrier pricing tools that need real-time rate intelligence without manual data entry.
Pass your API key in the request body as apiKey. Keep it private — do not expose in client-side code.
Generate a full freight rate quote. Returns fuel cost, toll charges, linehaul benchmarks, and a customer-ready quote price.
| Parameter | Type | Required | Description |
|---|---|---|---|
| apiKey | string | Required | Your Enterprise API key |
| origin | string | Required | Any US address, city+state, or ZIP code |
| destination | string | Required | Any US address, city+state, or ZIP code |
| equipment | string | Optional | van (default), reefer, flat, step, tanker |
| margin | number | Optional | Your target margin % (default: 20) |
| mpg | number | Optional | Truck MPG (default: 6.5) |
// POST https://truckrate.pro/api/quote { "apiKey": "trp_live_your_key_here", "origin": "Chicago, IL", "destination": "Atlanta, GA", "equipment": "van", "margin": 20, "mpg": 6.5 }
{
"success": true,
"quote": {
"total": 2734, // All-in customer quote with margin
"per_mile": 3.60, // $/mile all-in
"margin": 20, // % margin applied
"currency": "USD"
},
"breakdown": {
"fuel": 716, // Diesel cost at current state prices
"tolls": 103, // Truck tolls via TollGuru
"linehaul": {
"low": 1140, // DAT low rate
"mid": 1459, // DAT mid rate
"high": 1885 // DAT high rate
},
"your_cost": 2278, // Total cost before margin
"markup": 456 // Margin amount
},
"route": {
"origin": "Chicago, IL 60601",
"destination": "Atlanta, GA 30301",
"miles": 760,
"drive_time": "13h 6m",
"equipment": "van",
"fuel_price": 6.12, // IL diesel $/gal
"state_origin": "IL"
},
"meta": {
"generated_at": "2026-05-07T22:00:00Z",
"powered_by": "TruckRate Pro API v1",
"contact": "billing@truckrate.pro"
}
}
| Status | Error | Reason |
|---|---|---|
| 401 | Invalid API key | API key missing or incorrect |
| 400 | origin and destination are required | Missing required fields |
| 500 | Internal error | Geocoding or calculation failure |
const res = await fetch('https://truckrate.pro/api/quote', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ apiKey: 'trp_live_your_key', origin: 'Houston, TX', destination: 'Dallas, TX', equipment: 'reefer', margin: 22 }) }); const data = await res.json(); console.log('Quote: $' + data.quote.total);
import requests response = requests.post('https://truckrate.pro/api/quote', json={ 'apiKey': 'trp_live_your_key', 'origin': 'Los Angeles, CA', 'destination': 'Phoenix, AZ', 'equipment': 'flat', 'margin': 18 }) data = response.json() print(f"Quote: ${data['quote']['total']:,}")
Enterprise plan: 500 requests/day. Need more? Contact billing@truckrate.pro.
| Value | Description | Rate Multiplier |
|---|---|---|
| van | Dry Van 53ft (default) | 1.00× |
| reefer | Refrigerated / Temperature Control | 1.28× |
| flat | Flatbed | 1.18× |
| step | Step Deck / Lowboy | 1.25× |
| tanker | Tanker / Liquid Bulk | 1.22× |