# npm-keyword

> Get a list of npm packages with keywords

Latest version **8.0.0** (published 2024-02-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install npm-keyword
pnpm add npm-keyword
yarn add npm-keyword
bun add npm-keyword
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 8.0.0 |
| Published | 2024-02-26 |
| First published | 2015-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18 |
| Dependencies | 2 |
| Unpacked size | 6.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Author | Sindre Sorhus |
| Maintainers | sindresorhus |
| Keywords | npm, keyword, package, packages, pkg, registry, find, search |

## Links

- npm: https://www.npmjs.com/package/npm-keyword
- Repository: https://github.com/sindresorhus/npm-keyword
- Homepage: https://github.com/sindresorhus/npm-keyword#readme
- Issues: https://github.com/sindresorhus/npm-keyword/issues
- Funding: https://github.com/sponsors/sindresorhus
- npm.io page: https://npm.io/package/npm-keyword

## Dependencies (2)

- [ky](https://npm.io/package/ky.md) ^1.2.1
- [registry-url](https://npm.io/package/registry-url.md) ^6.0.1

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 8.0.0 (latest) — 2024-02-26
- 7.0.0 — 2022-06-06
- 6.1.0 — 2019-04-05
- 6.0.0 — 2019-03-12
- 5.0.0 — 2017-11-19
- 4.2.0 — 2015-11-14
- 4.1.0 — 2015-10-18
- 4.0.0 — 2015-10-17
- 3.0.1 — 2015-08-24
- 3.0.0 — 2015-08-13
- 2.0.0 — 2015-08-10
- 1.2.0 — 2015-06-27
- 1.1.1 — 2015-03-04
- 1.1.0 — 2015-02-23
- 1.0.1 — 2015-01-18
- … 1 more at https://npm.io/package/npm-keyword/versions

## README

# npm-keyword

> Get a list of npm packages with keywords

## Install

```sh
npm install npm-keyword
```

## Usage

```js
import {npmKeyword, npmKeywordNames, npmKeywordCount} from 'npm-keyword';

console.log(await npmKeyword('gulpplugin'));
//=> [{name: 'gulp-autoprefixer', description: '…'}, …]

console.log(await npmKeywordNames('gulpplugin'));
//=> ['gulp-autoprefixer', …]

console.log(await npmKeywordCount('gulpplugin'));
//=> 3457
```

## Caveat

The list of packages will contain a maximum of 250 packages matching the keywords. This limitation is caused by the [npm registry API](https://github.com/npm/registry/blob/master/docs/REGISTRY-API.md#get-v1search).

## API

### npmKeyword(keywords, options?)

Returns a promise for a list of packages having the specified keyword in their package.json `keywords` property.

#### keywords

Type: `string | string[]`\
Example: `['string', 'camelcase']`

One or more keywords. Only matches packages that have *all* the given keywords.

#### options

Type: `object`

##### size

Type: `number`\
Default: `250`

Limits the amount of results.

### npmKeywordNames(keywords, options?)

Returns a promise for a list of package names.

#### keywords

Type: `string | string[]`\
Example: `['string', 'camelcase']`

One or more keywords. Only matches packages that have *all* the given keywords.

#### options

Type: `object`

##### size

Type: `number`\
Default: `250`

Limits the amount of results.

### npmKeywordCount(keywords)

Returns a promise for the count of packages.

#### keywords

Type: `string | string[]`\
Example: `['string', 'camelcase']`

One or more keywords. Only matches packages that have *all* the given keywords.

## Related

- [package-json](https://github.com/sindresorhus/package-json) - Get the package.json of a package from the npm registry
- [npm-user](https://github.com/sindresorhus/npm-user) - Get user info of an npm user
- [npm-email](https://github.com/sindresorhus/npm-email) - Get the email of an npm user

---
_Source: https://npm.io/package/npm-keyword · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
