X3 API Get a key
Developer quickstart

Ship cited compliance in one afternoon.

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.

1 · Authenticate

Send your key on every request.

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.

Authorization header
curl https://x3api.com/api/search?q=hours+of+service \
  -H "Authorization: Bearer YOUR_API_KEY"
2 · Call an endpoint

Three endpoints do most of the work.

POST https://x3api.com/api/ask — grounded agent answer
{
  "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 https://x3api.com/api/search?q=... — verified CFR / corpus search
GET /api/search?q=drug+testing+pool&limit=6
→ 200 OK
{
  "results": [
    { "section": "49 CFR 382.305",
      "title": "Random testing",
      "text": "Every employer shall ..." }
  ]
}
POST https://x3api.com/api/carrier — carrier safety by USDOT
{ "dot": "1000001" }
→ 200 OK
{
  "legal_name": "SAMPLE CARRIER LLC",
  "authority": "Active",
  "safety_rating": "Satisfactory",
  "basics": [ { "name": "Unsafe Driving", "percentile": 42 } ]
}
3 · Handle responses

Predictable status codes.

200 OK

Success. JSON body with the fields shown above.

401 Unauthorized

Missing or invalid key — check your Authorization header.

429 Too Many Requests

Rate limit reached. Back off and retry, or upgrade your plan.

400 / 500

Bad input or a transient server error — retry with backoff.

Decision support, not legal advice. X3 API returns cited, regulation-grounded information from published sources. It is not legal advice and is not affiliated with FMCSA or USDOT. Verify against the current controlling regulation.
Part of X3 Fleet Safety211 grounded AI compliance agents across 20 products, on one verified brain.