API Documentation

Run UXLens audits programmatically. Create an API key, send a POST, get results.

Quick start

  1. 1.Go to API Keys and create a key.
  2. 2.Send a POST request to /api/audit/submit with your key in the Authorization header.
  3. 3.Poll /api/audit/status?jobId=... until status is completed.
  4. 4.Fetch the full report from /api/audit/result/[jobId].

Authentication

All API requests require your API key in the Authorization header:

Authorization: Bearer ux_live_abc123...

Keep your API key secret. Do not commit it to source control or expose it in client-side code.

Submit an audit

curl -X POST https://uxlens.io/api/audit/submit \
  -H "Authorization: Bearer ux_live_abc123..." \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Response:

{
  "jobId": "audit_1720123456789_abc",
  "status": "processing",
  "estimatedCost": 1
}

Check status

curl https://uxlens.io/api/audit/status?jobId=audit_1720123456789_abc \
  -H "Authorization: Bearer ux_live_abc123..."
{
  "status": "completed",
  "progress": 100,
  "step": "report"
}

Get results

curl https://uxlens.io/api/audit/result/audit_1720123456789_abc \
  -H "Authorization: Bearer ux_live_abc123..."

Returns the full audit report with scores, issues by category (UX, UI, accessibility, performance), and detailed findings.

Rate limits

PlanCredits/monthConcurrent audits
Free3,0001
Pro40,0002
Developer80,0005
Power150,00010

Error handling

CodeMeaning
400Invalid URL or missing parameters
401Missing or invalid API key
402Insufficient credits
429Rate limit exceeded
500Internal error — retry with backoff

Questions? Email support@uxlens.io