Integrate SitemapKit into your Node.js applications or serverless functions. Use fetch or axios to call the API and process sitemap data in your JavaScript projects.
const API_KEY = "YOUR_API_KEY";
const BASE = "https://sitemapkit.com/api/v1/sitemap";
// Discover + extract in one call
const response = await fetch(`${BASE}/full`, {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": API_KEY,
},
body: JSON.stringify({ url: "example.com" }),
});
const data = await response.json();
console.log(`Found ${data.sitemaps.length} sitemaps`);
console.log(`Extracted ${data.urls.length} URLs`);
// Process URLs
const recentUrls = data.urls
.filter((u) => u.lastmod && u.lastmod > "2025-01-01")
.map((u) => u.loc);sk_live_* API key./api/v1/sitemap/full endpoint to discover and extract all sitemaps from a domain in one call.POST /api/v1/sitemap/discover — Find all sitemaps on a domainPOST /api/v1/sitemap/extract — Parse a sitemap URL and extract all URLsPOST /api/v1/sitemap/full — Discover + extract in one call (recommended)100 free API calls/month. No credit card required.