API

REST API Reference

Automate SEO file generation for any site. Submit a URL, poll until complete, download the ZIP. Available on the Agency plan.

Authentication

All requests must include your API key in the Authorization header.

Authorization: Bearer peak_<your_api_key>

Generate and manage your API keys from your . Keys never expire but can be revoked at any time. All endpoints return 401 if the key is missing or invalid.

Base URL

https://www.peakvisibility.io/api

Endpoints

POST/api/scanSubmit a site for scanning

Starts a scan and returns a scan id. Processing happens asynchronously — poll /api/scan-status until status === "complete".

Body (JSON)

urlstringREQUIRED

The full URL of the site to scan (e.g. https://example.com). The crawler follows internal links up to your plan's page limit.

pageLimitnumber

Override the default page limit. Cannot exceed your plan maximum (Agency: 500).

curl -X POST https://www.peakvisibility.io/api/scan \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Response

{
  "id": "a1b2c3d4-...",
  "status": "processing"
}
GET/api/scan-status?id=<scan_id>Poll scan progress

Returns the current status and progress of a scan. Poll every 3–5 seconds until status is "complete" or "failed".

idstringREQUIRED

The scan ID returned by POST /api/scan.

curl https://www.peakvisibility.io/api/scan-status?id=a1b2c3d4-... \
  -H "Authorization: Bearer <token>"

Response

{
  "id": "a1b2c3d4-...",
  "status": "processing",   // queued | processing | complete | failed
  "step": 3,                // internal step index (0–7)
  "domain": "example.com",
  "pageCount": 42,
  "message": "Analyzing pages...",

  // Only present when status === "complete":
  "preview": [
    { "url": "https://example.com", "title": "Home", "description": "..." },
    ...
  ]
}
GET/api/scan-download?id=<scan_id>Download the output ZIP

Returns a signed download URL for the output ZIP. Only available once status === "complete". Links expire after 2 minutes — redirect the user or stream the file immediately. ZIPs expire 7 days after scan completion.

idstringREQUIRED

The scan ID.

curl https://www.peakvisibility.io/api/scan-download?id=a1b2c3d4-... \
  -H "Authorization: Bearer <token>"

Response

{
  "type": "url",
  "url": "https://...",          // signed URL, valid for 2 minutes
  "filename": "peak-seo-example-com-2026-06-30.zip"
}

Complete example (Node.js)

const TOKEN = process.env.PEAK_API_TOKEN  // peak_...
const BASE  = 'https://www.peakvisibility.io/api'

const headers = {
  'Authorization': `Bearer ${TOKEN}`,
  'Content-Type':  'application/json',
}

// 1. Start the scan
const start = await fetch(`${BASE}/scan`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ url: 'https://example.com' }),
})
const { id } = await start.json()
console.log('Scan started:', id)

// 2. Poll until complete
let status = 'processing'
while (status === 'processing' || status === 'queued') {
  await new Promise(r => setTimeout(r, 4000))
  const poll = await fetch(`${BASE}/scan-status?id=${id}`, { headers })
  const data = await poll.json()
  status = data.status
  console.log(`[${data.step}] ${data.message} — ${data.pageCount} pages`)
}

if (status !== 'complete') throw new Error(`Scan failed: ${status}`)

// 3. Download the ZIP
const dl = await fetch(`${BASE}/scan-download?id=${id}`, { headers })
const { url, filename } = await dl.json()

const zip = await fetch(url)
const buf = await zip.arrayBuffer()
require('fs').writeFileSync(filename, Buffer.from(buf))
console.log('Saved:', filename)

ZIP contents

sitemap.xml

Submit directly to Google Search Console.

robots.txt

Drop into your site root.

meta-tags.html

Per-page <head> blocks with title + description.

schema-markup.html

JSON-LD structured data for each page.

og-tags.html

Open Graph + Twitter Card tags.

alt-text.json

Suggested alt text for every image found.

peak-report.html

Confidence scores and per-page SEO summary.

Rate limits

Scan submissions
20 / minute per IP
Status polls
Unlimited
Download requests
Unlimited
Pages per scan
Up to 500 (Agency)

Error codes

401Missing or expired access token.
403Email address not confirmed, or plan does not include API access.
404Scan ID not found or does not belong to your account.
400Scan not yet complete (for download), or missing required parameter.
410Scan ZIP has expired (7-day limit). Re-scan to get a fresh package.
429Rate limit exceeded. Back off and retry after 60 seconds.
500Internal server error. Contact [email protected].
Need help?

Agency plan includes dedicated support. Email [email protected] with your scan ID and we'll get back to you quickly.