Menu
Docs/Sitemap Crawl

Sitemap Crawl

Provide a sitemap XML URL and SnapSharp will extract all page URLs, then capture a screenshot of each. Supports sitemap indexes (nested sitemaps).

POST/v1/sitemap/crawl

Sitemap Crawl requires a Business+ plan. Max URLs depends on your plan.

Parameters

ParameterTypeDefaultDescription
sitemap_url*stringURL to a sitemap.xml file.
max_urlsnumber20Maximum number of URLs to capture. Min 1, capped by plan.
widthnumber1280Viewport width. Min 320, max 3840.
heightnumber720Viewport height. Min 240, max 2160.
formatenumpngOutput format: png, jpeg, or webp.
qualitynumber80Compression quality. 1–100.
full_pagebooleanfalseCapture full scrollable page.
dark_modebooleanfalseEmulate dark mode.
block_adsbooleanfalseBlock ads and trackers.
delaynumber0Wait N ms after load. Max 10000.
wait_untilenumloadload, domcontentloaded, or networkidle.
devicestringDevice preset name.

Plan limits

PlanMax URLs
Free❌ Not available
Starter❌ Not available
Growth❌ Not available
Business50
Enterprise200

Response

{
  "request_id": "550e8400-...",
  "sitemap_url": "https://example.com/sitemap.xml",
  "total_urls_found": 42,
  "total_captured": 20,
  "succeeded": 18,
  "failed": 2,
  "results": [
    {
      "url": "https://example.com/",
      "success": true,
      "image_base64": "iVBORw0KGgo...",
      "content_type": "image/png",
      "size_bytes": 145230
    },
    {
      "url": "https://example.com/404-page",
      "success": false,
      "error": "HTTP 404"
    }
  ]
}

Example

curl -X POST https://api.snapsharp.dev/v1/sitemap/crawl \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "sitemap_url": "https://example.com/sitemap.xml",
    "max_urls": 10,
    "width": 1280,
    "format": "png",
    "dark_mode": true
  }'

Use cases

  • Full-site visual audit — capture every page of a website for design review
  • Migration testing — verify all pages render correctly after a redesign
  • Competitor analysis — snapshot competitor sites for comparison
  • Archival — create a visual backup of your entire site

Errors

CodeErrorDescription
400validation_errorInvalid sitemap URL or parameters
400sitemap_emptySitemap contains no valid URLs
401unauthorizedMissing or invalid API key
403plan_requiredBusiness+ plan required
429rate_limitedRate limit exceeded
502sitemap_fetch_failedCould not fetch or parse the sitemap