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.
Payload builder
Choose the options and copy the body. Fields left at their default are left out of the JSON.
Create an audit
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.
| Field | Type | Values and limits | Default |
|---|---|---|---|
url required | string | A public web address. Private, local and internal addresses are refused. | — |
depth | string | fast, standard or full. Anything else is a 422. See the depth table below. | standard |
callbackUrl | string | Public address, up to 2048 characters. The finished report is POSTed here. | no webhook |
options.language | string | en, es or ru. Other values fall back to en without an error. | en |
options.pdf | boolean | Also render a PDF report. | false |
options.maxPages | number | 1–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.includePatterns | string[] | Only pages whose address contains one of these are crawled. A value written as /…/ is a regular expression. | all pages |
options.excludePatterns | string[] | Pages whose address contains one of these are skipped. Same syntax. | none |
options.includeSubdomains | boolean | Also crawl sibling subdomains. | false |
options.respectRobotsTxt | boolean | Set false only for a site you own: the crawl then visits pages robots.txt disallows. | true |
Depth
| depth | robots.txt, sitemap, TLS, security headers | Google PageSpeed | Pages by default |
|---|---|---|---|
fast | no | no | 1 |
standard | yes | no | 1 |
full | yes | yes, entry page | 25 |
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
{ "url": "https://example.com" }{
"url": "https://example.com",
"depth": "fast"
}{
"url": "https://example.com",
"options": { "language": "es", "pdf": true }
}{
"url": "https://example.com",
"depth": "full",
"options": { "pdf": true }
}{
"url": "https://example.com",
"depth": "standard",
"options": { "maxPages": 10 }
}{
"url": "https://example.com/blog/",
"depth": "full",
"callbackUrl": "https://hooks.example.net/audit",
"options": {
"maxPages": 40,
"includePatterns": ["/blog/"],
"excludePatterns": ["/tag/", "/^.*\\?page=\\d+$/"]
}
}{
"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
Poll every few seconds. A finished report is kept for about an hour, so collect it soon after it is done.
{
"id": "6f1c2a9e-…",
"status": "running",
"pdfRequested": true,
"progress": {
"pagesAudited": 7,
"pagesTotal": 25,
"phase": "crawl"
}
}{
"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
| Answer | error | Meaning |
|---|---|---|
| 200 | — | The PDF file, application/pdf. |
| 409 | pdf_not_ready | Still queued or running. Wait for the Retry-After seconds and try again. |
| 409 | pdf_not_requested | The audit was created without "pdf": true. |
| 409 | job_failed | The audit failed, so there is no PDF. |
| 410 | pdf_expired | The stored file is gone. Run the audit again. |
| 500 | pdf_failed | The 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.
{
"id": "6f1c2a9e-…",
"status": "done",
"pdfRequested": true,
"pdfBase64": "JVBERi0xLjcK…",
"result": { … }
}{
"id": "6f1c2a9e-…",
"status": "failed",
"error": "interrupted"
}pdfBase64 is present only when a PDF was requested and rendered.
Errors
| Status | When | What to do |
|---|---|---|
| 401 | Missing or wrong bearer token. | Check the Authorization header. |
| 404 | No job with this id, or its retention window passed. | Create the audit again. |
| 422 | Body 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. |
| 429 | Too many requests in a short time. | Slow down and retry. |
| 502 | The audit engine behind the API did not answer. | Retry in a minute. |
| 503 | The 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.
{ "startUrls": [{ "url": "https://example.com" }] }{
"startUrls": [
{ "url": "https://example.com" },
{ "url": "https://shop.example.org/catalog" }
],
"pdfReport": true,
"reportLanguage": "en"
}| Field | Values | Default |
|---|---|---|
startUrls required | Array of { "url": "…" }; plain strings are accepted too. | — |
pdfReport | true / false | false |
reportLanguage | en, es, ru | en |
