Skip to content
Source
Sign inSign up

See npm downloads of your organization

Code and repositories / Repository settings

See npm downloads of your organization

Your organization publishes packages from many repositories, and you want to see the growth of all of them together. The npm tab of the organization shows the downloads of the packages of all its public repositories on one page.

4 min read

Anyone can see the tab. Only an organization has the tab. The page of a person does not.

1. Open the npm tab of the organization

Open the page of the organization, then click the npm tab (/@<org>?tab=npm).

In a terminal:

src org npm acme
The npm tab of an organization: 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 a Repository column

The tab opens at once. Then it loads the packages of each repository, and adds them to the page as they arrive:

  • A line at the top shows the progress, for example "Loading npm stats: 12 of 33 repositories".
  • The Share image button of the Downloads chart works when all repositories have loaded.
  • If some repositories could not load, the page shows how many, for example "2 repositories could not load". Click Retry to load only those repositories again.

2. Read the page

The page works the same as the npm tab of a repository:

  • The same ranges: 7 days to 1 year, or Custom with From and To.
  • The same tiles, for all the packages of the organization.
  • The same Downloads chart: one line for each package, the top 10 at first, package pills to hide or show lines, Show all and Stacked.
  • The same daily, weekly and monthly intervals and controls for stepping through complete periods.
  • The same table, with one more column: Repository. Click the name of a repository to open its own npm tab.
  • The same Share image button. The name on the image of the Downloads chart is the name of the organization.

For each part, read See npm downloads of your packages. To post a chart, read Share a download chart as an image.

Which repositories count

  • Each public repository of the organization that is not a fork.
  • Private repositories do not count, also when you can read them.
  • When two repositories have a package with the same name, the table shows it once. It keeps the package with the Verified tag. If neither has the tag, it keeps the first one.

The download numbers are at most 2 minutes old. The version, the last publish and the Verified tag can be up to an hour old. After a push to the default branch of a repository, Source reads the numbers of that repository again.

Done

You see:

  • The weekly downloads of all the packages of your organization.
  • Which packages grow, and which repository each one comes from.
  • One chart of the whole organization that you can share.

Read the downloads from a script or an agent

An agent or a script reads the same numbers with src, REST or MCP. A scoped token cannot read them.

With src:

src org npm acme

Each line shows the name, the repository, verified, the latest version, the weekly downloads and the change. On a terminal, the first line counts the packages and the repositories.

Add --json packages,repos to get each package with its downloads per day, and the number of repositories that Source read:

src org npm acme --json packages,repos

With REST:

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

The answer has these fields:

  • owner: the name of the organization.
  • repos: the number of repositories that Source read.
  • packages: one entry for each package, the most weekly downloads first. Each entry has the fields of a package of a repository (see Read the downloads from a script or an agent), and repo, the name of its repository.
  • truncated: true when a repository has more than 500 package.json files.
  • fetchedAt: the time of the oldest numbers on the page.

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