Scraper API
npmnpm.searchAvailable
npm search
A page of the packages found: name, latest version, description, keywords, licence, publisher, links, weekly and monthly downloads, and how many packages depend on it.
Give it Words to search for; npm's own qualifiers such as keywords:cli or author:sindresorhus work too.
1 unit a run, for runs that return data. Runs that fail cost nothing. How units work
- Counted
- 1 unit a run
- Inputs
- 3, 1 required
- Record
- 18 fields
- A run takes
- up to 5 minutes
- Records kept
- 7 days
- Measured
- its success, on the status page
POST/v1/scrapers/npm.search/runs
sent, and answered
a record of the run18 fields
ok1 unit a run
A record this scraper returned for this input. The first 9 of its 18 fields are set down here; the whole record is below.

What it is used for
- Find packages for a job
- Search npm by words or by its own qualifiers and get each package with its version, description, licence, weekly downloads and dependents.
- Compare the options
- Set the results side by side by
downloads_last_weekanddependentsto see which packages others rely on, and which are still maintained. - Map an ecosystem
- Search a framework's keyword and count the packages it returns by licence and by when each last published a version.
What you send
Words to search for; npm's own qualifiers such as keywords:cli or author:sindresorhus work too. These are its 3 inputs, as its schema has them.
querystring Required- The words to search for, and npm's qualifiers: keywords:, author:, maintainer:, scope:.
max_resultsinteger Optional- Packages a page: 1 to 250, 20 unless you say otherwise.Default
20 pageinteger Optional- The results page, from 1.Default
1
A request, ready to send
It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.
# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/npm.search/runs?wait=60" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"query":"html scraper","max_results":5}}'
# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
-H "Authorization: Bearer $ENRICHEDNOW_API_KEY"from enrichednow import EnrichedNow
client = EnrichedNow() # reads ENRICHEDNOW_API_KEY
# Start a run, wait for it to end, and get its records
result = client.scrape("npm.search", {
"query": "html scraper",
"max_results": 5,
})
print(result.run.id, result.run.status, result.run.record_count)
# Read its records: pages are fetched as you go
for record in result.records:
print(record)Install it with pip install enrichednow, then save as run.py and run python3 run.py
import EnrichedNow from "enrichednow";
const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("npm.search", {
query: "html scraper",
max_results: 5,
});
console.log(run.id, run.status, run.record_count);
// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);Install it with npm install enrichednow, then save as run.mjs and run node run.mjs
package main
import (
"context"
"fmt"
"log"
"time"
enrichednow "github.com/enrichednow/enrichednow-go"
)
func main() {
client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
if err != nil {
log.Fatal(err)
}
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
defer cancel()
// Start a run, wait for it to end, and get its records
run, records, err := client.Scrape(ctx, "npm.search", map[string]any{"query": "html scraper", "max_results": 5})
if err != nil {
log.Fatal(err)
}
fmt.Println(run.ID, run.Status, run.RecordCount)
// Read its records: pages are fetched as you go
for records.Next() {
fmt.Println(string(records.Current()))
}
if err := records.Err(); err != nil {
log.Fatal(err)
}
}Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go
import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;
public class Run {
public static void main(String[] args) {
EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY
// Start a run, wait for it to end, and get its records
ScrapeResult result = client.scrape("npm.search", Map.of("query", "html scraper", "max_results", 5));
System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());
// Read its records: pages are fetched as you go
for (Map<String, Object> record : result.records()) {
System.out.println(record);
}
}
}Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java
enrichednow run npm.search --input 'query=html scraper' --input max_results=5Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh
What comes back
A page of the packages found: name, latest version, description, keywords, licence, publisher, links, weekly and monthly downloads, and how many packages depend on it. A record has 18 fields. One we could not read is null, never an empty string or a zero.
{
"position": 1,
"page": 1,
"name": "@kaufman-bot/html-scraper-server",
"url": "https://www.npmjs.com/package/@kaufman-bot/html-scraper-server",
"version": "3.5.2",
"description": "Html scraper commands and tools",
"keywords": [
"kaufman-bot",
"nx",
"nests"
],
"license": "MIT",
"published_at": "2022-11-29T14:46:46.064000Z",
"publisher": "endykaufman",
"maintainers": [
"endykaufman"
],
"homepage": "https://github.com/EndyKaufman/kaufman-bot",
"repository": "https://github.com/EndyKaufman/kaufman-bot",
"downloads_last_week": 549,
"downloads_last_month": 779,
"dependents": 0,
"score": 266.39908,
"fetched_at": "2026-11-19T18:07:41.021403Z"
}The scraper returned this record for the input above, reading a saved copy of the page, not the live site.
Values shortened for this page: keywords: 5 items, the first 3 shown.
The fields of a record
positioninteger- The package's place in the whole result list, from 1.
pageinteger- The results page the package was on.
namestring- The package's name, with its scope when it has one.
urlstring- The package's page on npmjs.com.
versionstring or null- The package's latest version.
descriptionstring or null- The package's one-line description.
keywordslist of strings- The package's keywords.
licensestring or null- The licence the package declares.
published_atdatetime or null- When the latest version was published, in UTC.
publisherstring or null- The npm username of the account that published the latest version.
maintainerslist of strings- The npm usernames of the accounts that can publish the package.
homepagestring or null- The website the package names.
repositorystring or null- The source repository's address.
downloads_last_weekinteger or null- Downloads in the last week, as the search states them.
downloads_last_monthinteger or null- Downloads in the last month, as the search states them.
dependentsinteger or null- How many other packages depend on this one, as the search counts them.
scorenumber or null- npm's own relevance score for the package in this search: higher is a better match.
fetched_atdatetime- When the results were read, in UTC.
Units and limits
- Counted per request
- Billed per request: a run that returns data costs 1 unit, however many records it returns.
- A miss costs nothing
- A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
- What bounds a run
- A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.
What it does not do
- One run reads one page of results, in npm's own order.
The bounds its schema sets
max_results- 1 to 250; 20 unless you say otherwise
page- 1 to 400; 1 unless you say otherwise
Questions
What does npm search return?
A page of the packages found: name, latest version, description, keywords, licence, publisher, links, weekly and monthly downloads, and how many packages depend on it. A record has 18 fields, among them position, page, name, url, version and description. A value that could not be read is null, never an empty string or a zero.
What do I send?
Words to search for; npm's own qualifiers such as keywords:cli or author:sindresorhus work too. The input query is required. Optional: max_results and page.
How is it counted?
Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.
How much does one run return?
Its schema sets these bounds: max_results 1 to 250 (20 unless you say otherwise); page 1 to 400 (1 unless you say otherwise). A run may take up to 5 minutes.
What does it not do?
One run reads one page of results, in npm's own order.
How long are the records kept, and in what format do they come?
Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.
Can an AI assistant call it?
Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id npm.search and the same input. It costs what the same API call costs.
npm
Packages of the npm registry: a package's details, versions and download counts, and the registry's search.
npm package
npm.packageA package's name, with its scope when it has one, or its address on npmjs.com. Its description, latest version, distribution tags, licence, keywords, links, maintainers, dependencies, size, its versions with the date of each, and its downloads in the last day, week and month.
- Industry
- Code and research
- Where
- Worldwide
Run it on an input of your own.
Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.