npm Scraper
Spider read npmjs.com in 2.3 s without a browser and returned 40 lines of clean markdown, including sections like "weekly-downloads", "Weekly downloads" and "npm i weekly-downloads".
npm tokens that bypass 2FA are being restricted — account changes (Aug 2026) and direct publishing (Jan 2027). Learn how to prepare →# weekly-downloads1.0.4 • Public • Published 7 years ago# Weekly downloadsYou can install this package by typing the following command in the command line :-### `npm i weekly-downloads`Then, you can require the package in your code like:-### `const weeklyDownloads = require("weekly-downloads")`So, what this package basically does is to console.log the number of weekly downloads of a npm package.For example , if you want to see the number of weekly downloads of express you call this package and pass the package name (in this case, express) as a parameterThe code for performing the above action :-### `weeklyDownloads("express")`# Thanks for showing your support by downloading the package . I hope you liked it!## Readme### Keywords## Package Sidebar### Install### Weekly Downloads### Version### License### Last publish### Collaborators**Analyze security** with Socket**Check bundle size****View package health****Explore dependencies** The same call, in code.
The capture above came back as markdown. These examples add a key, so you get browser rendering, proxies, and concurrency on npmjs.com.
import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.npmjs.com/search?q=web+scraping");
// No selectors, no schema. Spider reads the page and names the fields.
const data = await page.scrape();
console.log(data);
await spider.close(); import { SpiderBrowser } from "spider-browser";
const spider = new SpiderBrowser({
apiKey: process.env.SPIDER_API_KEY!,
});
await spider.connect();
const page = spider.page!;
await page.goto("https://www.npmjs.com/search?q=web+scraping");
await page.content();
const data = await page.evaluate(`(() => {
const packages = [];
document.querySelectorAll("[class*='_package_']").forEach(el => {
const name = el.querySelector("h3 a")?.textContent?.trim();
const desc = el.querySelector("p")?.textContent?.trim();
const version = el.querySelector("[class*='_version']")?.textContent?.trim();
const downloads = el.querySelector("[class*='_downloads']")?.textContent?.trim();
if (name) packages.push({ name, desc, version, downloads });
});
return JSON.stringify({ total: packages.length, packages: packages.slice(0, 15) });
})()`);
console.log(JSON.parse(data));
await spider.close(); Ready for volume? Get an API key →
Fields you can pull.
Spider names these from the page. The capture above came back as markdown; the same
call with return_format: "json" returns them as keys.
What npmjs.com costs to scrape.
The capture above cost $0.000102 to fetch. Pricing is $1 per GB of pre-transformation bandwidth plus $0.001 per CPU minute, so a page like this one lands at a fraction of a cent. Failed requests are billed at $0.
- Free balance on signup
- No card required to test
- Balance never expires
Run it keyless, no account
More AI & Developer scrapers.
ChatGPT Scraper
Extract shared ChatGPT conversations, prompts, and AI-generated content from public links.
Hugging Face Scraper
Extract ML model cards, dataset info, leaderboard data, and paper metadata from Hugging Face.
GitHub Scraper
Extract trending repositories, star counts, contributor data, and code snippets from GitHub.
Start scraping npmjs.com.
You already have the call. A key raises the rate limit and turns on browser rendering, proxies, and concurrency. Balance never expires, and top-ups go through secure checkout.