Metrix

API documentation

Public, anonymous website performance, SEO, AI-search and security analysis API. No authentication required; all endpoints are rate limited per IP and anonymous session. Reports are public and read-only at /report?id={reportId}.

OpenAPI 3.1 JSONBase URL: http://localhost:3000Version 1.0.0

Quick start

# 1. Submit a scan (returns 202 + scan id, or 200 with a cached report)
curl -X POST http://localhost:3000/api/scans \
  -H 'content-type: application/json' \
  -d '{"url":"https://example.com","device":"MOBILE"}'

# 2. Poll progress (or subscribe to /api/scans/{id}/events for SSE)
curl http://localhost:3000/api/scans/{id}/status

# 3. Fetch the full report, or a single section
curl http://localhost:3000/api/scans/{id}/report
curl http://localhost:3000/api/scans/{id}/seo

# 4. Public report by report id (also the shareable web URL /report?id={reportId})
curl http://localhost:3000/api/reports/{reportId}
curl -o report.pdf http://localhost:3000/api/reports/{reportId}/pdf

Rate limits apply per IP and anonymous session. When a 429 response includes challengeRequired: true, request GET /api/challenge, solve the proof-of-work (find a nonce so that sha256("token:nonce") starts with the given number of hex zeros) and resubmit with the challenge field.

Scans

post/api/scansSubmit a URL for analysis

Anonymous. Rate-limited per IP and per session. Returns 202 when a new scan is queued or 200 when a recent cached report is reused. May return 429 with challengeRequired=true; obtain a challenge from GET /api/challenge and resubmit with the solution.

200 Cached report returned202 Scan queued400 Invalid URL or blocked destination429 Rate limited or challenge required503 Queue full/unavailable
get/api/scansRecent completed scans
  • limit (query)
200 List
get/api/scans/{id}Scan metadata
  • ()
200 Scan404 Not found
get/api/scans/{id}/statusScan progress (polling)
  • ()
200 Progress event404 Not found
get/api/scans/{id}/eventsScan progress (Server-Sent Events)

text/event-stream with `progress` events and a final `done` event.

  • ()
200 SSE stream
post/api/scans/{id}/rescanRe-run a scan
  • ()
202 New scan queued429 Rate limited

Reports

get/api/scans/{id}/reportFull report
  • ()
200 Full report with all sections404 Not found409 Not ready
get/api/reports/{reportId}Public report by report id
  • ()
200 Report202 Scan still running404 Not found410 Expired
get/api/reports/{reportId}/pdfDownload report as PDF
  • ()
200 PDF document404 Not found

Report sections

get/api/scans/{id}/performancePerformance metrics, opportunities & resource summary
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/core-web-vitalsCore Web Vitals (lab + CrUX field data when available)
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/waterfallNetwork waterfall resources
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/seoTechnical & on-page SEO results and issues
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/ai-seoAI search readiness analysis
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/geoGenerative Engine Optimization analysis
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/schemaStructured data validation
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/sitemapSitemap analysis
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/robotsrobots.txt analysis and crawler access table
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/backlinksBacklink data (provider-backed; honest unavailable state otherwise)
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/securityHTTPS, certificate, headers, cookies, mixed content
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/accessibilityLighthouse accessibility audits
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/recommendationsPrioritized recommendations across all modules
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/pagesCrawled pages
  • ()
200 Section payload404 Not found409 Not ready
get/api/scans/{id}/lighthouseRaw Lighthouse audits
  • ()
200 Section payload404 Not found409 Not ready

Abuse protection

get/api/challengeObtain an anti-abuse challenge

Returns a proof-of-work challenge: find a nonce such that sha256(`${token}:${nonce}`) starts with `difficulty` hex zeros. If a Turnstile site key is returned, a Turnstile token may be used instead.

200 Challenge

System

get/api/healthService health
200 Healthy503 Degraded

Schemas

Request and response schemas are defined in the OpenAPI document under components.schemas: ScanId, ReportId, CreateScanResponse, ScanSummary, ErrorResponse, CreateScanRequest, ProgressEvent, FullReport, Challenge.