# PyPI Package Scraper - Python Metadata & Releases (`thirdwatch/pypi-package-scraper`) Actor

Export exact Python package metadata, dependencies, maintainers, classifiers, project links, vulnerabilities, and optional release summaries from PyPI. Built for research, benchmarking, and data pipelines. No login, cookies, or API keys — clean JSON output and pay-per-result pricing.

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

## Pricing

from $2.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## PyPI Package Scraper

> Export exact Python package metadata, dependencies, maintainers, project links, vulnerabilities, and release summaries from PyPI.

### What you get

Fetch current metadata for a bounded list of exact Python Package Index project names and save one clean Apify row per valid package. The output is designed for dependency inventories, package evaluation, internal developer portals, and scheduled version checks. Optional release summaries add version dates, file counts, byte sizes, Python requirements, and yanked status without returning every file object.

### Output fields

| Field | Description |
|---|---|
| `name`, `latest_version`, `summary` | Package identity and current release |
| `author`, `author_email`, `maintainer`, `maintainer_email` | Published ownership metadata |
| `license`, `requires_python`, `keywords` | Compatibility and classification fields |
| `dependencies` | Published `requires_dist` requirements |
| `classifiers` | PyPI trove classifiers |
| `project_urls`, `homepage`, `documentation_url` | Project resources |
| `vulnerabilities` | PyPI vulnerability records for the current release |
| `releases` | Optional bounded release summaries |
| `package_url`, `source_url`, `source` | Official PyPI links and attribution |

### Example output

```json
{"name":"requests","latest_version":"2.32.5","summary":"Python HTTP for Humans.","requires_python":">=3.9","package_url":"https://pypi.org/project/requests/"}
```

### Input parameters

| Parameter | Required | Description |
|---|---|---|
| `packageNames` | No | Exact names such as requests, pandas, or fastapi |
| `includeReleases` | No | Include bounded release summaries; defaults to false |
| `maxReleasesPerPackage` | No | Maximum release summaries per package; defaults to 10 |
| `maxResults` | No | Maximum package names processed; defaults to 10 |

### Use cases

- Platform teams can populate an internal Python package catalog.
- Security teams can surface vulnerability records alongside dependencies.
- Developers can monitor latest versions and supported Python ranges.
- Analysts can compare package classifiers, links, and maintenance metadata.

### Limitations

The Actor performs exact project lookups; PyPI retired its legacy XML-RPC search method, so this is not a keyword-search engine. Publisher-provided metadata can be incomplete, inconsistent, outdated, or use many license formats. Vulnerability results follow PyPI's current-release response and are not a substitute for a complete dependency scanner. Release ordering follows the upstream JSON object's published order and excludes releases with no files.

### Compared to alternatives

Compared with manually calling one PyPI JSON URL at a time, the Actor batches exact package names, skips missing projects without losing the remaining run, normalizes high-value fields, and integrates with Apify Tasks, schedules, webhooks, and datasets. Optional release summaries keep records practical for automation instead of copying the entire raw release-file graph.

### FAQ

#### Can I search for packages by keyword?

No. Provide exact project names. This avoids relying on the retired XML-RPC search interface.

#### Does a missing package fail the run?

No. The Actor logs the missing name and continues with the remaining packages.

Explore [PyPI Package Scraper on thirdwatch.dev](https://thirdwatch.dev/scrapers/pypi-package-scraper). Related Actors: [npm Package Scraper](https://apify.com/thirdwatch/npm-package-scraper), [GitHub Scraper](https://apify.com/thirdwatch/github-scraper), and [Google Search Scraper](https://apify.com/thirdwatch/google-search-scraper).

Last verified: 2026-07

# Actor input Schema

## `packageNames` (type: `array`):

Python package names such as requests, pandas, or fastapi.

## `includeReleases` (type: `boolean`):

Add bounded summaries of release versions and files.

## `maxReleasesPerPackage` (type: `integer`):

Maximum release summaries when release history is enabled.

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

Maximum exact package names to process.

## Actor input object example

```json
{
  "packageNames": [
    "requests",
    "pandas",
    "fastapi"
  ],
  "includeReleases": false,
  "maxReleasesPerPackage": 10,
  "maxResults": 10
}
```

# Actor output Schema

## `results` (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 = {
    "packageNames": [
        "requests",
        "pandas",
        "fastapi"
    ],
    "maxReleasesPerPackage": 10,
    "maxResults": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("thirdwatch/pypi-package-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 = {
    "packageNames": [
        "requests",
        "pandas",
        "fastapi",
    ],
    "maxReleasesPerPackage": 10,
    "maxResults": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("thirdwatch/pypi-package-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 '{
  "packageNames": [
    "requests",
    "pandas",
    "fastapi"
  ],
  "maxReleasesPerPackage": 10,
  "maxResults": 10
}' |
apify call thirdwatch/pypi-package-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,thirdwatch/pypi-package-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/cIPPnMVMT5hYLNqyK/builds/8IgRnhyoUmBXNyEpq/openapi.json
