Difference between npmjs replicate and npmjs registry

1.6k Views Asked by At

For research purpose, I am interested in getting a full list of npm package names. Some existing answer points to https://replicate.npmjs.com/registry/_all_docs, but the url is replicate.npmjs.com, and it seems to be a different registry than http://registry.npmjs.com/. For example, as of now, http://registry.npmjs.com/ 's doc_count is 1844996, but https://replicate.npmjs.com/ has 1419077.

What is the difference between registry.npmjs.com and replicate.npmjs.com? Are they the same or different registries? What are they used for? Which one is the "default" one used by the npm CLI?

2

There are 2 best solutions below

1
On
0
On

The difference is that replicate.npmjs.com exposes the CouchDB _changes API that can be used to replicate information about packages in the primary npmjs registry (registry.npmjs.com).

If you are interested in performing research on all npm packages I suggest you take a look at this tutorial by the npm team: https://github.com/npm/registry-follower-tutorial