Developers
POST /api/audit
Audit a documentation URL. Returns a 0–100 score, six dimension scores and up to three evidence-backed alerts.
API v1.0.0 (stable) · Last updated 2026-10-10 · Changelog
Docs: Overview · POST /api/audit · Errors · Changelog · OpenAPI
Audit a documentation URL.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
url |
string (URI) | yes | Public http(s) URL of your API docs, e.g. https://docs.stripe.com/api. Private, localhost and IP-range hosts are rejected. |
Response 200
| Field | Type | Description |
|---|---|---|
url |
string | The audited URL. |
overall |
integer 0–100 | Overall LLM-readiness score. |
summary |
string | Two-sentence summary. |
dimensions |
Dimension[6] | One per dimension: key, label, score (0–100), rationale. Keys: structure, code_examples, reference_completeness, machine_readability, auth_errors, freshness_versioning. |
alerts |
Alert[≤3] | Top issues: severity (high/medium/low), title, fix, status (confirmed / to_verify), evidence. |
alerts[].evidence |
object | url, quote (snippet from the fetched page) or status (HTTP code), confidence (high/medium/low), verified (quote matched against fetched text). |
checks |
object | Raw deterministic results: openapi (discovery hits), links (checked, broken), unreadable pages. |
signals |
object | llms_txt, llms_full_txt, openapi_found, openapi_files, pages_analyzed. |
pages |
object[] | Pages read: url, chars, readable, note. |
cached |
boolean | True if served from the 24 h cache. |
auditedAt |
string (date-time) | When the audit ran. |
Example:
{
"url": "https://docs.example.com/api",
"overall": 72,
"summary": "Solid reference with an OpenAPI spec; no llms.txt and two broken links.",
"dimensions": [{ "key": "machine_readability", "label": "Machine Readability", "score": 55, "rationale": "OpenAPI spec found, but no /llms.txt." }],
"alerts": [{ "severity": "high", "title": "No llms.txt found", "fix": "Publish /llms.txt listing your key docs pages.", "status": "confirmed",
"evidence": { "url": "https://docs.example.com/llms.txt", "quote": "404 Not Found", "confidence": "high", "verified": true } }],
"signals": { "llms_txt": false, "llms_full_txt": false, "openapi_found": true, "pages_analyzed": 8 },
"cached": false,
"auditedAt": "2026-10-10T20:00:00.000Z"
}
Processing the result
Typical use: fail a CI job when the score drops, or list the confirmed issues.
const audit = await (await fetch("https://getdocscout.com/api/audit", {
method: "POST", headers: { "Content-Type": "application/json" },
body: JSON.stringify({ url: "https://docs.example.com" }),
})).json();
const weakest = [...audit.dimensions].sort((a, b) => a.score - b.score)[0];
console.log(`Overall ${audit.overall}/100, weakest: ${weakest.label} (${weakest.score})`);
for (const a of audit.alerts.filter((a) => a.status === "confirmed")) {
const ev = a.evidence ?? {};
console.log(`[${a.severity}] ${a.title}
fix: ${a.fix}
evidence: ${ev.url} ${ev.quote ? "“" + ev.quote + "”" : "HTTP " + ev.status}`);
}
if (audit.overall < 70) process.exit(1); // gate your docs pipeline
import requests
audit = requests.post("https://getdocscout.com/api/audit", json={"url": "https://docs.example.com"}, timeout=120).json()
by_key = {d["key"]: d["score"] for d in audit["dimensions"]}
print("overall", audit["overall"], "machine readability", by_key["machine_readability"])
high = [a for a in audit["alerts"] if a["severity"] == "high" and a["status"] == "confirmed"]
for a in high:
ev = a.get("evidence", {})
print(a["title"], "->", a["fix"], "|", ev.get("url"), ev.get("confidence"))
# jq: score and alert titles
curl -s -X POST https://getdocscout.com/api/audit -H "Content-Type: application/json" \
-d '{"url":"https://docs.example.com"}' | jq '{overall, alerts: [.alerts[] | {severity, title, status}]}'
Errors are documented on the Errors page.