API Reference
Integrate the Sitemap.xml API into your application to programmatically generate, manage, and submit sitemaps to search engines. All endpoints require authentication and support JSON request/response formats.
https://api.sitemapxml.com/v1All API requests must be made over HTTPS. Calls made over plain HTTP will fail with a 403 status code.
Authentication
The API uses API keys to authenticate requests. You can manage your API keys from the Dashboard → Settings. Include your key in the Authorization header using the Bearer scheme.
Authorization: Bearer sm_live_4eC39HqLyjWDarjtT1zdp7dc
Sitemaps
Creates a new sitemap project or triggers a fresh crawl of an existing one. Returns a job ID for async processing.
Request Parameters
| Parameter | Type | Description |
|---|---|---|
url *required |
string | The root URL to crawl (e.g., https://example.com) |
type optional |
string | Sitemap format: xml (default), html, json |
max_pages optional |
integer | Maximum number of URLs to discover (default: 50,000) |
webhook_url optional |
string | URL to receive completion callback |
Example Request
{
"url": "https://example.com",
"type": "xml",
"max_pages": 10000,
"webhook_url": "https://hooks.yoursite.com/sitemap-complete"
}
Response
{
"id": "smap_8f7a2c1d9e",
"status": "processing",
"created_at": "2025-06-12T10:15:30Z",
"download_url": "https://cdn.sitemapxml.com/smap_8f7a2c1d9e.xml"
}
Status Codes
Fetch metadata, status, and download links for a specific sitemap generation job.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
sitemap_id *required | string | Unique identifier returned from creation request |
curl -X GET "https://api.sitemapxml.com/v1/sitemaps/smap_8f7a2c1d9e" \ -H "Authorization: Bearer $API_KEY"
Indexing
Immediately notifies Google, Bing, and Yandex about a new or updated URL. Bypasses standard crawl schedules.
| Parameter | Type | Description |
|---|---|---|
url *required | string | Fully qualified URL to index |
engines optional | array[string] | Target engines: ["google", "bing", "yandex"] (default: all) |
priority optional | string | normal (default) or high |
{
"success": true,
"job_id": "idx_9a2b1c3d",
"estimated_crawl_time": "2-5 minutes",
"engines_notified": ["google", "bing"]
}
Submit up to 1,000 URLs in a single request. Ideal for e-commerce product updates or blog publishing pipelines.
idempotency_key header to safely retry failed batches.