01 · Quickstart
Make your first request
Send your API key in the X-API-Key header. The search endpoint accepts filters for entity type, geography, fleet size, safety, contacts and federal awards.
curl "https://freightsguard.com/api/data/search?type=carrier&state=TX&minUnits=25&limit=5" \
-H "X-API-Key: fg_live_your_api_key"{
"results": [{
"dotNumber": "1843912",
"mcNumber": "MC-665901",
"legalName": "LONE STAR FREIGHT LLC",
"entityType": "carrier",
"address": { "city": "Dallas", "state": "TX" },
"fleet": { "powerUnits": 64, "totalDrivers": 71 },
"safety": {
"safetyRating": "S",
"sms": { "hasSmsData": true }
}
}],
"pagination": {
"page": 1, "limit": 5, "total": 18423,
"pages": 3685, "hasMore": true
}
}02 · Authentication
Use X-API-Key on every data request
Keys begin with fg_live_ in production. Keep the key server-side; never place it in public browser code or commit it to source control.
FreightGuard stores only a SHA-256 hash of your key. Rotating it invalidates the old key immediately, and the replacement is shown once.
X-API-Key: fg_live_your_api_key03 · Search
GET /api/data/search
Returns active carriers and brokers with normalized identity, contact, fleet, authority, safety and contract fields.
| Parameter | Type | Description |
|---|---|---|
q | string | Company, DBA, city, DOT or MC search |
type | enum | carrier, broker or all |
state | string | Two-letter US state code |
city | string | Case-insensitive city match |
minUnits / maxUnits | integer | Power-unit range |
safety | enum | S, C or U safety rating |
hasEmail / hasPhone | boolean | Require contact fields |
hasContract | boolean | Require federal awards |
page / limit | integer | Pagination; limit max is 100 |
sort / order | enum | name, powerUnits, state, safety; asc or desc |
04 · Entity lookup
GET /api/data/dot/:dotNumber
Returns the full record for one USDOT number, including nested SMS BASIC measures, authority, cargo types, OSHA data and federal awards when available.
curl "https://freightsguard.com/api/data/dot/1843912" \
-H "X-API-Key: fg_live_your_api_key"05 · Enrichment datasets
Additional endpoints
GET /api/data/stats/summaryAggregate freight market counts, states, cargo and safety distribution
GET /api/data/states/:statePaginated entities for one US state
GET /api/data/crashesNHTSA FARS crashes filtered by state and year
GET /api/data/epaEPA ECHO facilities filtered by state, city and name
GET /api/data/fuel-pricesWeekly EIA diesel and gasoline prices
GET /api/data/export/csvPaid-plan CSV export with search-compatible filters
06 · Errors and limits
Predictable HTTP responses
| Status | Meaning | Action |
|---|---|---|
400 | Invalid parameter | Correct the request |
401 | Invalid API key | Check or rotate the key |
403 | Paid feature required | Upgrade the plan |
404 | Entity not found | Verify the DOT number |
429 | Daily limit reached | Wait for reset or upgrade |
500 | Server error | Retry with backoff |
Every response includes RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. A 429 response also includes Retry-After.