# PyPI Python Packages & Maintainer Scraper — Downloads, Relea (`spotless_studios/pypi-packages-scraper`) Actor

Scrape Python packages from PyPI including 30-day download counts, author & maintainer emails, licenses, dependencies, classifiers, wheel availability, and release history.

- **URL**: https://apify.com/spotless_studios/pypi-packages-scraper.md
- **Developed by:** [Spotless Studios](https://apify.com/spotless_studios) (community)
- **Categories:** Developer tools, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 pypi package extracteds

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 Python Packages & Maintainer Scraper — Downloads, Releases & Emails

Extract structured PyPI Python package metadata, 30-day download volumes, maintainer emails, licenses, dependencies, and release cadence.

### Features

- **Zero-Browser Speed**: Fast HTTP/JSON extraction running on 256 MB RAM.
- **Rich Filtering & Direct Lookups**: Supports multi-query batching, direct URL/ID extraction, and keyword regex matching.
- **Monitoring Mode**: Enable `onlyNewItems` + `stateKey` for scheduled runs that only save and bill newly discovered items.
- **Flexible Output Presets**: `full`, `lean`, or `contacts` presets plus `outputFields`, `excludeFields`, and `requiredFields`.

### Input Parameters

| Parameter | Type | Default | Description |
|---|---|---|---|
| `searchQuery` | `string` | "ai" | Filter package names (e.g. "fastapi", "langchain", "playwright"). |
| `searchQueries` | `array` | "" | Optional list of search terms to match against PyPI package feeds. |
| `discoveryFeed` | `string` | "top_downloads" | Which PyPI index to crawl when packageNames is empty. |
| `packageNames` | `array` | "" | Scrape specific packages directly (e.g. "fastapi", "https://pypi.org/project/httpx/"). |
| `minDownloads30d` | `integer` | "" | Only keep packages with at least this many downloads in the last 30 days. |
| `author` | `string` | "" | Filter by author or maintainer name/email substring. |
| `license` | `string` | "" | Filter by license substring (e.g. "MIT", "Apache"). |
| `requiresPython` | `string` | "" | Filter by requires_python substring (e.g. "3.10", "3.11"). |
| `classifierFilter` | `string` | "" | Filter by PyPI Trove classifier substring (e.g. "Framework :: FastAPI", "Topic :: Scientific/Engineering :: Artificial Intelligence"). |
| `requireEmail` | `boolean` | false | Only save packages exposing at least one email address. |
| `includeReleaseStats` | `boolean` | true | Compute releaseCount, firstReleaseDate, latestReleaseDate, and hasWheel from release history. |
| `maxResults` | `integer` | `50` | Maximum number of items to save |
| `onlyNewItems` | `boolean` | `false` | Only emit items not seen in previous runs |
| `outputPreset` | `string` | `"full"` | `full`, `lean`, or `contacts` |

### Output Example

```json
{
  "name": "fastapi",
  "version": "0.115.0",
  "summary": "FastAPI framework, high performance, easy to learn",
  "author": "Sebastián Ramírez",
  "authorEmail": "tiangolo@gmail.com",
  "downloads30d": 45200000,
  "license": "MIT",
  "dependenciesCount": 3,
  "packageUrl": "https://pypi.org/project/fastapi/"
}
```

***

### More from Spotless Studios

**[All actors on Apify](https://apify.com/spotless_studios)** · Support: spotless.studios.info@gmail.com

| Actor | Best for |
|-------|----------|
| [SLED Government Bids](https://apify.com/spotless_studios/sled-procurement-scraper) | Daily US gov RFP / bid alerts |
| [Webflow Experts](https://apify.com/spotless_studios/webflow-experts-scraper) | Webflow agency & freelancer leads |
| [Stripe Partners](https://apify.com/spotless_studios/stripe-partners-scraper) | Stripe implementation partner lists |
| [UK Planning Applications](https://apify.com/spotless_studios/uk-planning-applications-scraper) | UK planning leads + agent contacts |
| [Product Hunt](https://apify.com/spotless_studios/product-hunt-scraper) | Every PH launch + makers / websites |
| [Duunitori Jobs](https://apify.com/spotless_studios/duunitori-jobs-scraper) | Finland job listings |
| [Clutch Agencies](https://apify.com/spotless_studios/clutch-agencies-scraper) | Clutch agency prospecting |
| [Skool Communities](https://apify.com/spotless_studios/skool-communities-scraper) | Skool community & creator leads |

# Actor input Schema

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

Filter package names (e.g. "fastapi", "langchain", "playwright").

## `searchQueries` (type: `array`):

Optional list of search terms to match against PyPI package feeds.

## `discoveryFeed` (type: `string`):

Which PyPI index to crawl when packageNames is empty.

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

Scrape specific packages directly (e.g. "fastapi", "https://pypi.org/project/httpx/").

## `minDownloads30d` (type: `integer`):

Only keep packages with at least this many downloads in the last 30 days.

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

Filter by author or maintainer name/email substring.

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

Filter by license substring (e.g. "MIT", "Apache").

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

Filter by requires_python substring (e.g. "3.10", "3.11").

## `classifierFilter` (type: `string`):

Filter by PyPI Trove classifier substring (e.g. "Framework :: FastAPI", "Topic :: Scientific/Engineering :: Artificial Intelligence").

## `requireEmail` (type: `boolean`):

Only save packages exposing at least one email address.

## `includeReleaseStats` (type: `boolean`):

Compute releaseCount, firstReleaseDate, latestReleaseDate, and hasWheel from release history.

## `includeKeywords` (type: `array`):

Keep items whose text fields contain these words. /regex/ supported.

## `excludeKeywords` (type: `array`):

Drop items containing any of these words or /regex/.

## `keywordMatch` (type: `string`):

Require any or all include keywords.

## `onlyNewItems` (type: `boolean`):

Remember items from previous runs and save only ones not seen before.

## `stateKey` (type: `string`):

Separate memory per saved search.

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

Stop after saving this many items.

## `outputPreset` (type: `string`):

Quickly choose how much data to save per record: full record, lean summary, or contacts & links only.

## `outputFields` (type: `array`):

Save only these fields, in this order. Supports nested dot-paths. Empty keeps all fields from the selected preset.

## `excludeFields` (type: `array`):

Remove specific fields from each saved record to keep datasets compact.

## `includeEmptyFields` (type: `boolean`):

When turned off, strips null, empty strings, empty arrays, and empty objects from every saved record.

## `requiredFields` (type: `array`):

Only save (and only pay for) records where every listed field has a non-empty value (e.g. "authorEmail").

## `maxConcurrency` (type: `integer`):

Requests fetched in parallel.

## `maxRequestRetries` (type: `integer`):

Retries per request.

## `requestTimeoutSecs` (type: `integer`):

Timeout per request.

## `proxyConfiguration` (type: `object`):

Optional; direct connection is tried first.

## `proxyEscalation` (type: `boolean`):

If the site blocks the run, automatically step up from direct to Apify datacenter, then residential proxy.

## Actor input object example

```json
{
  "searchQuery": "ai",
  "discoveryFeed": "top_downloads",
  "requireEmail": false,
  "includeReleaseStats": true,
  "keywordMatch": "any",
  "onlyNewItems": false,
  "stateKey": "default",
  "maxResults": 25,
  "outputPreset": "full",
  "includeEmptyFields": true,
  "maxConcurrency": 6,
  "maxRequestRetries": 3,
  "requestTimeoutSecs": 35,
  "proxyConfiguration": {
    "useApifyProxy": false
  },
  "proxyEscalation": true
}
```

# Actor output Schema

## `items` (type: `string`):

Scrape Python packages from PyPI including 30-day download counts, author & maintainer emails, licenses, dependencies, classifiers, wheel availability, and release 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 = {
    "searchQuery": "ai",
    "maxResults": 25,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("spotless_studios/pypi-packages-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 = {
    "searchQuery": "ai",
    "maxResults": 25,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("spotless_studios/pypi-packages-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 '{
  "searchQuery": "ai",
  "maxResults": 25,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call spotless_studios/pypi-packages-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spotless_studios/pypi-packages-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/iYqK18rdjQDCI7cP0/builds/p8KHUlmbv0Fk14K4U/openapi.json
