# PyPI Scraper - Python Package Versions & Downloads (`automly/pypi-package-metadata-api`) Actor

Look up Python packages on PyPI: latest version, summary, downloads for the last day, week and month, license, dependencies, supported Python versions, project links and release history. Export to CSV, JSON or Excel, schedule runs or use the API.

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

## Pricing

$0.50 / 1,000 result item produceds

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

## PyPI Scraper - Python Package Versions & Downloads

### What is PyPI Scraper?

**PyPI Scraper** is a tool that lets you **scrape Python package data from PyPI (the Python Package Index)**: current version, summary, license, supported Python versions, dependencies, project links, first and latest release dates and download counts for the last day, week and month. Or get the full version history of a package, newest first. Add package names, click **Start**, and download the data as Excel, CSV or JSON.

- 📦 **Up to 50 packages per run:** paste a list like `requests,django,numpy`
- 📈 **Downloads:** installs from PyPI over the last day, 7 days and 30 days on every package
- 🕓 **Version history:** every released version with its upload date, file count and yanked flag
- 🔓 **No login:** no PyPI account or API key needed
- 💸 **Free to try:** the $5 of free usage every Apify account gets each month covers about 10,000 packages or versions

### What can PyPI Scraper do?

- Look up Python package metadata in bulk
- Get PyPI download counts for the last day, week and month
- Check the license and supported Python versions of every package in a `requirements.txt`
- Get the dependencies of a Python package
- Get the full release history of a PyPI package, newest first
- Find yanked (withdrawn) versions of a package
- See which package names do not exist on PyPI
- Export to Excel, CSV, JSON, HTML or XML, or send the data to Google Sheets, Make, Zapier and more

### What data can you extract from PyPI?

| | | |
|---|---|---|
| 📦 Package name | 🔢 Current version | 📝 Summary and description (first 1,000 characters) |
| 👤 Author and maintainer, with emails | ⚖️ License | 🐍 Supported Python versions |
| 🔗 Homepage, docs and repository links | 🧩 Dependencies | 🏷️ Keywords and classifiers |
| 📈 Downloads last day, week and month | 📅 First and latest release date | 🔁 Number of releases |
| 🕓 Each version's upload date | 🗂️ Files per version | ⛔ Yanked flag |

### How to scrape PyPI

1. [Create a free Apify account](https://console.apify.com/sign-up) (no credit card needed).
2. Open **PyPI Scraper**.
3. Enter **Package names** separated by commas, for example `requests,django,numpy`.
4. Pick the **Mode** (**Package metadata** or **Version history**), set **Max results**, then click **Start**.
5. When the run finishes, open the **Output** tab: the **Packages** view shows the key columns and **Versions** shows the version history. Download the data as Excel, CSV, JSON, HTML or XML.

### How much does it cost to scrape PyPI packages?

You pay **$0.50 per 1,000 rows**, where a row is one package in package mode or one version in version history mode. Platform usage is included in this price, so there is nothing else to pay. Rows for package names that do not exist on PyPI are free.

For example, looking up 20 packages costs $0.01, and 1,000 packages or versions cost $0.50.

Every Apify account gets **$5 of free usage each month**, so you can try it at no cost. See the **Pricing** tab for details.

### ⬇️ Input

| Setting | What it does |
|---|---|
| Mode | **Package metadata** for one row per package with its metadata and downloads (default), **Version history** for one row per released version, newest first |
| Package names | Comma-separated package names as on pypi.org, such as `requests,django,numpy` |
| Max results | Package mode: how many packages (up to 50). Version history mode: how many versions per package (up to 50). Default 10 |
| Include classifiers | Add the PyPI classifiers: license, Python versions, development status and topics (on by default) |

Example: metadata and downloads for three packages.

```json
{
  "packages": "requests,django,numpy",
  "maxResults": 10,
  "includeClassifiers": true
}
```

To get the 20 latest versions of Django instead, set **Mode** to **Version history**, **Package names** to `django` and **Max results** to `20`.

### ⬆️ Output

In package mode you get one row per package. You can view the rows as a table in Apify Console or download them as Excel, CSV, JSON, HTML or XML.

```json
{
  "packageName": "Django",
  "version": "6.1.1",
  "summary": "A high-level Python web framework that encourages rapid development and clean, pragmatic design.",
  "description": "======\nDjango\n======\n\nDjango is a high-level Python web framework that encourages rapid development\nand clean, pragmatic...",
  "author": "",
  "authorEmail": "Django Software Foundation <foundation@djangoproject.com>",
  "maintainer": "",
  "maintainerEmail": "",
  "license": "BSD-3-Clause",
  "homepageUrl": "https://www.djangoproject.com/",
  "documentationUrl": "https://docs.djangoproject.com/",
  "repositoryUrl": "https://github.com/django/django",
  "packageUrl": "https://pypi.org/project/Django/",
  "keywords": "",
  "classifiers": "Development Status :: 5 - Production/Stable, Environment :: Web Environment, Framework :: Django, Intended Audience :: Developers, ...",
  "requiresPython": ">=3.12",
  "requiresDist": "asgiref>=3.9.1, sqlparse>=0.5.0, tzdata; sys_platform == \"win32\", argon2-cffi>=23.1.0; extra == \"argon2\", bcrypt>=4.1.1; extra == \"bcrypt\"",
  "downloadsLastDay": 810614,
  "downloadsLastWeek": 9807776,
  "downloadsLastMonth": 40611169,
  "firstReleaseDate": "2010-05-17T20:04:28",
  "latestReleaseDate": "2026-09-02T17:20:39",
  "releaseCount": 442,
  "recordType": "package_metadata"
}
```

In version history mode each row is one version, newest upload first, with `recordType: "version_listing"`. The fields that matter there are `packageName`, `version`, `uploadTime`, `fileCount` and `isYanked`; the package metadata fields are left empty.

A package name that does not exist on PyPI gets a row with `recordType: "error"` and the summary `Error: package not found on PyPI`, so you can see which names to fix. Those rows are free.

### How can I use PyPI data?

- **Dependency audits:** license, Python support and last release date for everything in a `requirements.txt`
- **Choosing a library:** compare downloads, release pace and maintainers before you pick one
- **Release tracking:** watch your own or competitors' packages for new releases on a schedule
- **Ecosystem research:** study Python tooling by downloads, licenses and Python versions
- **Internal catalogs:** feed package data into dashboards, search or a software inventory

### How to monitor PyPI packages for new releases

1. Enter your **Package names** and keep **Mode** on `package`.
2. [Schedule the actor](https://docs.apify.com/platform/schedules) to run every day.
3. Compare `version` or `latestReleaseDate` between runs, or connect a Slack, email or webhook [integration](https://apify.com/integrations).

### Scrape more developer and package data

| Actor | What it gets |
|---|---|
| [PyPI Release Monitor API](https://apify.com/automly/pypi-release-monitor-api) | Latest release or recent versions of PyPI packages, for release tracking |
| [NPM Package Metadata API](https://apify.com/automly/npm-package-metadata-api) | npm package versions, maintainers, licenses and repository links |
| [RubyGems Release Monitor API](https://apify.com/automly/rubygems-release-monitor-api) | Latest releases and versions of Ruby gems |
| [Docker Hub Tag Monitor API](https://apify.com/automly/docker-hub-tag-monitor-api) | Docker Hub image tags, digests and sizes |
| [GitHub Repository & Issue Scraper](https://apify.com/automly/github-repo-scraper) | GitHub repository data, issues, pull requests and contributors |
| [Stack Exchange Questions API](https://apify.com/automly/stack-exchange-questions-api) | Stack Overflow and Stack Exchange questions |

### ❓FAQ

#### How much does it cost to scrape PyPI?

$0.50 per 1,000 packages or versions, with platform usage included; names that are not found are free. See the cost section above and the **Pricing** tab.

#### How many packages can I look up in one run?

Up to 50 packages per run. In version history mode you get up to 50 versions for each package. For more, split your list over several runs.

#### Do I need a PyPI account or API key?

No. You don't need a PyPI account or an API key. The data is public.

#### Where do the download counts come from?

They are the public PyPI download statistics, which count installs from PyPI over the last day, 7 days and 30 days. If the statistics are briefly unavailable for a package, those three fields are left empty instead of showing a wrong number.

#### Why is the "version" not the most recently uploaded release?

It is the current release PyPI shows on the package page. Projects sometimes upload a fix for an older line after their latest release (for example a Django 5.2 security fix after 6.1), and that should not be reported as the newest version. The `latestReleaseDate` field still shows the most recent upload.

#### Can I monitor packages for new releases?

Yes. Schedule the actor daily in Apify Console and compare `version` or `latestReleaseDate` between runs, or connect a Slack, email or webhook integration.

#### Is the full project description included?

The first 1,000 characters, which is enough for search and previews. The `packageUrl` links to the full page.

#### Can I connect PyPI Scraper to other tools or AI agents?

Yes. Start runs and download results with the Apify API or the Python and JavaScript clients, send results to Make, Zapier, n8n, Google Sheets or Slack with Apify integrations and webhooks, or let AI assistants and agents run it through the Apify MCP server at [mcp.apify.com](https://mcp.apify.com).

#### Is it legal to scrape PyPI?

PyPI Scraper only collects package information that projects publish on PyPI for everyone to see. Author and maintainer names and emails are personal data, which may be protected by laws such as GDPR, so only scrape it for a legitimate reason and ask a lawyer if you are unsure. You can read more in [Is web scraping legal?](https://blog.apify.com/is-web-scraping-legal/)

PyPI Scraper is an independent tool. It is not affiliated with, endorsed by or sponsored by PyPI or the Python Software Foundation.

#### Something isn't working?

Open the **Issues** tab and tell us the package names and what you expected.

### ⭐ Your feedback

Have an idea or found a problem? Tell us on the **Issues** tab. If PyPI Scraper saved you time, a short review on the **Reviews** tab helps other people find it.

# Actor input Schema

## `endpoint` (type: `string`):

'package' returns one row per package with its metadata and download counts; 'simple' returns one row per released version, newest first.

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

Comma-separated Python package names, as on pypi.org, such as 'requests,django,numpy'.

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

Package mode: how many packages to return (up to 50). Version history mode: how many versions to return per package (up to 50).

## `includeClassifiers` (type: `boolean`):

Include the PyPI classifiers (license, Python versions, development status, topics).

## Actor input object example

```json
{
  "endpoint": "package",
  "packages": "requests,django,numpy",
  "maxResults": 10,
  "includeClassifiers": true
}
```

# Actor output Schema

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

Every row with all fields, including description, classifiers and dependencies.

## `overview` (type: `string`):

One row per package: version, summary, monthly downloads, license, Python support and links.

## `versions` (type: `string`):

Version history rows (Mode: Version history).

# 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": "requests,django,numpy"
};

// Run the Actor and wait for it to finish
const run = await client.actor("automly/pypi-package-metadata-api").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": "requests,django,numpy" }

# Run the Actor and wait for it to finish
run = client.actor("automly/pypi-package-metadata-api").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": "requests,django,numpy"
}' |
apify call automly/pypi-package-metadata-api --silent --output-dataset

```

## MCP server setup

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

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/3WicmOQyCPImRAoh6/builds/OVPtK68VVwWXfvriK/openapi.json
