npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm search API does not return results past 5000 (it used to)

What I Wanted to Do

Retrieve all npm packages with the ember-addon keyword, using this API:
http://registry.npmjs.org/-/v1/search?text=keywords:ember-addon&size=250&from=5000

Per the returned metadata, there are 5290 packages that match.

What Happened Instead

http://registry.npmjs.org/-/v1/search?text=keywords:ember-addon&size=250&from=5000
http://registry.npmjs.org/-/v1/search?text=keywords:ember-addon&size=250&from=5250
http://registry.npmjs.org/-/v1/search?text=keywords:ember-addon&size=250&from=5500
…etc

All these queries return the same page of results, despite incrementing the from parameter. This worked as of three weeks ago (~ June 22, 2018).

Reproduction Steps

Visit the following URLs and see that they contain the same results:
http://registry.npmjs.org/-/v1/search?text=keywords:ember-addon&size=250&from=5000
http://registry.npmjs.org/-/v1/search?text=keywords:ember-addon&size=250&from=5250

Details

As another noticed abnormality, npms.io (https://api.npms.io/v2/search?q=keywords:ember-addon) says 5439 packages matching ember-addon compared to npm’s 5290.

Platform Info

N/A


I suspect there’s a good chance this is related to the search incident (https://status.npmjs.org/incidents/frcp18csxlks), so I’m inclined to wait until that one resolves before taking any further action on this bug. Thanks for reporting it. Do you mind checking if this behavior continues once the incident is resolved and update us about it? You should be able to just subscribe to the incident.


@zkat Thanks for the quick reply. I’ll be keeping a close eye on that incident, since a site I maintain (emberobserver.com) is a bit hamstrung until it is resolved (or I find an alternative API).


The incident has been resolved, so this works again. Those two URLs you linked seem to be returning different results now. Let me know if you’re still seeing issues. Cheers!


Yes, everything is working again. Thanks!