Skip to main content
POST
Site Audit

Overview

The Site Audit endpoint lets you check how healthy a page is across:
  • Performance
  • Accessibility
  • Best practices
  • SEO
Each audit returns an overall score from 0–100, individual category scores, detailed on-page metrics, approximate performance timings, and an optional snapshot of the page hero.
Each audit uses 1 credit from your balance.

Endpoint

Request Body

  • api_key (required) – Your GistMag API key. You can create and manage keys in the dashboard.
  • url (required) – The page URL to audit. Must be publicly accessible.
  • include_screenshot (optional, default: true) – Include a base64 snapshot of the hero/above-the-fold area.
  • source (optional, default: "web") – One of:
    • web
    • api
    • extension
    • wordpress
    • shopify
    • batch
    • tts
If an invalid value is provided for source, it is normalised to web.

Example Request

Response

Fields

  • audit_id – Unique identifier for the audit.
  • url – Final URL after redirects.
  • requested_url – URL as originally requested.
  • overall_score – Average of the four category scores.
  • categories – Object containing category-level scores and issues:
    • performance
    • accessibility
    • best_practices
    • seo
  • issues – Flattened list of issues with category prefixes for quick scanning.
  • metrics – Structured on-page metrics (titles, descriptions, headings, links, word count, indexability, etc.).
  • performance – Approximate timings:
    • load_time_ms
    • dom_content_loaded_ms
    • time_to_first_byte_ms
  • screenshot_base64 – Optional PNG screenshot of the hero/above-the-fold area, base64-encoded. Omitted when include_screenshot is false.

Errors

Common error responses include:
  • 400 – Missing or invalid url.
  • 401 – Invalid api_key.
  • 402 – Not enough credits (returned from the credit system).
  • 502 – Upstream fetch failed for the target URL.
Error bodies follow the standard error shape described in the API overview.