# 📦 Package Intelligence - npm & PyPI Health + Downloads (`that_red_bird/package-intel`) Actor

⚡ Profile any npm or PyPI package from the official registries. ✅ Downloads, versions, maintainers, licence, freshness, deprecation. ✅ Derived risk flags — DEPRECATED, UNMAINTAINED\_2Y, SINGLE\_MAINTAINER, NO\_LICENSE — for supply-chain audits. ✅ Discover a whole space by search.

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

## Pricing

Pay per event

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?

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

## Package Intelligence — npm & PyPI

Profile any npm or PyPI package from the **official registry APIs**: downloads, versions,
maintainers, licence, freshness, deprecation — plus derived risk flags for supply-chain audits.

### What you get per package

**Facts:** `name` · `description` · `latestVersion` · `versionCount` · `license` · `homepage` ·
`repository` · `keywords` · `maintainers` / `maintainerCount` · `createdAt` · `lastPublishedAt` ·
`dependencyCount` · `hasTypes` (npm) · `requiresPython` / `classifiers` (PyPI) ·
**`downloadsLastMonth`** (npm)

**Derived signals** — the part you would otherwise compute yourself:

| Flag | Meaning |
|---|---|
| `DEPRECATED` | the maintainer marked it deprecated |
| `UNMAINTAINED_2Y` | no release in over two years |
| `STALE_1Y` | no release in over a year |
| `SINGLE_MAINTAINER` | bus-factor of one |
| `NO_LICENSE` | no licence declared — a legal problem in commercial code |
| `HEAVY_DEPENDENCIES` | more than 30 direct dependencies |
| `YANKED_RELEASE` | a release was pulled (PyPI) |

Plus `riskScore` (0–100), `daysSincePublish` and `maintained`.

### Two modes

**Audit a list** — pass your `package.json` or `requirements.txt` names and set **`onlyRisky: true`**
to get back only the ones that need attention. That is a supply-chain review in one run.

**Map a space** — pass a `searchQuery` like `"pdf parser"` and it discovers packages via npm search,
then profiles every one. Useful for competitive research and for choosing a dependency on evidence
rather than vibes.

### Input

```json
{
  "packages": ["express", "lodash", { "name": "requests", "ecosystem": "pypi" }],
  "onlyRisky": true,
  "minDownloads": 1000
}
```

### Why it is reliable

Everything comes from `registry.npmjs.org`, `api.npmjs.org` and `pypi.org` — official, free,
documented APIs with no anti-bot. One deliberate omission: **pypistats.org is not used**, because it
rate-limits plain requests with HTTP 429, so PyPI rows carry no download count rather than an
unreliable one.

### Typical uses

Supply-chain and licence audits · dependency due diligence before adopting a package · dev-tool
companies tracking ecosystem adoption · security teams flagging unmaintained dependencies ·
investors measuring OSS traction · maintainers benchmarking against alternatives.

# Actor input Schema

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

Package names, e.g. express, lodash, requests. Mix ecosystems with objects: {"name":"requests","ecosystem":"pypi"}.

## `ecosystem` (type: `string`):

Used for any package given as a plain string.

## `searchQuery` (type: `string`):

Search npm for this term and profile everything it finds — useful for mapping a space, e.g. "pdf parser".

## `searchLimit` (type: `integer`):

How many packages to pull from the search before profiling them.

## `onlyRisky` (type: `boolean`):

Return only packages flagged deprecated, unmaintained, single-maintainer, unlicensed or dependency-heavy. This is the supply-chain audit mode.

## `minDownloads` (type: `integer`):

Drop packages below this download count (npm only).

## `includeDependencies` (type: `boolean`):

Include every direct dependency name. Off by default to keep rows small.

## `concurrency` (type: `integer`):

How many packages to look up in parallel.

## Actor input object example

```json
{
  "packages": [
    "express",
    "lodash"
  ],
  "ecosystem": "npm",
  "searchLimit": 20,
  "onlyRisky": false,
  "includeDependencies": false,
  "concurrency": 5
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `downloadCsv` (type: `string`):

No description

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

No description

## `count` (type: `string`):

No description

# 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": [
        "express",
        "lodash"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("that_red_bird/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": [
        "express",
        "lodash",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,that_red_bird/package-intel"
        }
    }
}
```

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/k2EmjaqsdVxlwSHA6/builds/OjH9EC2L6QaeRe3H6/openapi.json
