Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time


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.

You can’t perform that action at this time.