A TypeScript library to fetch and parse all links recursively from a sitemap XML file, including support for sitemap indexes. Version 1.1.0 is the latest stable release. It uses native fetch (Node >=18.0) or node-fetch for earlier versions. Key differentiator is its recursive crawling of sitemap index files and ability to filter specific indexes. Lightweight with zero runtime dependencies beyond node-fetch for older Node versions.
npm install get-sitemap-linksNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Fetches all links from a sitemap URL recursively, handling index sitemaps.
Use require('get-sitemap-links').default instead of require('get-sitemap-links')Install node-fetch as a dependency if using Node <18, or upgrade to Node >=18.
Ensure the sitemap URL points to a valid sitemap index (e.g., /sitemap.xml) when using filterIndexes.
const GetSitemapLinks = require('get-sitemap-links').default;npm install node-fetch or upgrade Node to >=18.
Verify the sitemap URL is correct and accessible.