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-crawl

v1.1.0

Published

CLI tool that crawls sitemap XML files and checks HTTP status of every URL

Readme

sitemap-crawl

CLI tool that crawls sitemap XML files (indexes or single sitemaps), checks the HTTP status of every URL, and reports results with pretty terminal output.

Install

npm install -g sitemap-crawl
# or
pnpm add -g sitemap-crawl

Or run without installing:

npx sitemap-crawl <url>

Usage

sitemap-crawl [options] <url>

Examples

# Basic crawl with summary output
sitemap-crawl https://www.sitemaps.org/sitemap.xml

# Verbose output showing every URL
sitemap-crawl -v https://www.sitemaps.org/sitemap.xml

# Export results to CSV (writes to reports/<filename>)
sitemap-crawl --csv report.csv https://www.sitemaps.org/sitemap.xml

# Custom concurrency and timeout
sitemap-crawl -c 20 -t 5000 https://example.com/sitemap.xml

# Crawl through Zyte Smart Proxy Manager (requires ZYTE_API_KEY in .env)
sitemap-crawl https://example.com/sitemap.xml

# Use a custom proxy URL
sitemap-crawl -p http://localhost:8011 https://example.com/sitemap.xml

Options

| Flag | Description | |------|--------------| | -v, --verbose | Show full URL listing instead of summary counts | | --csv <filepath> | Write results to a CSV file (writes to reports/<filename>) | | -c, --concurrency <n> | Max concurrent requests (default: 10) | | -t, --timeout <ms> | Per-request timeout in ms (default: 10000) | | -r, --max-redirects <n> | Max redirects to follow per URL (default: 3) | | -d, --delay <ms> | Delay in ms between requests (default: 10) | | --max-retries <n> | Max retries for 503/timeout errors (default: 3) | | -p, --proxy-url [url] | Enable Zyte proxy, optionally specify URL (default: http://proxy.zyte.com:8011) | | -h, --help | Display help |

Output

Default (summary)

Shows status code counts per sitemap, color-coded:

=== Crawl Results ===

https://example.com/sitemap.xml
  Total: 42 URLs — 200: 38, 301: 2, 404: 2

Verbose (-v)

Shows every URL with its status code, plus the summary:

=== Crawl Results ===

https://example.com/sitemap.xml
  200  https://example.com/page1
  200  https://example.com/page2
  404  https://example.com/old-page

  Total: 3 URLs — 200: 2, 404: 1

Features

  • Supports sitemap index files and single sitemaps
  • Handles gzipped (.xml.gz) sitemaps
  • Concurrent HTTP checking with configurable limits
  • HEAD-first requests with GET fallback
  • Manual redirect following with configurable max
  • Color-coded terminal output (2xx green, 3xx yellow, 4xx/5xx red)
  • Progress bars for each sitemap
  • CSV report export
  • Verbose mode with full URL listing
  • Zyte Smart Proxy Manager support

Proxy support

To route requests through Zyte Smart Proxy Manager:

  1. Copy the example environment file:
    cp .env.example .env
  2. Add your API key to .env:
    ZYTE_API_KEY=your-api-key-here
  3. Run normally — the proxy is activated automatically when ZYTE_API_KEY is set:
    sitemap-crawl https://example.com/sitemap.xml

The default proxy endpoint is http://proxy.zyte.com:8011. Override it with --proxy-url if needed.

Requirements

  • Node.js 20+

Development

pnpm install
pnpm build
pnpm dev <url>   # Run in development mode (no build needed)

License

MIT