HubSEOhubseoDocs
REST API & Webhooks

Audits API

Read measured audit results and fix directives for audits run in HubSEO. Creating audits through the API is not available yet.

The Audits API lets applications and CI/CD pipelines read audits that were run in HubSEO at /seo-audit. Creating an audit through the API is not implemented yet.

Trigger an Audit (not available)

POST /api/v1/audits

The request body is validated (url required, device one of "mobile" or "desktop"). A body that fails validation returns 422. A valid request returns 501, because no API audit queue exists:

Response (501 Not Implemented)

{
  "error": {
    "code": "not_implemented",
    "message": "Creating audits through the API is not available yet. Run audits at /seo-audit."
  }
}

Get Audit Result

Retrieve a completed audit report you own.

GET /api/v1/audits/{id}

Response (200 OK)

{
  "data": {
    "id": "aud_01j7x4m8p2q9",
    "status": "completed",
    "url": "https://example.com",
    "overall_score": 88,
    "scores": {
      "performance": 82,
      "seo": 95,
      "accessibility": 91,
      "best_practices": 85
    },
    "core_web_vitals": {
      "status": "needs_improvement",
      "metrics": {
        "lcp_ms": 1820,
        "cls": 0.04,
        "inp_ms": 120,
        "fcp_ms": 1100,
        "ttfb_ms": 320
      },
      "diagnostics": {
        "lcp_element_selector": "header > h1.hero-title",
        "render_blocking_resources": []
      }
    },
    "findings_summary": {
      "critical": 1,
      "warning": 3,
      "passed": 28
    },
    "created_at": "2026-09-14T16:00:00.000Z"
  }
}

Get AI-Ready Fix Directives

Retrieve dual-sided fix prompts formatted for human reviewers and coding agents (Cursor, Claude Code, Copilot).

GET /api/v1/audits/{id}/fixes

Response (200 OK)

{
  "data": [
    {
      "id": "fix_cwv_lcp_preload",
      "category": "performance",
      "severity": "high",
      "human_summary": "Preload hero image to eliminate LCP render delay.",
      "why_it_matters": "Hero image is largest element, browser discovers it late.",
      "agent_prompt": "Inspect index.html. Add <link rel=\"preload\" fetchpriority=\"high\" as=\"image\" href=\"/assets/hero.webp\"> inside <head>."
    }
  ]
}

On this page