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. (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.

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?"
}
→ 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 https://x3api.com/api/search?q=... — verified CFR / corpus search
GET /api/search?q=drug+testing+pool&limit=6
→ 200 OK
{
  "results": [
    { "type": "cfr",
      "citation": "49 CFR 382.305",
      "title": "Random testing",
      "snippet": "..." }
  ]
}
GET https://x3api.com/api/carrier?dot=... — carrier safety by USDOT
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": "..."
}
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.

402 Payment Required

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.

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.