Considering I want to find all packages by several criteria and list them, e.g. find by polyfill keyword and filter by specific user.

How can this be done?

The reason I'm asking on SO is that I suspect that this feature is not officially supported by NPM CLI tool and website and may require the use of NPM API.

To search by author and keyword, you can use the following query in the npmjs.com search bar:

<pre><code><a href="https://www.npmjs.com/search?q=author%3Asindresorhus%20keywords%3Apolyfill"><b>author</b>:<i>sindresorhus</i> <b>keywords</b>:<i>polyfill</i></a></code></pre>

According to the npm docs on Searching for and choosing packages to download:

npm search uses npms and the npms analyzer in the website searchbar

According to the NPMS (NPM Search) docs on how to perform a search query, you can use the following operators:

| Search Syntax | Description | | ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | scope:types | Show/filter results that belong to the @types scope | | author:sindresorhus | Show/filter results in which sindresorhus is the author | | maintainer:sindresorhus | Show/filter results in which sindresorhus is qualifier as a maintainer | | keywords:gulpplugin | Show/filter results that have gulpplugin in the keywords (separate multiple keywords with commas, you may also exclude keywords e.g. -framework) | | not:deprecated | Exclude deprecated packages from the results | | not:unstable | Exclude packages whose version is < 1.0.0 | | not:insecure | Exclude packages that are insecure or have vulnerable dependencies (as per nsp) | | is:deprecated | Show/filter is deprecated packages | | is:unstable | Show/filter packages whose version is < 1.0.0 | | is:insecure | Show/filter packages that are insecure or have vulnerable dependencies (as per nsp) | | boost-exact:false | Do not boost exact matches, defaults to true | | score-effect:14 | Set the effect that package scores have for the final search score, defaults to 15.3 | | quality-weight:1 | Set the weight that quality has for the each package score, defaults to 1.95 | | popularity-weight:1 | Set the weight that popularity has for the each package score, defaults to 3.3 | | maintenance-weight:1 | Set the weight that the quality has for the each package score, defaults to 2.05 |

See Also: How to find search/find npm packages