HubSEOhubseoDocs
REST API & Webhooks

REST API Overview

Programmatic access to HubSEO technical crawls, AI search readiness, and webhook event streams.

The HubSEO REST API (v1) enables developers, CLI pipelines, and AI coding agents (Cursor, Claude Code, Copilot, Codex, Aider) to trigger technical audits, inspect Core Web Vitals diagnostics, and stream real-time ranking events.

Interactive API Explorer

Queue a live technical audit programmatically, inspect request format, and review the JSON response telemetry:

POST/api/v1/audits
200 OK ยท 142ms

Queue Headless SEO & CWV Audit

Executes a live SSRF-safe crawl with Lighthouse lab metrics and Core Web Vitals diagnostics.

curl -X POST "https://hubseo.dev/api/v1/audits" \
  -H "Authorization: Bearer hub_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "device": "mobile",
    "generate_fix_packs": true,
    "verify_ssl": true
  }'

Authentication

Every API request must include a secret API key via the standard Authorization or X-API-Key HTTP headers:

Authorization: Bearer hub_live_YOUR_API_KEY

or

X-API-Key: hub_live_YOUR_API_KEY

Zero Plaintext Storage

HubSEO generates 24-byte cryptographically secure keys with a hub_live_ or hub_test_ prefix. Only the SHA-256 hash of each key is stored in PostgreSQL. Raw keys are shown exactly once in the Developer Portal and cannot be recovered if misplaced.

Scopes and Permissions

API keys can be scoped to limit access across individual subsystems. Choose scopes when you create a key in Dashboard โ†’ Developers:

ScopeDescription
projects:readList your projects (sites) and their ids, which other endpoints take
audits:readRetrieve completed audit reports, CWV metrics, and ranked issues
audits:writeQueue on-demand technical audits and Lighthouse lab crawls
site-health:readRead Site Health runs, results and history
site-health:writeStart Site Health crawls for your sites (must be granted explicitly)
geo:readQuery Generative Engine Optimization (GEO) brand visibility and citation rate
backlinks:readQuery live referring domain graphs and authority scores
webhooks:manageCreate, configure, and ping webhook endpoint subscriptions

These scopes are used by the API but can't yet be chosen for new keys: keywords:read, experiments:read and experiments:write.

Rate Limits

Rate limits are enforced per API key using a sliding 60-second window:

Plan TierRate LimitBurst Allowance
Free / Starter60 req / min10 req / sec
Growth Pro120 req / min20 req / sec
Agency Team600 req / min50 req / sec

When a key exceeds its limit, the 429 response includes:

  • X-RateLimit-Limit: Maximum permitted requests in the current window.
  • X-RateLimit-Remaining: Remaining allowance in the current window.
  • X-RateLimit-Reset: Seconds until the window resets.
  • Retry-After: Seconds to wait before retrying.

Errors and Response Format

All responses follow the RFC 7807 JSON error specification:

{
  "error": {
    "code": "unauthorized",
    "message": "Invalid API key provided.",
    "request_id": "req_01j7x9k1m2n3p4q5r6s7t8u9v0"
  }
}

API Subsystems

On this page