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. Keys are scoped per project; the free developer tier includes 1,000 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?",
"domain": "hos"
}
→ 200 OK
{
"answer": "The 14-hour limit under §395.3(a)(2) ...",
"citations": ["49 CFR 395.3"],
"grounded": true
}
GET /api/search?q=drug+testing+pool&limit=6
→ 200 OK
{
"results": [
{ "section": "49 CFR 382.305",
"title": "Random testing",
"text": "Every employer shall ..." }
]
}
{ "dot": "1000001" }
→ 200 OK
{
"legal_name": "SAMPLE CARRIER LLC",
"authority": "Active",
"safety_rating": "Satisfactory",
"basics": [ { "name": "Unsafe Driving", "percentile": 42 } ]
}
Success. JSON body with the fields shown above.
Missing or invalid key — check your Authorization header.
Rate limit reached. Back off and retry, or upgrade your plan.
Bad input or a transient server error — retry with backoff.