Search Packages
npm.search_packages
ActionBusiness appsconnection required
Calls the npm Registry API with the connection's credentials.
Search the registry's full-text index for packages.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- npm Registry
- Secret shape
- optional — the npm token, or {"api_token": "…"}; reads need none
- Config it needs
- base_url
- Resolved by
- config.connection_id, else node.connection_id
Configuration
6 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
text The search text. npm also understands qualifiers here, such as author:sindresorhus, scope:acme or keywords:cli. | string | Yes | — | — | react hooks |
size How many results to return; the registry returns 20 by default and allows at most 250. | number | No | 20 | 1–250 | — |
offset How many results to skip, for paging through a large search. | number | No | 0 | ≥ 0 | — |
quality How much the ranking should weigh code quality, from 0 to 1. | number | No | — | 0–1 | — |
popularity How much the ranking should weigh popularity, from 0 to 1. | number | No | — | 0–1 | — |
maintenance How much the ranking should weigh maintenance, from 0 to 1. | number | No | — | 0–1 | — |
Example configuration
Every value below is the contract’s own example or default — nothing invented.
{
"offset": 0,
"size": 20,
"text": "react hooks"
}Output
One shape.
result
| Field | Type | Example |
|---|---|---|
items The search results on this page. | array | — |
count How many results this page carried. | number | — |
total How many packages matched in total. | number | — |
time When the registry served the search. | string | — |
items[].package.name The package name. | string | — |
items[].package.version The version the result describes. | string | — |
items[].package.description The package description. | string | — |
items[].package.keywords The package's keywords. | array | — |
items[].package.date When that version was published, as an ISO 8601 stamp. | string | — |
items[].package.links Links to npm, the homepage, the repository and bugs. | object | — |
items[].package.publisher Username and email of whoever published it. | object | — |
items[].package.maintainers The package's maintainers. | array | — |
items[].score.final npm's overall search score for the result. | number | — |
items[].score.detail That score broken into quality, popularity, maintenance. | object | — |
items[].searchScore The raw text-match score for the query. | number | — |
{
"count": 0,
"items": [
{
"package": {
"date": "",
"description": "",
"keywords": [],
"links": {},
"maintainers": [],
"name": "",
"publisher": {},
"version": ""
},
"score": {
"detail": {},
"final": 0
},
"searchScore": 0
}
],
"time": "",
"total": 0
}Related npm Registry nodes
See Search Packages run in a workflow.
In a technical demo we add the npm Registry connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.