# npm & PyPI Package Scraper — Downloads, Health & Maintenance (`samwise.agency/package-intel`) Actor

Package intelligence for npm and PyPI: download stats, publish recency, maintenance scores, license and repo metadata. Find abandoned dependencies, benchmark libraries, monitor your stack. Official APIs, keyless.

- **URL**: https://apify.com/samwise.agency/package-intel.md
- **Developed by:** [samwise.agency](https://apify.com/samwise.agency) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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 & PyPI Package Scraper — Downloads, Health & Maintenance

Dependency and market intelligence for the two biggest package ecosystems. Pulls **official registry data** (npm + PyPI) into one clean, unified schema: download trends, publish recency, maintenance signals, licenses, repos.

**What you can extract:**

- 📦 **Deep package lookups** — metadata + last-week/month/year downloads
- 🔍 **npm keyword search** — with npm's own quality/popularity/maintenance scores
- 🚨 **Maintenance signals** — `daysSinceLastPublish`, `deprecated`, version counts
- ⚖️ **Compliance fields** — license, repository, homepage

### Quick start

1. Click **Run** — default input looks up `npm:express` and `pypi:requests`
2. Paste your own dependency list (one package per line)
3. Schedule monthly = automated dependency health audit

### Sample output

```json
{
    "ecosystem": "npm",
    "name": "express",
    "url": "https://www.npmjs.com/package/express",
    "description": "Fast, unopinionated, minimalist web framework",
    "latestVersion": "5.1.0",
    "license": "MIT",
    "repository": "https://github.com/expressjs/express.git",
    "maintainersCount": 3,
    "versionsCount": 279,
    "createdAt": "2010-12-29T19:38:25.450Z",
    "lastPublishedAt": "2026-03-11T09:14:02.000Z",
    "daysSinceLastPublish": 131,
    "deprecated": false,
    "downloadsLastWeek": 32411890,
    "downloadsLastMonth": 138902114,
    "downloadsLastYear": 1620044120,
    "dependenciesCount": 27
}
```

### Use cases

- **Dependency audits** — flag abandoned packages (`daysSinceLastPublish` > 365) across your stack
- **Dev-tool market research** — compare adoption of competing libraries over time
- **Security/compliance** — license inventory for legal review
- **Content & DevRel** — "state of X ecosystem" posts backed by real download data
- **Investment research** — open-source traction signals for dev-tool startups

### Input reference

| Field | Type | Notes |
|---|---|---|
| `packages` | array | `npm:name`, `pypi:name`, or bare name (tries both) |
| `npmSearchQueries` | array | Keyword search with npm score fields |
| `maxSearchResults` | integer | Cap per search |

### Pricing

Pay per result row. Auditing a 100-dependency project costs well under a dollar.

### FAQ

**Where does the data come from?** Official APIs only: registry.npmjs.org, api.npmjs.org (downloads), pypi.org JSON API, pypistats.org.

**Scoped npm packages?** Supported — `npm:@scope/name` works.

# Actor input Schema

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

Package names for full metadata + download stats. Prefix to target one ecosystem: 'npm:express', 'pypi:requests'. No prefix = try both.

## `npmSearchQueries` (type: `array`):

Keyword searches on the npm registry (returns quality/popularity/maintenance scores per package).

## `maxSearchResults` (type: `integer`):

Cap per npm search query.

## Actor input object example

```json
{
  "packages": [
    "npm:express",
    "pypi:requests"
  ],
  "npmSearchQueries": [],
  "maxSearchResults": 25
}
```

# 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": [
        "npm:express",
        "pypi:requests"
    ],
    "npmSearchQueries": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("samwise.agency/package-intel").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": [
        "npm:express",
        "pypi:requests",
    ],
    "npmSearchQueries": [],
}

# Run the Actor and wait for it to finish
run = client.actor("samwise.agency/package-intel").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": [
    "npm:express",
    "pypi:requests"
  ],
  "npmSearchQueries": []
}' |
apify call samwise.agency/package-intel --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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