REST API v1

API documentation

REST API v1

Build freight intelligence into any workflow.

JSON endpoints for carrier discovery, verification, safety screening and market enrichment. All dates are ISO 8601 and daily limits reset at 00:00 UTC.

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.

bash
curl "https://freightsguard.com/api/data/search?type=carrier&state=TX&minUnits=25&limit=5" \
  -H "X-API-Key: fg_live_your_api_key"
json
{
  "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.

Key security

FreightGuard stores only a SHA-256 hash of your key. Rotating it invalidates the old key immediately, and the replacement is shown once.

http
X-API-Key: fg_live_your_api_key

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.

bash
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/summary

Aggregate freight market counts, states, cargo and safety distribution

GET /api/data/states/:state

Paginated entities for one US state

GET /api/data/crashes

NHTSA FARS crashes filtered by state and year

GET /api/data/epa

EPA ECHO facilities filtered by state, city and name

GET /api/data/fuel-prices

Weekly EIA diesel and gasoline prices

GET /api/data/export/csv

Paid-plan CSV export with search-compatible filters

06 · Errors and limits

Predictable HTTP responses

StatusMeaningAction
400Invalid parameterCorrect the request
401Invalid API keyCheck or rotate the key
403Paid feature requiredUpgrade the plan
404Entity not foundVerify the DOT number
429Daily limit reachedWait for reset or upgrade
500Server errorRetry with backoff
Rate-limit headers

Every response includes RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. A 429 response also includes Retry-After.