X3 API is simple REST + JSON. Authenticate with a key, then call three core endpoints — search the verified 49 CFR, ask a grounded agent, or pull a carrier by USDOT. Every answer is cited.
Pass your key in the Authorization header as a bearer token. (x-api-key works too.) Usage is pooled across your account’s keys; the free sandbox includes $5 of data and decision calls a month.
curl https://x3api.com/api/search?q=hours+of+service \
-H "Authorization: Bearer YOUR_API_KEY"
{
"question": "What are the HOS 14-hour rule limits?"
}
→ 200 OK
{
"ok": true,
"answer": "**Short answer** ... (49 CFR 395.3(a)(2)) ...",
"citation": "49 CFR 395.3",
"unverified_quotes": 0,
"notice": "Compliance information, not legal advice ..."
}
GET /api/search?q=drug+testing+pool&limit=6
→ 200 OK
{
"results": [
{ "type": "cfr",
"citation": "49 CFR 382.305",
"title": "Random testing",
"snippet": "..." }
]
}
GET /api/carrier?dot=1000001
→ 200 OK
{
"ok": true,
"dot": "1000001",
"legal_name": "SAMPLE CARRIER LLC",
"usdot_status": "ACTIVE",
"basics": { "unsafe_driving": { "percentile_pct": 42, "alert": false } },
"source": "CarrierOK", "as_of": "..."
}
Success. JSON body with the fields shown above.
Missing or invalid key — check your Authorization header.
A sandbox key called an AI endpoint, or this month’s included usage is used up — add usage or upgrade in the console. Failed calls are not charged.
Rate limit reached. Back off and retry, or upgrade your plan.
Bad input or a transient server error — retry with backoff.