npm API

npm Scraper API for Package Search, Dependencies, Versions, and Downloads

Scrappa's npm API returns public npm registry data as structured JSON. Search packages with quality, popularity and maintenance scores, and read any package with dependencies, dist info, maintainers, version history, weekly and monthly downloads and the readme.

500 free credits
No card needed
From $0.20 / 1k
Pay as you go
Structured JSON
Ready for apps
API key access
Test in minutes
2
Endpoints
250
Results per page
$0.20
Per 1k requests

Try it now

Make one request. Inspect structured JSON.

Use the first endpoint in this API family with a Scrappa API key. Every account includes 500 free monthly credits, so you can validate the response shape before buying credits.

Request preview
Request
curl -X GET "https://scrappa.co/api/npm/package?package=lodash" \
  -H "Accept: application/json" \
  -H "X-API-KEY: YOUR_API_KEY"
JSON response
{
  "success": true,
  "data": {
    "name": "lodash",
    "version": "4.18.1",
    "description": "Lodash modular utilities.",
    "license": "MIT",
    "dependencies": {},
    "dist": {
      "tarball": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz",
      "shasum": "ff2b66c1f6326d59513de2407bf881439812771c",
      "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq...",
      "unpacked_size": 1413741,
      "file_count": 1051
    },
    "downloads": {
      "last_week": null,
      "last_month": null
    }
  }
}

What you can build

Structured data for real applications. Here are some ideas.

Dependency Auditing

Read dependencies, peer dependencies, engines and licenses of any package version.

Package Discovery

Search the registry with qualifiers and rank results by quality, popularity and maintenance.

Adoption Tracking

Follow weekly and monthly downloads and release dates to see which libraries grow.

Supply Chain Monitoring

Track maintainers, publishers and new versions of the packages you depend on.

Available endpoints

Everything you need in one API.

Scrappa vs npm registry API (direct)

See how Scrappa compares to npm registry API (direct).

Package, downloads and version history in one call
Scrappa
npm registry API (direct)
Three separate APIs
Scoped names handled for you
Scrappa
npm registry API (direct)
Manual URL encoding
Large packages capped safely
Scrappa
npm registry API (direct)
You parse multi-MB documents
Price per 1k requests
Scrappa
From $0.20
npm registry API (direct)
Free, but you build the wrapper

Key features

Search with exact total and paging up to 250 results per page
Dependencies, dev, peer and optional dependencies, engines and funding
Dist info with tarball, integrity, size and file count
Version list with release dates, dist-tags and readme
Weekly and monthly downloads
Scoped names like @types/node supported; unknown packages answer 404

Frequently asked questions

Yes. Pass the full name, for example @types/node, as the package parameter.

The readme of the latest release. Other versions return the readme only when npm stores it with that version.

Each successful request uses one Scrappa credit. Failed requests are never charged and the API never answers with HTTP 429. An upstream outage returns a retryable 503.

No. Scrappa is an independent service and is not affiliated with or endorsed by npm. It returns public npm data as JSON.

Start using the npm API

Sign up and get 500 free credits. No credit card required.