Overview
The Site Audit API runs Scrunch’s AI search readiness audit against any URL on a brand’s domain. Each audit fetches the page, runs the same checks that power the Site Audit stage of the optimize-and-deploy pipeline, and returns a per-check result, an overall score, and a rendered preview of what AI crawlers see. Use it to audit pages on demand from your own automation — for example, after a publish, as part of a CI gate, or to backfill audits for a list of priority URLs.What the Site Audit API includes
- Queue one or many URLs for audit in a single call
- Audit status and timestamps (
pending,running,completed,failed) - Per-check results for the AI search readiness suite (robots, rendering, schema, content quality, and more)
- An overall audit score
- An AI preview (markdown) showing what AI crawlers extract from the page
- A visitor preview image for the rendered page
- Filtering and pagination over the brand’s audit history
audit.completed webhook on completion.
When to use the Site Audit API
Use the Site Audit API when you need to:- Trigger an audit immediately after publishing or updating a page
- Re-audit a set of priority URLs on a schedule
- Pull audit results into a custom dashboard or report
- Programmatically gate a deploy on the audit outcome
Endpoints
| Method | Path | Purpose |
|---|---|---|
| POST | /{brand_id}/page-audits | Queue one or more URLs for audit. |
| GET | /{brand_id}/page-audits | List audits in reverse chronological order. |
| GET | /{brand_id}/page-audits/{page_audit_id} | Get a single audit, including check results. |
POST requires a bearer token with configure scope. The GET endpoints require query scope. See Authentication.
URLs are normalized and deduplicated before being queued. URLs outside the brand’s registered domains are rejected.
Filters
The list endpoint supports:| Filter | Description |
|---|---|
status | Restrict to pending, running, completed, or failed. |
url | Case-insensitive substring match on the audited URL. |
limit | Page size (default 100). |
offset | Offset for pagination. |
Example: queue audits
pending. Poll the detail endpoint or subscribe to the audit.completed webhook to know when results are ready.
Example: fetch an audit result
status is pending or running and result is null.
Example: list recent failed audits
Limits and behavior
POSTaccepts up to 100 URLs per call. Submit larger batches across multiple requests.- Submissions are rate-limited at 60 audits per minute per brand.
- URLs are normalized (trailing slash, casing) and deduplicated before queueing, so resubmitting the same URL in a batch returns a single ID.
- Audits run asynchronously. Typical completion is under a minute; complex pages can take longer.
- Audits older than the brand’s retention window are pruned from the list endpoint.
Best practices
- Prefer the
audit.completedwebhook over polling — it fires the moment results are available. - Store
page_audit_idalongside your internal record so you can correlate webhook deliveries back to the URL that triggered them. - Use the
urlfilter on the list endpoint to find the latest audit for a specific page without scanning history. - For end-to-end “audit, optimize, deploy” automation, use the optimize-and-deploy pipeline instead of orchestrating these endpoints by hand.