Search npm packages
Search the npm registry by words and qualifiers, ranked by npm's search score; a page past the results is empty.
Headers
Get your API keyAPI key (`sfk_...`)
Search text, 2 to 64 characters. A single emoji counts as two characters. The registry's qualifiers work: `author:isaacs`, `maintainer:`, `keywords:a,b`, `not:deprecated`, `@scope`.
Ranking: `optimal` (npm's blend), or a single component. Default: `optimal`.
one of: optimal, popularity, quality, maintenance
Quality weight, 0 to 1.
≥ 0 · ≤ 1
Popularity weight, 0 to 1.
≥ 0 · ≤ 1
Maintenance weight, 0 to 1.
≥ 0 · ≤ 1
Results per page, 1 to 250. Default: 20.
≥ 1 · ≤ 250
1-based page number. The registry accepts a starting offset only up to 5000, so a page past the reachable results is an empty page. Default: 1.
≥ 1 · ≤ 10000
Cursor from `page.nextCursor` of the previous response. It only continues the same lookup and filters.
min 1 chars · max 2048 chars
Endpoint-specific response payload.
A page of search results.
Package name.
Latest version.
Description.
Keywords.
Licence.
Homepage.
Repository URL.
Issue tracker URL.
When the latest version was published.
Who published the version. E-mail addresses are not exposed.
Publishing username.
The CI identity, when the version was published by one.
Trusted publisher kind, e.g. `github`.
The publisher's OIDC configuration id.
Who approved a trusted publication.
Approving username.
Maintainers of the package.
Maintainer username.
Search scoring.
Final search score.
Quality component.
Popularity component.
Maintenance component.
The registry's ranking score.
Download counts npm includes with a search result.
Weekly downloads.
≥ 0
Monthly downloads.
≥ 0
How many packages depend on it.
≥ 0
When the registry last indexed the package.
Total matches the registry reports. Only the first 5,250 can be paged; `page.hasMore` follows that real limit.
≥ 0
Pagination state for this page.
Whether another page is available.
Opaque cursor for the next request; null on the last page.
The 1-based page number of this response, when numbered.
≥ 0
Rows per page, when fixed.
≥ 0
Total rows, or null when npm does not publish one.
≥ 0
Metadata describing the request and billing outcome.
Unique request identifier for tracing this API call.
min 1 chars
Credits charged for this request.
≥ 0
Public API version that served the response.
one of: v1
Code example
curl "https://api.socialfetch.dev/v1/npm/packages/search?query=react" \
-H "x-api-key: YOUR_API_KEY"Responses
npm search.