lovablehtml logo - turn your SPA into a crawler-friendly websiteBLOGAPI PLATFORMPRICING

SEO Audit API

Trigger on-demand SEO audits for your domains.

Trigger on-demand SEO audits for your domains. The crawler discovers pages, checks for SEO issues, and reports back. Only one audit can run per domain at a time.

POST/api/seo-spider/runs

Start a new SEO audit run for a domain. The crawler will discover and analyze pages based on the selected mode.

Request Body

ParameterTypeDescription
domainrequiredstringDomain to audit (e.g., "your-app.com").
urlsrequiredstring[]Seed URLs to crawl (min 1, must be valid URLs). All URLs must belong to the target domain. In follow mode, typically just the homepage.
moderequired"follow" | "selected" | "sitemap"follow — spider from seed URLs following links. selected — only audit the specified URLs. sitemap — discover URLs from the domain's sitemap.
allowSamplingbooleanEnable URL pattern sampling on the crawler. Default: true.
newPagesOnlybooleanOnly audit new or updated pages since the last completed run (sitemap mode). Default: false.
sitemapUrlstring (URL)Custom sitemap URL override. Falls back to the domain's configured sitemap if omitted.

Response Body

json
CopyDownload
{
"ok": true,
"runId": "a1b2c3d4-e5f6-...",
"status": "running"
}

Response Codes

200
Success — Audit started. Returns runId and status: "running".
400
Bad Request — Validation failed: invalid_urls, no_sitemap, or schema error.
401
Unauthorized — Missing or invalid API key / session.
403
Forbiddendomain_not_owned, no_seo_spider_access, on_demand_limit_reached, or max_pages_per_month_limit_reached.
409
Conflictrun_already_active. An audit is already running for this domain. Response includes the active runId.
422
Unprocessableno_new_pages. No new or updated pages found in sitemap since last audit (when newPagesOnly: true).

Example

javascript
CopyDownload
const response = await fetch(
'https://lovablehtml.com/api/seo-spider/runs',
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-lovablehtml-api-key': '<API_KEY>'
},
body: JSON.stringify({
domain: 'your-app.com',
urls: ['https://your-app.com'],
mode: 'follow',
allowSampling: true
})
}
);
const result = await response.json();
// { "ok": true, "runId": "a1b2c3d4-e5f6-...", "status": "running" }
bash
CopyDownload
curl -X POST \
"https://lovablehtml.com/api/seo-spider/runs" \
-H "Content-Type: application/json" \
-H "x-lovablehtml-api-key: <API_KEY>" \
-d '{
"domain": "your-app.com",
"urls": ["https://your-app.com"],
"mode": "follow",
"allowSampling": true
}'

Limits: Audit access and page-per-run limits depend on your plan. Only one audit can run per domain at a time. Stale runs are automatically expired (15 min queue timeout, 90 min heartbeat timeout).

Avatar
How can we help?
Get instant answers to your questions or leave a message for an engineer will reach out
Ask our assistant anything
See our docs
Leave a message
Leave a message
We'll get back to you soon
Book a Meeting
Select a date & time
Avatar
Support Assistant
We typically reply instantly
Thinking
Preview
Powered by ReplyMaven
Avatar
Support Assistant
Hi, how can we help?