API reference
DOT carrier
POST /dot/carrier looks up a motor carrier by USDOT or MC number in FMCSA data: registration status, operating authority, fleet, cargo and safety rating.
https://api.qelka.com/v1/dot/carrierLook up a US motor carrier, broker or freight forwarder in the open data of the Federal Motor Carrier Safety Administration (FMCSA): its legal name, the status of its USDOT registration, each operating authority and its status, its fleet and drivers, the cargo it declares, its safety rating and the date of its last registration update. Each lookup costs 1 credit when FMCSA has the registration; numbers that are not registered, errors and test keys are never billed.
Request
Send the USDOT number, or a docket number: the MC, FF or MX number of an operating authority.
dot_numberstringUSDOT, US DOT or DOT prefix, #, No., spaces and hyphens are ignored.mc_numberstringMC, FF or MX followed by up to 8 digits, 1 to 20 characters as sent. Digits alone are read as an MC number.freshbooleanDefault falsetrue skips the 24-hour result cache and reads the FMCSA data again.Send exactly one of dot_number and mc_number: a body with both, or with neither, is a 400 invalid_request. A number that cannot be a USDOT or docket number, such as letters in dot_number, is a 200 with status: "invalid".
A lookup makes up to two rounds of requests to data.transportation.gov, each with a 10-second limit, so every snippet sets a 30-second client timeout.
curl https://api.qelka.com/v1/dot/carrier \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"dot_number": "80806"}'
const response = await fetch('https://api.qelka.com/v1/dot/carrier', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ dot_number: '80806' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/dot/carrier",
headers={"Authorization": f"Bearer {api_key}"},
json={"dot_number": "80806"},
timeout=30,
)
result = response.json()
print(result)
<?php
$ch = curl_init('https://api.qelka.com/v1/dot/carrier');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('QELKA_API_KEY'),
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['dot_number' => '80806']),
CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
print_r($result);
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"os"
"time"
)
func main() {
payload, _ := json.Marshal(map[string]any{"dot_number": "80806"})
request, _ := http.NewRequest(http.MethodPost, "https://api.qelka.com/v1/dot/carrier", bytes.NewReader(payload))
request.Header.Set("Authorization", "Bearer "+os.Getenv("QELKA_API_KEY"))
request.Header.Set("Content-Type", "application/json")
client := &http.Client{Timeout: 30 * time.Second}
response, err := client.Do(request)
if err != nil {
panic(err)
}
defer response.Body.Close()
var result map[string]any
if err := json.NewDecoder(response.Body).Decode(&result); err != nil {
panic(err)
}
fmt.Println(result)
}
require 'json'
require 'net/http'
uri = URI('https://api.qelka.com/v1/dot/carrier')
request = Net::HTTP::Post.new(uri)
request['Authorization'] = "Bearer #{ENV.fetch('QELKA_API_KEY')}"
request['Content-Type'] = 'application/json'
request.body = JSON.generate({ dot_number: '80806' })
response = Net::HTTP.start(uri.host, uri.port, use_ssl: true, read_timeout: 30) do |http|
http.request(request)
end
result = JSON.parse(response.body)
puts result
Response
Every valid request gets a 200. Read status first: only found fills the carrier fields.
idstringlkp_ followed by 26 characters.objectstringdot_carrier.inputstringdot_number or mc_number you sent, without surrounding spaces.querystringdot_number or mc_number: the field you sent.statusstringfound, not_found or invalid.reasonstring or nullnot_registered with not_found, invalid_number with invalid, else null.dot_numberstring or nulllegal_namestring or nulldba_namestring or nullusdot_statusstring or nullactive, inactive or pending: the status of the USDOT registration in the FMCSA Company Census File.operationstring or nullinterstate, intrastate_hazmat or intrastate_non_hazmat.classificationsarray of stringsAUTHORIZED FOR HIRE or PRIVATE PROPERTY.docketsarray of stringsMC135797.authorityobjectauthority.statusstringactive when at least one authority is active; else pending when one is pending; else inactive when there is any; none when FMCSA lists no authority, as for private and intrastate carriers.authority.sourcestring or nullmotus: the file of Motus, the new FMCSA registration system. legacy: the licensing file of the previous system, read when Motus has no record. null with no authority.authority.entriesarray of objectsauthority.entries.docketstringMC135797.authority.entries.typestringMotor Carrier of Property (Except Household Goods) or Broker of Property (Except Household Goods). The legacy file gives Common carrier, Contract carrier or Broker.authority.entries.statusstringactive, inactive, pending or withdrawn.fleetobjectpower_units, trucks, buses, drivers and cdl_drivers (drivers with a commercial driver's license), each an integer or null, as declared on the MCS-150.hazmatboolean or nulltrue when the carrier declares hazardous materials.cargoarray of stringsgeneral_freight, household_goods, metal, motor_vehicles, drive_tow_away, logs_poles_lumber, building_materials, mobile_homes, machinery_large_objects, fresh_produce, liquids_gases, intermodal_containers, passengers, oilfield_equipment, livestock, grain_feed_hay, coal_coke, meat, garbage_refuse, us_mail, chemicals, dry_bulk, refrigerated_food, beverages, paper_products, utilities, agricultural_farm_supplies, construction, water_well or other.safety_ratingobjectsafety_rating.ratingstring or nullsatisfactory, conditional or unsatisfactory. null when the carrier was never rated, which is the case of most carriers.safety_rating.date, safety_rating.review_datestring or nullYYYY-MM-DD.addressobject or nullstreet, city, state, zip and country, each string or null.phonestring or nullmcs150object or nulldate (YYYY-MM-DD), mileage and mileage_year, the miles declared and the year they cover.addedstring or nullYYYY-MM-DD.urlstring or nullcredits_usedintegerstatus is found with a live key, else 0.cachedbooleantrue when the answer came from the 24-hour cache.cargo is cut short in this example:
{
"id": "lkp_01M8CEFMEJ7NWSSY5WEY967N6S",
"object": "dot_carrier",
"input": "80806",
"query": "dot_number",
"status": "found",
"reason": null,
"dot_number": "80806",
"legal_name": "J B HUNT TRANSPORT INC",
"dba_name": "J B HUNT",
"usdot_status": "active",
"operation": "interstate",
"classifications": ["AUTHORIZED FOR HIRE"],
"dockets": ["MC135797", "FF51075"],
"authority": {
"status": "active",
"source": "motus",
"entries": [
{ "docket": "MC135797", "type": "Motor Carrier of Household Goods", "status": "active" },
{ "docket": "MC135797", "type": "Motor Carrier of Property (Except Household Goods)", "status": "active" },
{ "docket": "MC135797", "type": "Broker of Property (Except Household Goods)", "status": "active" },
{ "docket": "MC135797", "type": "Broker of Household Goods", "status": "active" }
]
},
"fleet": { "power_units": 25280, "trucks": 25280, "buses": 0, "drivers": 24116, "cdl_drivers": 23669 },
"hazmat": true,
"cargo": ["general_freight", "metal", "motor_vehicles", "intermodal_containers", "refrigerated_food", "other"],
"safety_rating": { "rating": "satisfactory", "date": "1992-05-08", "review_date": "1992-01-31" },
"address": { "street": "615 J B HUNT CORPORATE DRIVE", "city": "LOWELL", "state": "AR", "zip": "72745", "country": "US" },
"phone": "4798200000",
"mcs150": { "date": "2025-07-07", "mileage": 1629835251, "mileage_year": 2024 },
"added": "1974-06-01",
"url": "https://safer.fmcsa.dot.gov/query.asp?searchtype=ANY&query_type=queryCarrierSnapshot&query_param=USDOT&query_string=80806",
"credits_used": 1,
"cached": false
}
Act on the status
status |
What it means | What to do | Billed |
|---|---|---|---|
found |
FMCSA has a registration for the number. | Check usdot_status, then the authority entry that matches the job: a broker needs active broker authority, a for-hire carrier active property authority. |
Yes, and cached 24 hours |
not_found |
FMCSA has no registration for the number (reason: "not_registered"). |
Check the number. A docket that was never granted, or a USDOT number that does not exist, is not registered. | No |
invalid |
The value cannot be a USDOT number or a docket number (reason: "invalid_number"). FMCSA is not asked. |
Send digits in dot_number, or MC, FF or MX and digits in mc_number. |
No |
Answers other than found are never cached, so the next request reads the FMCSA data again.
How the lookup works
- The number is parsed. A USDOT number loses its prefix, spaces and hyphens and its leading zeros, and must have 1 to 8 digits other than all zeros. A docket number loses spaces,
#, dots and hyphens, keeps itsMC,FForMXprefix (MCwhen there is none) and its digits without leading zeros. - Three FMCSA datasets published on data.transportation.gov are read at once: the Company Census File (
az4n-8mr2) for the registration, and for the authorities the Motus file (inys-ebih) and the licensing file of the previous system (6eyk-hxee), where dockets are written with 6 digits and USDOT numbers with 8. - For a docket, the Company Census File is searched by the first docket of each carrier. When that finds nothing, the USDOT number the authority records give is used to read the carrier, so a docket listed second or third is still found.
- Authority entries come from Motus. When Motus has none for the carrier, they come from the legacy file, where each docket has a common carrier, a contract carrier and a broker authority, each active, pending or inactive.
The data is what FMCSA publishes: fleet, drivers, cargo and mileage are what the carrier declared on its last MCS-150, so an old mcs150.date means old figures. Insurance filings, inspections, crashes and safety scores are not in these datasets and are not returned: read them on SAFER through url.
Look up a docket with a test key
Test keys return a sample carrier without reading the FMCSA data: the number 9999999, as a USDOT or a docket number, returns not_found, and any other valid number returns the sample below. With a test key in QELKA_API_KEY, this request returns:
curl https://api.qelka.com/v1/dot/carrier \
--max-time 30 \
-H "Authorization: Bearer $QELKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"mc_number": "MC-900001"}'
const response = await fetch('https://api.qelka.com/v1/dot/carrier', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.QELKA_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ mc_number: 'MC-900001' }),
signal: AbortSignal.timeout(30_000),
})
const result = await response.json()
console.log(result)
import os
import requests
api_key = os.environ["QELKA_API_KEY"]
response = requests.post(
"https://api.qelka.com/v1/dot/carrier",
headers={"Authorization": f"Bearer {api_key}"},
json={"mc_number": "MC-900001"},
timeout=30,
)
result = response.json()
print(result)
{
"id": "lkp_01M8CG3H4PXK7W2ZQ9RDN5TB6C",
"object": "dot_carrier",
"input": "MC-900001",
"query": "mc_number",
"status": "found",
"reason": null,
"dot_number": "1000001",
"legal_name": "ACME WIDGETS TRUCKING LLC",
"dba_name": "ACME FREIGHT",
"usdot_status": "active",
"operation": "interstate",
"classifications": ["AUTHORIZED FOR HIRE"],
"dockets": ["MC900001"],
"authority": {
"status": "active",
"source": "motus",
"entries": [
{ "docket": "MC900001", "type": "Motor Carrier of Property (Except Household Goods)", "status": "active" }
]
},
"fleet": { "power_units": 12, "trucks": 12, "buses": 0, "drivers": 14, "cdl_drivers": 14 },
"hazmat": false,
"cargo": ["general_freight", "refrigerated_food"],
"safety_rating": { "rating": "satisfactory", "date": "2024-01-15", "review_date": "2023-12-01" },
"address": { "street": "1 TEST WAY", "city": "SPRINGFIELD", "state": "IL", "zip": "62701", "country": "US" },
"phone": "2175550100",
"mcs150": { "date": "2026-03-01", "mileage": 1250000, "mileage_year": 2025 },
"added": "2015-06-10",
"url": "https://safer.fmcsa.dot.gov/query.asp?searchtype=ANY&query_type=queryCarrierSnapshot&query_param=USDOT&query_string=1000001",
"credits_used": 0,
"cached": false
}
Errors
| Status | Type | When |
|---|---|---|
| 400 | invalid_request | Both or neither of dot_number and mc_number, one of them empty or longer than 20 characters, a body that is not a JSON object, or a field the request table does not list |
| 401 | invalid_api_key | The key is missing, unknown or revoked |
| 402 | insufficient_credits | Your balance is less than 1 credit (live keys only) |
| 403 | forbidden | The key is restricted to other endpoints |
| 405 | invalid_request | The method is not POST |
| 429 | rate_limited | Too many requests: wait Retry-After seconds |
| 500 | internal_error | Unexpected error on our side: retry with backoff |
| 502 | upstream_unavailable | data.transportation.gov could not be reached, answered with an error or did not answer in time: retry later |
No error is billed. A number that is not registered is not an error: it is a 200 with status: "not_found", and one that cannot be a USDOT or docket number is a 200 with status: "invalid".
Related
- DOT carrier lookup API
- Free tools: DOT number lookup, MC number lookup
- Batch: up to 100 carriers in one call, each item with
type: "dot_carrier" - Bulk: a whole column of USDOT or docket numbers with
type=dot_carrier - Caching, Errors, Test mode