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/crawlSitemap Crawl requires a Business+ plan. Max URLs depends on your plan.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
sitemap_url* | string | — | URL to a sitemap.xml file. |
max_urls | number | 20 | Maximum number of URLs to capture. Min 1, capped by plan. |
width | number | 1280 | Viewport width. Min 320, max 3840. |
height | number | 720 | Viewport height. Min 240, max 2160. |
format | enum | png | Output format: png, jpeg, or webp. |
quality | number | 80 | Compression quality. 1–100. |
full_page | boolean | false | Capture full scrollable page. |
dark_mode | boolean | false | Emulate dark mode. |
block_ads | boolean | false | Block ads and trackers. |
delay | number | 0 | Wait N ms after load. Max 10000. |
wait_until | enum | load | load, domcontentloaded, or networkidle. |
device | string | — | Device preset name. |
Plan limits
| Plan | Max URLs |
|---|---|
| Free | ❌ Not available |
| Starter | ❌ Not available |
| Growth | ❌ Not available |
| Business | 50 |
| Enterprise | 200 |
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
| Code | Error | Description |
|---|---|---|
| 400 | validation_error | Invalid sitemap URL or parameters |
| 400 | sitemap_empty | Sitemap contains no valid URLs |
| 401 | unauthorized | Missing or invalid API key |
| 403 | plan_required | Business+ plan required |
| 429 | rate_limited | Rate limit exceeded |
| 502 | sitemap_fetch_failed | Could not fetch or parse the sitemap |