Skip to content
Source
Sign inSign up

See npm downloads of your packages

Code and repositories / Repository settings

See npm downloads of your packages

You publish packages to npm from your repository, and you want to know which ones grow. The npm tab shows the downloads of each package in the repository, with its latest version and its last publish.

6 min read

Anyone who can read the repository sees the tab. The tab shows when the default branch has a package.json at its root.

1. Open the npm tab

Open the repository, then click the npm tab (/@<owner>/<repo>/npm).

In a terminal, in your clone:

src repo npm
The npm tab of a repository: tiles for weekly downloads, packages and Verified packages, a chart with one line for each package and its legend, and the table of packages with one row open to its own chart

2. Pick a range

At the top right of the page, click a range:

  • 7 days, 30 days (the default) or 90 days.
  • 6 months or 1 year.
  • Custom: pick the first day in From and the last day in To.

Each range has its own URL, for example ?range=90d or ?from=2026-01-01&to=2026-03-31. Source has the downloads of about the last 18 months, so From and To stay inside those days.

A range of 30 days or less shows one point for each day. A longer range shows one point for each full week, from Monday to Sunday. A week that the range cuts at its start or end is left out, as on npm. Hover over a point to see its number, for example "Week of Nov 10: 215,730".

Above the chart, the page shows the total of the range and the change from the range before it.

Note

1 year shows no change, because Source does not have the downloads of the year before.

3. Read the Downloads chart

The Downloads chart shows one line for each package, each in its own color. At first, it shows the 10 packages with the most weekly downloads.

  1. To hide or show the line of a package, click its name in the legend under the chart.
  2. If the repository has more than 10 packages, click Show all to show all lines. Click Top 10 to go back.
  3. To see the total of all packages, turn on Stacked. The lines become areas on top of each other, and the top edge is the total.

The total above the chart counts all packages, also the packages that you hide.

4. Read the tiles and the table

The tiles at the top:

  • Weekly downloads: the downloads of all packages in the last 7 days, and the change from the 7 days before.
  • Packages: the number of packages that Source found in the repository.
  • Verified: the number of packages that this repository publishes. See Verified packages.

The table shows one row for each package, the most weekly downloads first:

ColumnWhat it shows
PackageThe name, with a link to the page of the package on npm. Under the name, the path of its package.json.
VersionThe latest version on npm.
Last publishThe last change of the package on npm. This is usually its last publish.
Weekly downloadsThe downloads of the last 7 days.
ChangeThe change from the 7 days before, in percent. New means that the 7 days before had no downloads.

The last column draws the downloads of each full week of the last year as a small line.

5. Open the chart of one package

Click a row, or the arrow at the left of the name. The chart of that package opens under the row, for the same range. Click the row again to close the chart.

Some rows have no chart:

  • Not on npm: npm does not know a package with this name.
  • Could not load: npm did not answer for this package. The rest of the page still loads.

Done

You see:

  • Which packages have the most downloads this week.
  • Which packages grow, and which drop.
  • The downloads of each package, week by week, for up to the last 18 months.

To post a chart on X or LinkedIn, read Share a download chart as an image. To see the packages of all the public repositories of an organization on one page, read See npm downloads of your organization.

Verified packages

A package.json can claim any name. So a package in the table is not always the package with that name on npm. The Verified tag shows that this repository really publishes the package.

A package gets the Verified tag when both are true:

  1. The repository field of the package on npm points to a GitHub repository.
  2. This repository is public, is not a fork, and its admin verified it as that GitHub repository.

When more than one repository is verified as the same GitHub repository, only the oldest one gets the tag.

A package with no tag can still come from this repository. The tag only shows that Source can prove the link. The packages of a private repository never get the tag.

To get the tag for your packages, read Verify your GitHub repository. Source keeps the answers of npm for some hours, so a new tag can take up to a day to show.

Which packages show

  • Each package.json on the tip of the default branch that has a name and is not "private": true.
  • Source skips node_modules, vendor, dist, build and each folder whose name starts with a dot.
  • Source reads at most 500 package.json files. When a repository has more, the page says "Only the first 500 package files are shown."
  • When no package can show, the page says "No packages to show".

Source keeps the numbers from npm for up to an hour. After a push to the default branch, Source reads them again. Under the table, the page shows when Source read them, for example "Updated 12 minutes ago."

Read the downloads from a script or an agent

An agent or a script reads the same numbers with src, REST or MCP. The token needs read access to the repository.

With src:

src repo npm acme/app

Each line shows the name, verified, the latest version, the weekly downloads and the change. A package that npm does not know shows not on npm. A package that npm did not answer for shows could not load.

Add --json packages to get each package with its downloads per day:

src repo npm acme/app --json packages

With REST:

curl -H "Authorization: Bearer $TOKEN" "https://source.tanstack.com/api/v1/repos/acme/app/npm"

The answer has these fields:

  • packages: one entry for each package, the most weekly downloads first. Each entry has name, path, verified, status (ok, not_found or failed), version, publishedAt, weekly, previousWeekly and days.
  • days (in each package): the downloads of each day of the last 540 days, oldest first.
  • head: the commit that Source read the package.json files from. It is null for an empty repository.
  • truncated: true when the repository has more than 500 package.json files.
  • fetchedAt: when Source read the numbers from npm.

With MCP, call the tool get_repo_npm_stats with owner and repo. It gives the same answer as REST. See Connect over MCP.

The charts and the share images are on the web only.