# PyPI Package Downloads Tracker (`gochujang/pypi-downloads-tracker`) Actor

Track and compare PyPI package download statistics including daily, weekly, and monthly counts. Fetch metadata from PyPI JSON API and system breakdowns by OS and Python version. Compare multiple packages side-by-side ranked by downloads. No API key required.

- **URL**: https://apify.com/gochujang/pypi-downloads-tracker.md
- **Developed by:** [Hojun Lee](https://apify.com/gochujang) (community)
- **Categories:** Developer tools
- **Stats:** 2 total users, 1 monthly users, 50.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## PyPI Package Downloads Tracker

**PyPI Package Downloads Tracker** fetches daily/weekly/monthly download counts, cumulative totals, OS and Python version breakdowns, and package metadata for any PyPI package — from free, no-auth APIs (pypistats.org + PyPI JSON API). Compare multiple packages side-by-side with `compareMode`. No API key required. $0.002/package.

PyPI download statistics are the most objective signal of Python library adoption. Whether you're choosing between competing libraries, tracking your own package's growth, or auditing dependencies, this actor gives you the numbers in structured form.

***

### Why use PyPI Package Downloads Tracker?

1. **Library selection** — Compare download velocity of competing libraries (numpy vs. polars vs. pandas) before adopting one for production. Monthly downloads + growth trend is the most honest signal of ecosystem momentum.
2. **Own package growth tracking** — Monitor your published PyPI package's daily/weekly/monthly downloads. Sudden spikes often reveal unexpected users; sudden drops reveal breaking changes.
3. **Dependency audit** — Before adding a dependency, check whether it's actively maintained and widely used. Very low download counts = potential orphaned library risk.
4. **Competitive intelligence** — Track downloads for AI libraries (anthropic, openai, transformers, langchain) to understand relative adoption of competing SDKs in real time.
5. **OS/Python version breakdown** — `includeSystemBreakdown: true` shows which Python versions and operating systems dominate the user base — critical for setting support matrix priorities.

***

### How to use

1. Open the actor on Apify Store and click **Try for free**.
2. Set `packages` to the PyPI package names you want to analyze (e.g. `["numpy", "pandas", "polars"]`).
3. Enable `compareMode: true` to get a side-by-side ranking record.
4. Enable `includeSystemBreakdown: true` for OS + Python version data.
5. Click **Start**. Returns one structured record per package.

***

### Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `packages` | string\[] | *required* | PyPI package names to analyze |
| `includeMetadata` | boolean | `true` | Fetch version, author, license, summary from PyPI |
| `includeSystemBreakdown` | boolean | `false` | Per-OS and per-Python-version download breakdown |
| `includeOverall` | boolean | `true` | Cumulative totals with and without mirrors |
| `compareMode` | boolean | `false` | Append a summary record ranking packages by monthly downloads |

***

### Output

```json
{
  "package": "numpy",
  "downloads_last_day": 1234567,
  "downloads_last_week": 8901234,
  "downloads_last_month": 34567890,
  "downloads_with_mirrors": 35000000,
  "downloads_without_mirrors": 34567890,
  "rank": 1,
  "version": "1.26.4",
  "author": "Travis E. Oliphant et al.",
  "license": "BSD-3-Clause",
  "summary": "Fundamental package for array computing in Python",
  "homepage": "https://numpy.org",
  "pypi_url": "https://pypi.org/project/numpy/",
  "fetched_at": "2026-09-02T12:00:00+00:00"
}
```

**With `includeSystemBreakdown: true`:**

```json
{
  "system_breakdown": {"Linux": 20000000, "Windows": 9000000, "Darwin": 5000000},
  "python_breakdown": {"3.11": 12000000, "3.12": 10000000, "3.10": 8000000}
}
```

***

### Cost estimation

**Pay-Per-Event: $0.005 startup + $0.002 per package analyzed.**

| Use case | Packages | Estimated cost |
|----------|---------|----------------|
| Single package check | 1 | ~$0.007/run |
| Compare 5 packages | 5 | ~$0.015/run |
| Monitor 10 packages weekly | 10 | ~$0.025/week |
| Compare 20 AI libraries | 20 | ~$0.045/run |

***

### FAQ

**How current is the download data?**
pypistats.org updates daily, typically with a ~24-hour lag. Very new packages (< 1 day on PyPI) may return null for counts.

**What's the difference between `with_mirrors` and `without_mirrors`?**
`downloads_with_mirrors` includes CDN-served downloads from pip mirrors and CI caches. `downloads_without_mirrors` is closer to "direct user installs." For most analysis, use `downloads_without_mirrors` to avoid inflated numbers from automated mirrors.

**Does it include GitHub Actions / CI downloads?**
Yes — pip installs from CI/CD pipelines (GitHub Actions, CircleCI, etc.) are counted in download statistics. This is a significant portion of downloads for popular packages.

**Can I track private packages?**
No — the actor only accesses public PyPI packages via the public API. Private packages hosted on PyPI or private registries (Artifactory, devpi) are not accessible.

***

### Related actors

- [AI Model Tracker](https://apify.com/gochujang/openai-model-tracker) — Track AI provider models alongside SDK (anthropic, openai) download trends
- [GitHub Repo Stats Tracker](https://apify.com/gochujang/github-repo-stats) — GitHub stars/forks to complement PyPI download statistics
- [PyPI Package Analyzer](https://apify.com/gochujang/pypi-package-analyzer) — Deeper analysis: vulnerability checks, dependency graphs, security audits

### Feedback

If this actor helps your library research, a review helps others find it: [Leave a review on Apify Store](https://apify.com/gochujang/pypi-downloads-tracker#reviews)

# Actor input Schema

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

List of PyPI package names to analyze (e.g. \["numpy", "pandas", "requests"])

## `includeMetadata` (type: `boolean`):

Fetch package metadata from PyPI JSON API (version, author, license, summary, keywords, homepage)

## `includeSystemBreakdown` (type: `boolean`):

Fetch download breakdown by operating system and Python version from pypistats.org

## `includeOverall` (type: `boolean`):

Fetch overall cumulative download totals with and without mirrors from pypistats.org

## `compareMode` (type: `boolean`):

Append a summary comparison record ranking all packages by monthly downloads

## Actor input object example

```json
{
  "packages": [
    "numpy",
    "pandas",
    "requests"
  ],
  "includeMetadata": true,
  "includeSystemBreakdown": false,
  "includeOverall": true,
  "compareMode": false
}
```

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

// Run the Actor and wait for it to finish
const run = await client.actor("gochujang/pypi-downloads-tracker").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("gochujang/pypi-downloads-tracker").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 gochujang/pypi-downloads-tracker --silent --output-dataset

```

## MCP server setup

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

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/MQ3hbDmaNUoqpjIfP/builds/pSXAZhlgNfAID9tzT/openapi.json
