# npm Package Insights & Downloads Scraper (`receptional_blender/npm-package-insights`) Actor

Turn any list of npm package names into clean, structured JSON — latest version, license, repository, keywords, author, dependency counts, engine constraints and weekly/monthly download totals. Straight from the public npm registry: no API key, no login, no proxy.

- **URL**: https://apify.com/receptional\_blender/npm-package-insights.md
- **Developed by:** [Assia Fadli](https://apify.com/receptional_blender) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## npm Package Insights

Turn a list of npm package names into clean, structured JSON — metadata **and** download momentum — straight from the **public [npm registry](https://registry.npmjs.org/)**. No API key, no login, and no proxy required.

### Why use it

- **One tidy row per package.** Every result is a flat JSON object, ready to drop into a spreadsheet, database or dashboard.
- **Popularity built in.** Alongside the metadata you get **weekly** and **monthly** download totals from the npm downloads API.
- **Scoped packages welcome.** `@babel/core`, `@types/node` and friends all work.
- **Resilient.** Popular packages that hide their README in the aggregated document are backfilled from the latest version, and a single bad name never fails the whole run.
- **Zero setup.** Both npm APIs are free and public, so there is nothing to configure.

### Input

| Field | Type | Default | Description |
| --- | --- | --- | --- |
| `packages` | array | **required** | npm package names to look up, e.g. `["react", "express", "apify"]`. Scoped packages are supported. |
| `maxResults` | integer | all provided | Maximum number of packages to fetch from the list. |

#### Example input

```json
{
  "packages": ["react", "express", "apify"]
}
```

### Output

Each dataset record looks like this:

```json
{
  "name": "express",
  "description": "Fast, unopinionated, minimalist web framework",
  "latestVersion": "4.19.2",
  "license": "MIT",
  "homepage": "http://expressjs.com/",
  "repository": "git+https://github.com/expressjs/express.git",
  "keywords": ["express", "framework", "web", "middleware"],
  "author": "TJ Holowaychuk",
  "maintainersCount": 2,
  "dependenciesCount": 31,
  "devDependenciesCount": 26,
  "engines": { "node": ">= 0.10.0" },
  "weeklyDownloads": 34000000,
  "monthlyDownloads": 145000000,
  "created": "2010-12-29T19:38:25.450Z",
  "lastPublish": "2024-03-25T18:00:00.000Z",
  "readme": "# Express …",
  "npmUrl": "https://www.npmjs.com/package/express"
}
```

| Field | Description |
| --- | --- |
| `name` | Package name. |
| `description` | Short package description. |
| `latestVersion` | The `latest` dist-tag version. |
| `license` | SPDX license identifier. |
| `homepage` | Project homepage URL. |
| `repository` | Source repository URL. |
| `keywords` | Array of keywords. |
| `author` | Author name. |
| `maintainersCount` | Number of maintainers. |
| `dependenciesCount` | Runtime dependency count for the latest version. |
| `devDependenciesCount` | Dev dependency count for the latest version. |
| `engines` | Declared engine constraints (e.g. Node version), if any. |
| `weeklyDownloads` | Downloads in the last week. |
| `monthlyDownloads` | Downloads in the last month. |
| `created` | When the package was first published (ISO 8601). |
| `lastPublish` | When the latest version was published (ISO 8601). |
| `readme` | Package README, truncated to ~2000 characters. |
| `npmUrl` | Link to the package page on npmjs.com. |

If a package can't be fetched (for example it doesn't exist), the row is `{ "name": "<name>", "error": "<message>" }` instead.

### Pricing

This actor uses Apify's **pay-per-event** model. You are charged once per **`package-scraped`** event — a single charge for every package successfully delivered to the dataset. Packages that fail to fetch (the `error` rows) are never charged.

### Data source

This actor uses the public npm APIs:

- Metadata: `https://registry.npmjs.org/<package>` (scoped packages URL-encode the `/` as `%2F`).
- Downloads: `https://api.npmjs.org/downloads/point/last-week/<package>` and `.../last-month/<package>`.

Both are free and require no authentication.

### Author

Built and maintained by **Assia Fadli**. Licensed under MIT.

# Actor input Schema

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

npm package names to look up. Scoped packages are supported, e.g. "@babel/core".

## `maxResults` (type: `integer`):

Maximum number of packages to fetch from the list above. Defaults to all provided.

## Actor input object example

```json
{
  "packages": [
    "react",
    "express",
    "apify"
  ]
}
```

# 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 = {
    "packages": [
        "react",
        "express",
        "apify"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("receptional_blender/npm-package-insights").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 = { "packages": [
        "react",
        "express",
        "apify",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("receptional_blender/npm-package-insights").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "packages": [
    "react",
    "express",
    "apify"
  ]
}' |
apify call receptional_blender/npm-package-insights --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=receptional_blender/npm-package-insights",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/zJLzZjip0S9ydO94Z/builds/gJlXzb5HsqV4S3ReA/openapi.json
