npm Package API - Metadata, Dependencies & Downloads avatar

npm Package API - Metadata, Dependencies & Downloads

Pricing

$0.90 / 1,000 packages

Go to Apify Store
npm Package API - Metadata, Dependencies & Downloads

npm Package API - Metadata, Dependencies & Downloads

npm pages split the facts across two endpoints and never show a license next to the dependency tree, so you never get one honest answer about a package. This actor returns one row per package: version, license, dependencies, engines, unpacked size, maintainers and the registry's weekly downloads.

Pricing

$0.90 / 1,000 packages

Rating

0.0

(0)

Developer

Stas K

Stas K

Maintained by Community

Actor stats

1

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Features

Limited permissions

Share

npm Package API: metadata, dependencies and real weekly downloads

A package page on npmjs.com shows a version, a wall of README and a download chart that lives somewhere else, and no single call gives you both the licence and the dependency tree. Pulling that into a spreadsheet by hand is how audits never get finished. This actor reads the two public registry endpoints and returns one row per package: version, licence, dependencies, engines, unpacked size, maintainers, repository and the downloads the registry counted in its own last full week.

No key, no login and no browser: both endpoints answer a plain JSON request.

What one row means

One row is one package. The row is paid only when the registry really answered for that name.

FieldMeaning
packageNameThe name as the registry has it, scope included (@types/node)
versionThe version latest points to right now
description, keywordsWhat the package says about itself
licenseThe licence string the current version declares
homepage, repositoryUrlWhere the package lives
maintainersCount, maintainersHow many maintainers, and up to five names
dependenciesCount, dependenciesThe full count and up to maxDependencies names
devDependenciesCountHow many development dependencies the version declares
enginesNode, deprecatedThe Node range it asks for, and the deprecation notice if any
unpackedSizeBytesThe unpacked size the registry publishes
downloadsWeek, downloadsWindowDownloads in the registry's last full week, with its start and end dates
urlThe package page

Status rows are the free half of the dataset: status, reason and nothing a buyer could mistake for package data. They are written in batches, so sort by actorIndex to restore the input order.

Input

  • packages: a name (react), a scoped name (@types/node) or a link (https://www.npmjs.com/package/react).
  • maxDependencies: how many dependency names to list (default 50, max 200); the count is always complete.
  • maxPackages: how many list lines this run reads (default and max 200).

Price

One delivered package is one paid event. A name the registry does not publish, a line that cannot be read and anything past maxPackages are free and carry a reason. The lowest spending limit you can set per run is $0.05, so a run that reads many packages never pays that limit per package.

What this actor does not do

  • It does not read the whole version history: one row is the current version, not a changelog.
  • It does not audit for vulnerabilities. It reports the facts the registry publishes; judging a package is your call, not a claim of this actor.
  • It does not download, install or run any package, and it never touches your machine.
  • It does not guess numbers. If the downloads endpoint stays silent, the row is delivered with downloadsWeek: null and an empty window, never with a made-up count.

Notes

  • Downloads come from the registry's own counter for the last complete week, so two runs a day apart usually report the same window; the window dates are on the row so a report never compares two different weeks.
  • A name that is not published is a free NOT_FOUND row; a rate limit or a network failure is a different status again, because an unreadable registry says nothing about the package.
  • The source is public and keyless, so the actor works without an account of yours.