Skip to content

API Sitemap

Power SEO Bot edited this page Feb 27, 2026 · 1 revision

@power-seo/sitemap API

generateSitemap()

import { generateSitemap } from '@power-seo/sitemap';

const xml = generateSitemap({
  hostname: 'https://example.com',
  urls: [
    { loc: '/', changefreq: 'daily', priority: 1.0 },
    { loc: '/blog/post-1', lastmod: '2026-01-15' },
  ],
});

streamSitemap()

For large catalogs:

const chunks = [...streamSitemap('https://example.com', urls)];

Efficient at scale.

Clone this wiki locally