{"id":13515302,"url":"https://github.com/nodesource/npmsearch","last_synced_at":"2025-05-11T17:31:44.305Z","repository":{"id":12897561,"uuid":"15574516","full_name":"nodesource/npmsearch","owner":"nodesource","description":"blazing fast npm search utility","archived":true,"fork":false,"pushed_at":"2017-04-17T13:31:29.000Z","size":813,"stargazers_count":276,"open_issues_count":0,"forks_count":34,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-25T21:25:36.193Z","etag":null,"topics":["nodejs","npm","npmsearch"],"latest_commit_sha":null,"homepage":"http://npmsearch.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nodesource.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-02T02:59:14.000Z","updated_at":"2025-01-30T21:49:01.000Z","dependencies_parsed_at":"2022-09-17T05:52:36.693Z","dependency_job_id":null,"html_url":"https://github.com/nodesource/npmsearch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fnpmsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fnpmsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fnpmsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nodesource%2Fnpmsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nodesource","download_url":"https://codeload.github.com/nodesource/npmsearch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253604837,"owners_count":21934905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","npm","npmsearch"],"created_at":"2024-08-01T05:01:09.137Z","updated_at":"2025-05-11T17:31:43.666Z","avatar_url":"https://github.com/nodesource.png","language":"JavaScript","readme":"# npmsearch.com\n\n[![N|Solid](https://cldup.com/dTxpPi9lDf.thumb.png)](https://nodesource.com/products/nsolid)\n\nThis is the code that powers [npmsearch.com](http://npmsearch.com), which provides a clean interface to searching pseudo-rated node packages from npm.\n\n## api\n\nTo query the npmsearch index, you can use the HTTP api which is effectively a proxy to elasticsearch's [URI Search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-uri-request.html).\n\nAll requests go through http://npmsearch.com/query. Here's an example:\n\n```\ncurl \"http://npmsearch.com/query?q=dom\u0026fields=name\"\n{\"results\":[{\"name\":[\"select-dom\"]},{\"name\":[\"dom-manipulations\"]},{\"name\":[\"zero-dom\"]},{\"name\":[\"dom-stub\"]},{\"name\":[\"dom-walk\"]},{\"name\":[\"dom-value\"]},{\"name\":[\"karma-chai-dom\"]},{\"name\":[\"dom-select\"]},{\"name\":[\"dom-listeners\"]},{\"name\":[\"has-dom\"]}],\"total\":7265,\"from\":0}\n```\n\n### Available fields\n\n* __author__\n* __created__\n* __dependencies__\n* __description__\n* __devDependencies__\n* __homepage__\n* __keywords__\n* __maintainers__\n* __modified__\n* __name__\n* __readme__\n* __repository__\n* __scripts__\n* __times__\n* __version__\n* __rating__ - computed rating as per [bin/rating.js](bin/rating.js)\n\n# Running your own npmsearch\n\n## Setup Elasticsearch\n\nSee the [elasticsearch docs](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/setup.html) for setting up a node\n\n```bash\n\n# create an index\n\ncurl -XPUT http://localhost:9200/my-index-name\n\n# setup the package field mappings\n\ncat mappings.json | curl -v -XPOST http://localhost:9200/my-index-name/package/_mapping -H \"Content-type: application/json\" -d @-\n\n# setup an alias to 'registry'\n\ncurl -XPOST 'http://localhost:9201/_aliases' -d '\n{\n  \"actions\" : [\n    { \"add\" : { \"index\" : \"my-index-name\", \"alias\" : \"registry\" } }\n  ]\n}'\n\n```\n\n## pipe the npm registry into elasticsearch\n\n```\nnpm2es --couch=\"https://skimdb.npmjs.com/registry\" --es=\"http://localhost:9200/registry\"\n\n```\n\n## run the server\n\n```\nnode bin/server.js --es=\"http://localhost:9200/registry\"\n```\n\n## compute ratings\n\n```\nnode bin/rating.js --es=\"http://localhost:9200/registry\"\n```\n\n## Authors and Contributors\n\n\u003ctable\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eElijah Insua\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/tmpvar\"\u003eGitHub/tmpvar\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/tmpvar\"\u003eTwitter/@tmpvar\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n\nAuthored by Elijah Insua. Contributions are welcomed from anyone wanting to improve this project!\n\n## License \u0026 Copyright\n\n**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](LICENSE.txt) file for more details.\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fnpmsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnodesource%2Fnpmsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnodesource%2Fnpmsearch/lists"}