API & Integrations v24
Programmatic access to dynamic sitemap generation, search engine submission, and real-time indexing pipelines. Designed for high-throughput applications.
Overview #
The Sitemap.xml v24 API provides RESTful endpoints to generate, validate, submit, and monitor XML sitemaps at scale. All responses are JSON-formatted and support standard HTTP status codes.
POST https://api.sitemapxml.com/v24/sitemaps/generate -H "Authorization: Bearer sk_live_8f7d..." -H "Content-Type: application/json" -d '{ "url": "https://example.com", "depth": 4, "output": "xml", "include_robots": true }'
Authentication #
Access the API using Bearer tokens. Generate keys in your Dashboard → API Keys. Tokens are scoped to specific workspace permissions.
- sk_live_* — Production environments
- sk_test_* — Sandbox/testing (no real indexing)
- rs_* — Read-only tokens for monitoring/status checks
All requests must include the Authorization header. Invalid or expired tokens return 401 Unauthorized.
Rate Limits #
Rate limits are applied per API key and reset every 60 seconds. Exceeding limits returns 429 Too Many Requests with a Retry-After header.
| Plan | Requests / min | Max URLs / request | Concurrent Jobs |
|---|---|---|---|
| Starter | 60 | 500 | 1 |
| Professional | 600 | 10,000 | 5 |
| Enterprise | 3,000 | 1,000,000 | Unlimited |
Core Endpoints #
Generate Sitemap POST /sitemaps/generate
Initiates a crawl and sitemap generation job. Returns a job_id for tracking.
// Supported parameters { "url": "https://yoursite.com", // Required: Base domain to crawl "depth": 3, // Optional: Crawl depth (1-6) "format": "xml", // xml, html, json "compression": true, // gzip output "custom_headers": { // Optional: Auth cookies/headers "Cookie": "session=abc123" } }
Job Status GET /sitemaps/{job_id}/status
Check generation progress, error logs, and final download URLs.
{
"job_id": "sm_9x2kLp4mQ",
"status": "completed", // queued, crawling, processing, completed, failed
"urls_found": 1428,
"created_at": "2025-01-15T08:30:00Z",
"download": "https://cdn.sitemapxml.com/v24/sm_9x2kLp4mQ.xml.gz"
}
Submit to Search Engines POST /sitemaps/{job_id}/submit
Pushes generated sitemaps to Google Search Console, Bing Webmaster, and Yandex automatically.
Webhooks #
Configure webhook endpoints in your dashboard to receive real-time events. All payloads are signed with HmacSHA256 using your webhook secret.
job.completed
Triggered when sitemap generation finishes successfully.
job.failed
Returned with error details and crawl logs when a job terminates prematurely.
indexing.confirmed
Search engines have acknowledged your sitemap submission.
Official SDKs #
First-party libraries with automatic retries, pagination, and TypeScript definitions.
🟢 Node.js / Deno
npm install @sitemapxml/sdk
🐍 Python
pip install sitemapxml-py
⚡ Go
go get github.com/sitemapxml/go-sdk
🐘 PHP
composer require sitemapxml/php
Platform Integrations #
One-click plugins and headless connectors for major ecosystems. No API key required for basic usage.
🔵 WordPress
Auto-generates sitemaps on post/page publish. Supports WooCommerce.
🟠 Shopify
Syncs product & collection URLs. Handles pagination & filters.
⚫ Next.js / Nuxt
Middleware hook for SSR/SSG routes. Generates on build or runtime.
🟣 Strapi / Directus
Headless CMS webhook trigger. Maps content types to sitemap URLs.
Error Codes #
Standard HTTP error codes with extended machine-readable identifiers in the response body.
| Code | Meaning | Action |
|---|---|---|
| 400 | INVALID_PARAMS | Check required fields & URL format |
| 401 | UNAUTHORIZED | Verify API key scope & expiration |
| 403 | FORBIDDEN_DOMAIN | Domain not verified in workspace |
| 429 | RATE_LIMITED | Exponential backoff. Check Retry-After |
| 503 | UPSTREAM_TIMEOUT | Target site rejected crawl. Verify robots.txt |