blazing fast npm search utility
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin allow es to be passed as env var Mar 8, 2017
lib no need to send back everything.. just send back the id Nov 8, 2014
public add deps + bump bundle Apr 24, 2016
LICENSE.txt Update LICENSE.txt Oct 21, 2016 Powered by NodeSource N|Solid 📛 Oct 21, 2016
mappings.json quote terms Jun 1, 2015
package.json add deps + bump bundle Apr 24, 2016


This is the code that powers, which provides a clean interface to searching pseudo-rated node packages from npm.


To query the npmsearch index, you can use the HTTP api which is effectively a proxy to elasticsearch's URI Search.

All requests go through Here's an example:

curl ""

Available fields

  • author
  • created
  • dependencies
  • description
  • devDependencies
  • homepage
  • keywords
  • maintainers
  • modified
  • name
  • readme
  • repository
  • scripts
  • times
  • version
  • rating - computed rating as per bin/rating.js

Running your own npmsearch

Setup Elasticsearch

See the elasticsearch docs for setting up a node

# create an index

curl -XPUT http://localhost:9200/my-index-name

# setup the package field mappings

cat mappings.json | curl -v -XPOST http://localhost:9200/my-index-name/package/_mapping -H "Content-type: application/json" -d @-

# setup an alias to 'registry'

curl -XPOST 'http://localhost:9201/_aliases' -d '
  "actions" : [
    { "add" : { "index" : "my-index-name", "alias" : "registry" } }

pipe the npm registry into elasticsearch

npm2es --couch="" --es="http://localhost:9200/registry"

run the server

node bin/server.js --es="http://localhost:9200/registry"

compute ratings

node bin/rating.js --es="http://localhost:9200/registry"

Authors and Contributors

Elijah InsuaGitHub/tmpvarTwitter/@tmpvar

Authored by Elijah Insua. Contributions are welcomed from anyone wanting to improve this project!

License & Copyright

npmsearch is Copyright (c) 2016 NodeSource and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.txt file for more details.