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

registry

(Katie Gengler) #1

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


(Kat Marchán) #2

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.


(Katie Gengler) #3

@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).


(Kat Marchán) #4

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!


(Katie Gengler) #5

Yes, everything is working again. Thanks!


(system) #6

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.