npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

sitemap-audit

v1.0.17

Published

Comprehensive sitemap auditor for website health checks

Downloads

1,155

Readme

Outrank

Get traffic and outrank competitors with Backlinks & SEO-optimized content while you sleep! I've been keeping a close eye on this new tool and it seems to be gaining a lot of traction and delivering great results. Try it now!

image

Get traffic and outrank competitors with Backlinks & SEO-optimized content while you sleep! I've been keeping a close eye on this new tool and it seems to be gaining a lot of traction and delivering great results. Try it now! https://outrank.so/?via=sitemap-audit

Sitemap-Audit

A Node.js solution for auditing website health through sitemap analysis. It's designed for SEO audits, identifying broken links, and detecting network errors, including blocked network requests, leveraging Playwright for browser automation.

Features

  • 🔍 Sitemap Analysis: - Extract and validate URLs from XML sitemaps
  • 🚨 Error Detection: - Identify 400+ HTTP status codes and network failures
  • ⚡ Concurrent Processing: - Smart semaphore-based request throttling
  • 📊 JSON Reporting: - Structured output for CI/CD integration
  • 🌐 Cross-Platform Support: - Works with Playwright.
  • 🔄 Auto-Scroll Simulation: - Trigger dynamic content loading
  • 🔧 Configurable Thresholds: - Customize batch sizes and connection limits

📦 Installation

1️⃣ Clone the Repository

npm install sitemap-audit

Peer Dependencies (install as needed):

npm install playwright

⚙️ Configuration

You can modify the configuration in index.js or pass values via environment variables.

| Option | Default Value | Description | | ---------------- | ------------- | ------------------------------------ | | resultsFolder | "results" | Folder where JSON reports are saved. | | batchSize | 20 | Number of URLs processed at a time. | | maxConnections | 50 | Max concurrent HTTP requests. |


Usage

1️⃣ Checking URLs from a Sitemap

To check for 400+ HTTP errors, using playwright refer to the below example:

import SiteChecker from "sitemap-audit";
import { test, chromium } from "@playwright/test";

const checker = new SiteChecker();

test("Validate and monitor sitemap URLs", async () => {
  test.setTimeout(40000_00); // Provide timeout only if the amount of urls being checked is greater than 200
  const browser = await chromium.launch();
  const context = await browser.newContext();

  // Generate urls from the sitemap.xml
  const urls = await checker.fetchAndSplitUrls(
    "https://example.com/sitemap.xml",
  );

  // Check URL statuses
  await checker.checkUrlStatus(urls);

  // Monitor network requests
  await checker.checkAllNetworkRequests(context, urls.slice(0, 20));
  await browser.close();
});

💾 Output Structure:

Results are saved in results/non-200-responses.json and results/network-failures.json.

results/non-200-responses.json would be save in the following format

[
  { "url": "https://example.com/about", "status": 404 },
  { "url": "https://example.com/safety", "status": 500 }
]

results/network-failures.json would be save in the following format

[
  {
    "url": "https://example.com/sites/default/files/downloadable_test_pack.pdf?",
    "status": 403,
    "resourceType": "fetch",
    "initiatingPage": "https://example.com/test"
  }
]

📚 API Reference:

fetchAndSplitUrls(sitemapUrl: string): Promise<string[]>
  • Fetches and parses sitemap XML
  • Returns array of validated URLs
checkUrlStatus(urls: string[]): Promise<void>
  • Checks HTTP status codes for URLs
  • Saves results to non-200-responses.json
checkAllNetworkRequests(context: BrowserContext, urls: string[]): Promise<void>
  • Analyzes network requests during page loads
  • Saves resource failures to network-failures.json

Troubleshooting

Common Issues:

Missing Dependencies: Ensure required browsers drivers are installed

npm install playwright

Timeout Errors: Increase test timeout for large sitemaps

test.setTimeout(120000); // 2-minute timeout

🤝 Contributing

Pull requests welcome! Please follow:

  • Create feature branch from main
  • Include test coverage
  • Update documentation

📄 License

MIT © Vipin Cheruvallil

For detailed implementation examples and issue tracking, visit our GitHub Repository.