Skip to content
Latchkey

npm search: Usage, Options & Common Errors

Find packages in the registry by keyword.

npm search queries the registry for packages matching one or more search terms and prints name, description, author, and version.

What it does

Sends the terms to the registry search endpoint and lists matches. --json returns structured results. It depends on the registry implementing a search API - many private/proxy registries do not.

Common usage

Terminal
npm search testing framework
npm search react-router --json
npm search --registry=https://registry.npmjs.org/ eslint-config

Common CI error: search unsupported on private registry

npm search errors or returns nothing against a private/proxy registry (e.g. Artifactory, Verdaccio) that does not implement the search endpoint. Point search at the public registry explicitly, or use npm view for an exact package name instead of search.

Terminal
npm search --registry=https://registry.npmjs.org/ my-term

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →