Scan a Website in Node.js

Submit a URL for surface scanning. Returns a scan ID and status URL for polling. The scan captures page snapshots, detects changes from previous scans, and identifies SEO regressions.

Endpoint

POST /api/v1/scan

Node.js Code

const response = await fetch("https://seodiff.io/api/v1/scan", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SEODIFF_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"url":"https://example.com","config":{"depth":2,"max_pages":50}}),
});

const data = await response.json();
console.log("Status:", data.status);

Example Response

{"id":"s_abc123","status":"queued","status_url":"/api/v1/scans/s_abc123/status","created_at":"2025-03-15T10:30:00Z"}
Authentication

All requests require an API key in the Authorization: Bearer header. Get your API key →

Same Endpoint, Other Languages

More Node.js Examples

Evaluate pSEO Pages

Test programmatic pages against assertion rules. The core agentic evaluation endpoint.

Validate in CI/CD Pipeline

CI-friendly endpoint that blocks deployments when SEO regressions are detected.

Trigger Deep Audit

Start a comprehensive multi-page crawl with PageRank, link analysis, and pSEO diagnostics.

Validate llms.txt File

Test your llms.txt file against the specification and get actionable fixes.

Google Search Console Data Sync

Pull GSC performance data into SEODiff for correlation with AI-readiness metrics.

Start testing in 30 seconds

Get an API key and run your first evaluation with a single cURL command.

Get API Key or Read full API docs