# Package Registry Scraper - PyPI and npm metadata (`thebee/packageregistryscraper`) Actor

Pull package metadata and full version history from PyPI and npm. Licences, versions, release dates, dependencies and vulnerability flags. No API keys, no browser.

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

## Pricing

from $2.00 / 1,000 package rows

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

## Package Registry Scraper

Package metadata and full version history from PyPI and npm. No API keys, no
browser.

### What you get

For each package: latest version, summary, description, author, **licence**,
home page, docs URL, keywords, `requires_python`, classifiers, release count,
first and last release dates, created/modified timestamps, and — for PyPI —
**known vulnerability flags**.

Scoped npm packages work (`@scope/name`).

### Usage

```
{
  "packages": "requests,left-pad,@types/node",
  "registry": "both"
}
```

One package is one HTTP request, so a 50-package audit costs 50 requests.

### Use cases

- **Dependency audit** — licence compatibility across a manifest
- **Supply-chain triage** — release cadence, first/last publish dates, sudden
  version jumps
- **Vulnerability screening** — PyPI advisory counts per package
- **Version-history analysis** — how long a package has been maintained
- **Forensics** — when did this dependency first appear, and how often has it
  shipped since?

### Honest notes

- `registry: "both"` queries PyPI *and* npm for each name. A name that exists
  on only one registry yields one row plus a `not found` entry in `errors` —
  that is expected, not a failure.
- A npm package named the same as a PyPI one is a **different package**. This
  scraper returns both, tagged by `registry`, rather than guessing which you
  meant.
- `vulnerabilityCount` is populated from PyPI only; npm does not expose
  equivalent data here.
- `yanked` is true when a release was withdrawn upstream.

*Pronouns: they/them.*

# Actor input Schema

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

Comma or space separated package names. Scoped npm packages work (@scope/name).

## `registry` (type: `string`):

Which registry to query. 'both' tries PyPI then npm for each name.

## Actor input object example

```json
{
  "packages": "requests,left-pad",
  "registry": "both"
}
```

# Actor output Schema

## `registry` (type: `string`):

The Registry recorded for this package.

## `name` (type: `string`):

The Name recorded for this package.

## `version` (type: `string`):

The Latest version recorded for this package.

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

The Summary recorded for this package.

## `description` (type: `string`):

The Description recorded for this package.

## `author` (type: `string`):

The Author recorded for this package.

## `license` (type: `string`):

The Licence recorded for this package.

## `homePage` (type: `string`):

The Home page recorded for this package.

## `docsUrl` (type: `string`):

The Docs URL recorded for this package.

## `packageUrl` (type: `string`):

The Package URL recorded for this package.

## `keywords` (type: `string`):

The Keywords recorded for this package.

## `requiresPython` (type: `string`):

The Requires Python recorded for this package.

## `classifiers` (type: `string`):

The Classifiers recorded for this package.

## `releaseCount` (type: `string`):

The Release count recorded for this package.

## `firstRelease` (type: `string`):

The First release recorded for this package.

## `lastRelease` (type: `string`):

The Last release recorded for this package.

## `createdAt` (type: `string`):

The Created recorded for this package.

## `modifiedAt` (type: `string`):

The Modified recorded for this package.

## `hasVulnerabilities` (type: `string`):

The Has vulnerabilities recorded for this package.

## `vulnerabilityCount` (type: `string`):

The Vulnerability count recorded for this package.

## `yanked` (type: `string`):

The Yanked recorded for this package.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("thebee/packageregistryscraper").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("thebee/packageregistryscraper").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 '{}' |
apify call thebee/packageregistryscraper --silent --output-dataset

```

## MCP server setup

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

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/LcoSGnBCBunmz16mT/builds/nggh1FfB2NUPLOR18/openapi.json
