Skip to main content
GET
/
feeds
/
sitemap
Sitemap
curl --request GET \
  --url https://api.buttercms.com/v2/feeds/sitemap/ \
  --header 'Authorization: <api-key>'
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd\">\n  <url>\n    <loc>https://example.buttercms.com/blog/api-development-best-practices</loc>\n    <lastmod>2024-01-15</lastmod>\n  </url>\n  <url>\n    <loc>https://example.buttercms.com/blog/restful-api-design-principles</loc>\n    <lastmod>2024-01-12</lastmod>\n  </url>\n  <url>\n    <loc>https://example.buttercms.com/blog/microservices-architecture-guide</loc>\n    <lastmod>2024-01-10</lastmod>\n  </url>\n  <url>\n    <loc>https://example.buttercms.com/blog/database-optimization-techniques</loc>\n    <lastmod>2024-01-08</lastmod>\n  </url>\n</urlset>\n"
Generate a comprehensive XML sitemap for your blog posts, optimized for search engine discovery and indexing. This endpoint creates a standards-compliant sitemap that helps search engines efficiently crawl and index your blog content. SEO Optimization: Produces an XML sitemap following the sitemaps.org protocol that includes post URLs, last modification dates, and change frequency information. This helps search engines understand your content structure and prioritize crawling of updated content. Filtering for Focused Sitemaps: Apply category or tag filters to create specialized sitemaps for specific content sections. This is useful for large blogs where you want to submit targeted sitemaps to search engines or create separate indexing strategies for different content types.

Authorizations

Authorization
string
header
required

Set the Authorization header to Token your_read_api_token.

Example: Authorization: Token abc123def456

Note: The header value includes the Token prefix.

You can access your API token from your settings page.

Query Parameters

auth_token
string

Your ButterCMS read API token

category_slug
string

Filter the sitemap to include only posts from a specific category.

Provide the URL-friendly slug of the category. When specified, only blog posts assigned to this category will be included in the sitemap.

tag_slug
string

Filter the sitemap to include only posts with a specific tag.

Provide the URL-friendly slug of the tag. When specified, only blog posts tagged with this tag will be included in the sitemap.

Response

XML sitemap generated successfully

Complete XML sitemap with blog post URLs