# npm Packages Scraper (`properscraper/npm-packages-scraper`) Actor

Search the npm registry or look up packages by name: version, description, weekly and monthly downloads, licence, keywords, maintainers, repository and dependencies. Uses the official public npm APIs.

- **URL**: https://apify.com/properscraper/npm-packages-scraper.md
- **Developed by:** [jake mcclure](https://apify.com/properscraper) (community)
- **Categories:** Developer tools, Open source
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.30 / 1,000 package saveds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## npm Packages Scraper

Search the npm registry or look up packages by name. For each package you get its version, description, weekly and monthly downloads, number of dependents, licence, keywords, maintainers and repository, and optionally its dependencies.

It uses npm's official public APIs. No login and no API key are needed.

Use it to:

- track downloads of your own packages and your competitors' on a schedule
- find every package for a keyword, author or organisation
- audit a list of dependencies: licence, last release, deprecation and size
- spot abandoned packages by their last release date
- build a market map of a JavaScript niche

### Input

| Field | What it does |
|---|---|
| **Searches** | One per line, as on npmjs.com. Qualifiers work: `keywords:scraper`, `author:sindresorhus`, `maintainer:name`. For an organisation's packages, search for its scope: `@apify`. |
| **Package names** | One per line for exact packages: `express`, `@types/node`, or a link to the npm page. |
| **Maximum packages per search** | Stop after this many for each search, best match first. Default 100. |
| **Include dependencies and package details** | Also read each package's latest version for dependencies, Node.js version, size, types and deprecation. |

```json
{
    "searches": ["keywords:scraper", "@apify"],
    "packages": ["undici", "@types/node"],
    "maxPackagesPerSearch": 250,
    "includeDetails": true
}
```

### Output

One record per package:

```json
{
    "source": "undici",
    "name": "undici",
    "version": "8.12.4",
    "description": "An HTTP/1.1 client, written from scratch for Node.js",
    "keywords": ["fetch", "http", "https", "promise", "request"],
    "license": "MIT",
    "publishedAt": "2026-11-05T08:55:59.361Z",
    "publisher": "matteo.collina",
    "maintainers": ["matteo.collina", "ronag", "ethan_arrowood"],
    "homepage": "https://undici.nodejs.org",
    "repository": "https://github.com/nodejs/undici",
    "bugsUrl": "https://github.com/nodejs/undici/issues",
    "npmUrl": "https://www.npmjs.com/package/undici",
    "weeklyDownloads": 328167119,
    "monthlyDownloads": 1144642479,
    "dependents": 9438,
    "author": null,
    "dependencies": {},
    "dependencyCount": 0,
    "peerDependencies": {},
    "devDependencyCount": 22,
    "engines": { "node": ">=22.19.0" },
    "hasTypes": true,
    "moduleType": "commonjs",
    "unpackedSize": 2185656,
    "fileCount": 218,
    "deprecated": null,
    "scrapedAt": "2026-11-12T19:00:00.000Z"
}
```

- `source` is the search or the package name the record was found under.
- `publishedAt` is the release date of the latest version.
- `dependents` is the number of other packages that depend on this one.
- The fields from `author` to `deprecated` are only present when **Include dependencies and package details** is on. `deprecated` holds the maintainer's notice when the package is deprecated.
- Maintainers are listed by npm username. Email addresses are not included.

A `SUMMARY` record in the run's key-value store lists, for each search or batch of names, how many packages were saved, any names that do not exist and any error.

### Pricing

Pay per result. You are charged once for each package saved to the dataset, at the per-result price shown on this page, with or without details.

Searches with no results and names that do not exist cost nothing. The run stops as soon as it reaches the maximum charge you set for it.

### Limits

- Search results and their order come from npm's own search, the same as on npmjs.com.
- A few packages are missing from npm's search index. Looked up by name they are still returned, but without a release date or a dependents count.
- Download counts are npm's published figures and include automated installs such as build servers.
- Only the latest version of each package is described. Older versions are not listed.
- Private packages are not returned.

### Is this allowed?

The Actor uses the public registry and download-count APIs that npm provides for programs, at a modest rate. You are responsible for how you use the data and for npm's terms of use.

# Actor input Schema

## `searches` (type: `array`):

One per line, as you would type into the search box on npmjs.com. npm's qualifiers work: keywords:scraper, author:sindresorhus, maintainer:name. To list an organisation's packages, search for its scope, such as @apify.

## `packages` (type: `array`):

One per line, to look up exact packages: express, @types/node, or a link to the package's page on npmjs.com.

## `maxPackagesPerSearch` (type: `integer`):

Stop after this many packages for each search, best match first.

## `includeDetails` (type: `boolean`):

Also read each package's latest version for its dependencies, Node.js version, size, TypeScript types and deprecation notice. One more request per package, so runs take longer.

## Actor input object example

```json
{
  "searches": [
    "keywords:scraper"
  ],
  "maxPackagesPerSearch": 100,
  "includeDetails": false
}
```

# Actor output Schema

## `packages` (type: `string`):

Every package saved by the run, one record per package.

## `summary` (type: `string`):

Totals for the run and, for each search or batch of package names, how many results were saved and any error.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "searches": [
        "keywords:scraper"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("properscraper/npm-packages-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "searches": ["keywords:scraper"] }

# Run the Actor and wait for it to finish
run = client.actor("properscraper/npm-packages-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searches": [
    "keywords:scraper"
  ]
}' |
apify call properscraper/npm-packages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,properscraper/npm-packages-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/hFfyU0GMa12ffo0ZB/builds/PxEcXNn46zfMFUwx4/openapi.json
