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

scrape-sdk

v0.2.2

Published

TypeScript client to scrape URLs to markdown with failover across Firecrawl, Jina, Tavily, Spider, Browserbase, and local Cheerio

Readme

Scrape SDK

One TypeScript client for scraping URLs to markdown. Pick Firecrawl, Jina, Tavily, Spider, Browserbase, or local Cheerio, then fail over without rewriting callers.

  • Adapters against live vendor APIs: Firecrawl v2, Jina, Tavily, Spider.cloud, Browserbase Fetch, and Cheerio
  • scrape(url) is the verb. map(), crawl(), extract(), search(), and scrapeMany() when a provider can do them
  • Abortable timeouts, retries on retryable errors, and automatic failover
  • Site/docs roots try /llms.txt before HTML
  • fromEnv() builds the client from the keys you already have
  • CLI, Vercel AI SDK tools, and an MCP server for full-page markdown

Install

npm install scrape-sdk

Works on Node 20+ and Bun. Keep provider API keys out of client code.

Usage

import { scrape } from "scrape-sdk";

const page = await scrape("https://stripe.com");
console.log(page.markdown);
console.log(`via ${page.provider} in ${page.latencyMs}ms`);

No API key required — Jina + local are always in the chain. Add keys and it fails over:

import { fromEnv } from "scrape-sdk";

const scraper = fromEnv();
const page = await scraper.scrape("https://stripe.com");

Or pick the order yourself:

import { createScrapeClient } from "scrape-sdk";
import { firecrawl } from "scrape-sdk/firecrawl";
import { jina } from "scrape-sdk/jina";
import { local } from "scrape-sdk/local";

const scraper = createScrapeClient({
  providers: [
    firecrawl({ apiKey: process.env.FIRECRAWL_API_KEY! }),
    jina(),
    local(),
  ],
});

Providers that cannot perform an operation are skipped. If none can, you get a CapabilityError instead of a fake result.

Methods

| Method | Use when | | :--- | :--- | | scrape(url) | You already have a URL | | search(query) | You need to find URLs | | map(url) | You need a site's URL list, not bodies | | crawl(url) | You need many page bodies from one site | | extract(url, { schema }) | You need structured JSON | | scrapeMany(urls) | You have a list of URLs |

Providers

| Provider | Import | Key | scrape | search | map | crawl | extract | JS | | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | | Firecrawl v2 | scrape-sdk/firecrawl | yes | yes | yes | yes | yes | yes | yes | | Jina | scrape-sdk/jina | optional | yes | yes | — | — | — | yes | | Tavily | scrape-sdk/tavily | yes | yes | yes | — | — | — | — | | Spider.cloud | scrape-sdk/spider | yes | yes | — | — | yes | — | yes | | Browserbase | scrape-sdk/browserbase | yes | yes | — | — | — | yes | — | | Local Cheerio | scrape-sdk/local | no | yes | — | — | — | — | no |

Browserbase is POST /v1/fetch, not a Playwright session, so it does not run page JavaScript. Firecrawl crawl returns a job id; the adapter polls until it finishes.

CLI

npx scrape-sdk https://stripe.com
npx scrape-sdk search "vercel ai sdk tools"
npx scrape-sdk map https://docs.firecrawl.dev
npx scrape-sdk crawl https://docs.firecrawl.dev --limit 5 --json
npx scrape-sdk scrape https://example.com --provider local

MCP

{
  "mcpServers": {
    "scrape-sdk": {
      "command": "npx",
      "args": ["-y", "scrape-sdk-mcp"],
      "env": {
        "FIRECRAWL_API_KEY": "fc-...",
        "TAVILY_API_KEY": "tvly-..."
      }
    }
  }
}

scrape_url returns the full page as markdown — not a summary. Host WebFetch often summarizes; this does not. map_site, crawl_site, and extract_json register when the configured providers support them.

Documentation

Full docs live at scrape-sdk.com/docs. Good places to start:

License

MIT © Arush Wadhawan