Website Audit API

Every request body the audit service accepts, with what each field does and what you get back. An audit runs as a job: you create it, then poll it or receive it on a webhook.

https://api.audit.vesqorai.com Authorization: Bearer <token> Content-Type: application/json

Payload builder

Choose the options and copy the body. Fields left at their default are left out of the JSON.

Depth
POST /v1/audits
curl

Create an audit

POST/v1/audits

Optional header Idempotency-Key: sending the same key again returns the job that already exists instead of starting a second audit. Use one key per site per run.

FieldTypeValues and limitsDefault
url requiredstringA public web address. Private, local and internal addresses are refused.—
depthstringfast, standard or full. Anything else is a 422. See the depth table below.standard
callbackUrlstringPublic address, up to 2048 characters. The finished report is POSTed here.no webhook
options.languagestringen, es or ru. Other values fall back to en without an error.en
options.pdfbooleanAlso render a PDF report.false
options.maxPagesnumber1–100. Values outside the range are clamped. Above 1, pages of the same site are found through the sitemap and the entry page's links.from depth
options.includePatternsstring[]Only pages whose address contains one of these are crawled. A value written as /…/ is a regular expression.all pages
options.excludePatternsstring[]Pages whose address contains one of these are skipped. Same syntax.none
options.includeSubdomainsbooleanAlso crawl sibling subdomains.false
options.respectRobotsTxtbooleanSet false only for a site you own: the crawl then visits pages robots.txt disallows.true

Depth

depthrobots.txt, sitemap, TLS, security headersGoogle PageSpeedPages by default
fastnono1
standardyesno1
fullyesyes, entry page25

options.extras and options.pagespeed are always set from depth; sending them has no effect. With fast, the security score is listed under unmeasured rather than scored 0.

Response 202

{
  "id": "6f1c2a9e-…",
  "status": "queued",
  "pdfRequested": true
}

Example payloads

Minimal
{ "url": "https://example.com" }
Quick check, no extras
{
  "url": "https://example.com",
  "depth": "fast"
}
One page, Spanish PDF
{
  "url": "https://example.com",
  "options": { "language": "es", "pdf": true }
}
Whole site, default 25 pages
{
  "url": "https://example.com",
  "depth": "full",
  "options": { "pdf": true }
}
Standard checks on 10 pages
{
  "url": "https://example.com",
  "depth": "standard",
  "options": { "maxPages": 10 }
}
Blog section only, via webhook
{
  "url": "https://example.com/blog/",
  "depth": "full",
  "callbackUrl": "https://hooks.example.net/audit",
  "options": {
    "maxPages": 40,
    "includePatterns": ["/blog/"],
    "excludePatterns": ["/tag/", "/^.*\\?page=\\d+$/"]
  }
}
Your own site, every field
{
  "url": "https://example.com",
  "depth": "full",
  "callbackUrl": "https://hooks.example.net/audit",
  "options": {
    "language": "ru",
    "pdf": true,
    "maxPages": 100,
    "respectRobotsTxt": false,
    "includePatterns": [],
    "excludePatterns": ["/cart", "/account"],
    "includeSubdomains": true
  }
}

Poll the job

GET/v1/audits/{id}
queued→running→doneorfailed

Poll every few seconds. A finished report is kept for about an hour, so collect it soon after it is done.

running (multi-page)
{
  "id": "6f1c2a9e-…",
  "status": "running",
  "pdfRequested": true,
  "progress": {
    "pagesAudited": 7,
    "pagesTotal": 25,
    "phase": "crawl"
  }
}
done
{
  "id": "6f1c2a9e-…",
  "status": "done",
  "pdfRequested": true,
  "pdfAvailable": true,
  "result": {
    "overallScore": 72,
    "scores": { "meta": 80, "security": 65, … },
    "summary": "Site score: 72 out of 100. …",
    "issues": [ … ],
    "pagesAudited": 25,
    "stoppedBy": "limit",
    …
  }
}

A failed job has "status": "failed" and an error string. "error": "interrupted" means the service restarted mid-audit; create the job again. With a webhook, a delivery object shows attempts and whether it arrived.

Download the PDF

GET/v1/audits/{id}/pdf
AnswererrorMeaning
200—The PDF file, application/pdf.
409pdf_not_readyStill queued or running. Wait for the Retry-After seconds and try again.
409pdf_not_requestedThe audit was created without "pdf": true.
409job_failedThe audit failed, so there is no PDF.
410pdf_expiredThe stored file is gone. Run the audit again.
500pdf_failedThe audit finished but the PDF could not be rendered. The JSON result is still available.

Webhook delivery

When callbackUrl is set, the service POSTs JSON there with User-Agent: VESQOR-SiteAudit/1.0. A failed delivery is retried after 1, 5 and 20 seconds. Answer with any 2xx.

Finished
{
  "id": "6f1c2a9e-…",
  "status": "done",
  "pdfRequested": true,
  "pdfBase64": "JVBERi0xLjcK…",
  "result": { … }
}
Failed or interrupted
{
  "id": "6f1c2a9e-…",
  "status": "failed",
  "error": "interrupted"
}

pdfBase64 is present only when a PDF was requested and rendered.

Errors

StatusWhenWhat to do
401Missing or wrong bearer token.Check the Authorization header.
404No job with this id, or its retention window passed.Create the audit again.
422Body is not a JSON object, url is missing or not public, depth is unknown, or callbackUrl is invalid. The detail field names the problem.Fix the body.
429Too many requests in a short time.Slow down and retry.
502The audit engine behind the API did not answer.Retry in a minute.
503The job store is unavailable.Retry in a minute; reuse the same Idempotency-Key.

Apify actor input

On Apify the actor takes a simpler input and calls this API for you, one page per URL at standard depth. It is charged per audited site, plus per PDF.

Minimal
{ "startUrls": [{ "url": "https://example.com" }] }
Every field
{
  "startUrls": [
    { "url": "https://example.com" },
    { "url": "https://shop.example.org/catalog" }
  ],
  "pdfReport": true,
  "reportLanguage": "en"
}
FieldValuesDefault
startUrls requiredArray of { "url": "…" }; plain strings are accepted too.—
pdfReporttrue / falsefalse
reportLanguageen, es, ruen