API Reference
Welcome to the Sitemap.xml API documentation. Our RESTful API allows you to programmatically generate, manage, and submit sitemaps to search engines. All requests must be made over HTTPS. Calls made over plain HTTP will fail.
https://api.sitemap.xml/v1
Authentication
Authenticate your API requests by including your secret key in the request header. Keep your API keys secure and never expose them in client-side code.
| Header | Type | Description |
|---|---|---|
Authorization |
string | Bearer token containing your API key |
X-Request-ID |
string | Optional unique identifier for request tracing |
POST Generate Sitemap
Initiates a new sitemap generation job for a specified domain. The API will crawl the site, extract URLs, and build a compliant XML sitemap.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
domain | string | Required | Root domain to crawl |
max_depth | integer | Optional | Max crawl depth (default: 5) |
exclude_patterns | array | Optional | Glob patterns to skip |
include_assets | boolean | Optional | Include images/videos (default: true) |
Response
GET Get Sitemap
Retrieve the generated sitemap content, status, and metadata by ID.
Response
POST Submit for Indexing
Push URLs directly to Google, Bing, and Yandex indexing queues using our high-throughput pipeline.
Response Codes
Rate Limits
API requests are rate-limited based on your subscription tier. Limits are applied per API key and reset every 60 seconds.
| Plan | Requests/Min | Concurrent Crawls |
|---|---|---|
| Starter | 30 | 1 |
| Professional | 300 | 5 |
| Enterprise | 3,000 | Unlimited |
When you exceed your rate limit, the API returns a 429 Too Many Requests response. Implement exponential backoff in your client to handle retries gracefully.
Error Handling
Sitemap.xml uses standard HTTP status codes to indicate success or failure. Codes in the 2xx range indicate success, 4xx indicate client errors, and 5xx indicate server errors.