API Reference
Programmatically generate sitemaps, push URLs to search engines, and monitor indexing status. Our RESTful API is designed for reliability, speed, and developer experience.
Base URL
https://api.sitemap.xml/v1
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Authentication
The Sitemap.xml API uses API keys for authentication. You can generate and manage your API keys in the Dashboard.
Include your key in the Authorization header using Bearer token format:
Authorization: Bearer sk_live_your_api_key_here
Never expose your secret API keys in client-side code. Use restricted keys or a backend proxy for browser-based applications.
Rate Limits
API requests are rate-limited based on your subscription tier. Exceeding limits will result in a 429 Too Many Requests response.
| Plan | Requests / Minute | Concurrent Requests |
|---|---|---|
| Starter | 100 | 5 |
| Professional | 1,000 | 25 |
| Enterprise | 10,000 | Unlimited |
When rate-limited, include the Retry-After header in your logic to implement exponential backoff.
Generate Sitemap
Initiates a crawl of the specified domain and generates an XML sitemap. Returns immediately with a job ID for polling.
Request Body
| Parameter | Type | Description |
|---|---|---|
domain Required | string | The root domain to crawl (e.g., example.com) |
max_urls Optional | integer | Maximum number of URLs to include (default: 50000) |
include_assets Optional | boolean | Include images and videos (default: true) |
ignore_paths Optional | array | Regex patterns to exclude from crawling |
curl -X POST https://api.sitemap.xml/v1/sitemaps \\
-H "Authorization: Bearer sk_live_..." \\
-H "Content-Type: application/json" \\
-d '{
"domain": "shopwave.io",
"max_urls": 10000,
"ignore_paths": ["/admin/.*", "/cart"]
}'
Response
{
"status": "processing",
"sitemap_id": "sm_8f9a2b3c4d5e",
"estimated_completion": 120,
"webhook_url": null
}
Check Sitemap Status
Retrieve the status of a previously generated sitemap and download URL if completed.
{
"status": "completed",
"urls_found": 4829,
"generated_at": "2025-01-15T08:30:00Z",
"download_url": "https://cdn.sitemap.xml/sm_8f9a...xml",
"expires_at": "2025-02-15T08:30:00Z"
}
Push to Search Engines
Directly submit URLs to Google, Bing, and Yandex indexing APIs. Triggers immediate crawling.
| Parameter | Type | Description |
|---|---|---|
urls Required | array | List of URLs to submit (max 100 per request) |
engines Optional | array | Target engines: ["google", "bing"] |
{
"submitted": 15,
"failed": 0,
"estimated_crawl_time": "2-15 minutes"
}
Indexing Analytics
Returns indexing statistics, coverage issues, and crawl frequency for your connected domains.
domain: example.com
period: 7d|30d|90d (default: 30d)
Error Handling
The API uses conventional HTTP status codes. Errors are returned in JSON format with a structured payload.
{
"error": {
"code": "invalid_domain",
"message": "The provided domain does not resolve or is blocked.",
"request_id": "req_9x8c7v6b5n4"
}
}
Pagination
List endpoints return paginated results. Use the cursor parameter to fetch the next page.
{
"data": [ // array of items ],
"has_more": true,
"next_cursor": "eyJpZCI6MTAwfQ==",
"limit": 20
}