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

xcrawl-scraper

v1.0.5

Published

Node.js SDK for XCrawl Web Scraping Proxy API — scrape web pages with automatic IP rotation and anti-bot bypass. Handles JS rendering, CAPTCHAs, proxy rotation, AI extraction out of the box.

Readme

XCrawl Scraper

npm version GitHub stars License: MIT

Node.js SDK + CLI for XCrawl — the web scraping API that handles JS rendering, CAPTCHAs, and proxy rotation automatically. Just point it at a URL and get clean data back.

npx xcrawl-scraper scrape https://example.com --api-key YOUR_KEY

Installation

npm install xcrawl-scraper

Quick Start

import { XCrawlScraper } from 'xcrawl-scraper';

const xcrawl = new XCrawlScraper({
  apiKey: process.env.XCRAWL_API_KEY,
});

// Scrape a page to Markdown
const result = await xcrawl.scrapeMarkdown('https://example.com');
console.log(result.data?.markdown);

// Search the web
const search = await xcrawl.search({ query: 'web scraping api', limit: 5 });
console.log(search.data.data.map(r => `${r.position}. ${r.title || r.url}`));

// AI extraction — describe what you want
const extracted = await xcrawl.extractJson(
  'https://news.ycombinator.com',
  'Extract top 3 stories with title, points, and author'
);
console.log(extracted.data?.json);

Features

  • Scrape any URL → clean Markdown, JSON, HTML, or text
  • Search the web → structured results with snippets
  • Crawl entire sites → built-in sitemap discovery
  • AI extraction → describe what you want in plain English, get JSON
  • Proxy control → choose exit region (US, JP, DE, etc.) or sticky sessions
  • Batch scrape → concurrent scraping with configurable limits

API Reference

XCrawlScraper(config)

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | required | Your XCrawl API key | | timeout | number | 60000 | Request timeout in ms |

Methods

scrape(options) → Scrape a URL

await xcrawl.scrape({
  url: 'https://example.com',
  output: { formats: ['markdown', 'json'] },
  proxy: { location: 'JP' },     // optional: choose exit region
  wait_for: 2000,                 // optional: wait for JS to render (ms)
  selector: 'main',               // optional: extract only a CSS selector
  screenshot: false,
  json: { prompt: 'Extract product name, price, and availability' },
});

| Option | Type | Description | |--------|------|-------------| | url | string | Required. Target URL | | output.formats | string[] | Output formats: markdown, json, text, html, screenshot, links | | json.prompt | string | Natural language prompt for AI extraction | | proxy.location | string | Country code (US, JP, DE, GB, etc.) | | proxy.sticky_session | string | Session ID for sticky proxy connection | | wait_for | number | Milliseconds to wait for JS rendering | | selector | string | CSS selector to extract specific content | | remove_selectors | string[] | CSS selectors of elements to remove | | screenshot | boolean | Include page screenshot (base64) | | only_metadata | boolean | Only return page headers/metadata |

scrapeMarkdown(url) → Quick Markdown scrape

Simplified call, returns Markdown content.

extractJson(url, prompt) → AI extraction

const data = await xcrawl.extractJson(
  'https://example.com/products',
  'Extract product names, prices, and ratings'
);

search(options) → Web search

| Option | Type | Default | Description | |--------|------|---------|-------------| | query | string | — | Search query | | location | string | — | Country code (US, JP, DE) | | language | string | — | Language code (en, ja, de) | | limit | number | 10 | Max results | | proxy.location | string | — | Exit region for search |

crawl(options) → Full site crawl

| Option | Type | Default | Description | |--------|------|---------|-------------| | url | string | — | Required. Starting URL | | crawler.limit | number | — | Max pages to crawl | | crawler.max_depth | number | — | Max crawl depth | | crawler.include_patterns | string[] | — | Only crawl matching URLs (glob) | | crawler.exclude_patterns | string[] | — | Skip matching URLs (glob) | | output.formats | string[] | — | Output formats | | proxy.location | string | — | Exit region |

getCrawlStatus(crawlId) → Poll crawl results

Crawl is async — use this to check status and get results.

CLI Usage

# Set your API key
export XCRAWL_API_KEY=your_key_here

# Scrape a URL
npx xcrawl-scraper scrape https://example.com --format markdown

# Search the web
npx xcrawl-scraper search "web scraping tools" --limit 5

# AI extraction
npx xcrawl-scraper extract https://example.com "Extract page title and description"

# Crawl a site
npx xcrawl-scraper crawl https://docs.example.com --depth 2 --limit 10

# With proxy (JP exit)
npx xcrawl-scraper scrape https://example.com --proxy JP

CLI Options

| Flag | Description | |------|-------------| | -k, --api-key | API key (or use XCRAWL_API_KEY env) | | -f, --format | Output format: markdown, json, text | | -p, --proxy | Proxy location: US, JP, DE, GB... | | -l, --limit | Max results (search) or pages (crawl) | | -d, --depth | Max crawl depth | | --selector | CSS selector for scraping | | --json | Output raw JSON | | --pretty | Pretty-print JSON |

Environment Variables

| Variable | Description | |----------|-------------| | XCRAWL_API_KEY | Your XCrawl API key |

Pricing

XCrawl uses a credit system (not per-request):

| Operation | Credits | |-----------|---------| | Basic scrape (Markdown) | 1 | | Search (2 results) | 2 | | AI extraction | 5 | | Full crawl (per page) | 1–5 |

Plans: Free (1000 credits) → Hobby $8/mo (5k) → Starter $49/mo (60k) → Pro $199/mo (350k)

Links

Support

If you find this useful, consider:

  • Starring the repo on GitHub
  • 🛒 Buying credits on Gumroad
  • 💬 Contributing — PRs, issues, and feature requests welcome!

License

MIT