# npm and PyPI Package Scraper: Downloads, Versions, Licenses (`zhtech/npm-pypi-package-scraper`) Actor

Scrape npm and PyPI packages by name or keyword: latest version, description, license, maintainers, repository, homepage, keywords, dependency counts, release dates, release count, weekly and monthly downloads. Official public APIs, no login.

- **URL**: https://apify.com/zhtech/npm-pypi-package-scraper.md
- **Developed by:** [ZH Tech](https://apify.com/zhtech) (community)
- **Categories:** Developer tools, Open source, 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 $0.60 / 1,000 npm packages

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

## npm and PyPI Package Scraper: downloads, versions, licenses and maintainers

Scrape **npm and PyPI packages** by name or by keyword and get one clean row per package: **latest version, description, license, author, maintainers, repository URL, homepage, keywords, dependency counts, latest release date, release count, release history, weekly and monthly downloads** and links. npm rows also carry **security and maintenance signals**: deprecated flag, install scripts, provenance, last publisher, days since the last release, package size and Node engine.

The actor uses only the **official public APIs** of the registries (registry.npmjs.org, api.npmjs.org, pypistats.org) and the public PyPI release feeds. No login, no API key, no browser, no proxy needed. It checks robots.txt of every host on every run and stays within each registry's terms, which matters if you use the data for security reviews or procurement.

### What can this npm and PyPI scraper do?

| You give it | You get |
|---|---|
| Package names (`npm:express`, `npm:@types/node`, `pypi:requests`, plain names, npmjs.com or pypi.org links, even `requests==2.31` or `express@4`) | One row per package with metadata, release dates and download counts |
| npm search keywords, with npm qualifiers (`keywords:scraper`, `author:...`, `maintainer:...`, `scope:types`, `not:deprecated`) | The best matching npm packages, up to 5,000 per keyword, with weekly and monthly downloads, dependents count and search score |
| PyPI keywords | Up to 20 PyPI packages whose name starts with the keyword (see the FAQ for why) |
| A minimum weekly downloads value | Only packages above it. Skipped packages are free |

Every row has `type`, `ecosystem` (`npm` or `pypi`), `name`, `version`, `description`, `license`, `authorName`, `maintainers`, `maintainersCount`, `repositoryUrl`, `homepage`, `bugsUrl`, `keywords`, `dependenciesCount`, `latestReleaseDate`, `lastPublishDate`, `firstReleaseDate`, `daysSinceLastRelease`, `releaseCount`, `releaseCountCapped`, `weeklyDownloads`, `monthlyDownloads`, `releaseHistory`, `packageUrl`, `links`, `input`, `scrapedAt`.

npm rows add `devDependenciesCount`, `peerDependenciesCount`, `optionalDependenciesCount`, `distTags`, `deprecated`, `deprecationMessage`, `hasInstallScripts`, `installScripts`, `hasProvenance`, `typesIncluded`, `moduleType`, `nodeEngine`, `unpackedSize`, `fileCount`, `funding`, `scope`, `lastPublisher`, `authorUrl`, and for search results `dependentsCount` and `searchScore`. Optional: `dependencies` and `peerDependencies` with version ranges, `authorEmail` and `maintainerEmails`.

PyPI rows add `normalizedName`, `latestUploadVersion` (newest upload, which can be a pre-release), `downloadsLastDay`, `oldestReleaseInFeedDate` and `prereleaseCountInFeed`.

### Why this actor

- **Two registries, one schema.** npm and PyPI rows share the same field names, so you can sort, filter and chart them together. Mixed lists work: `npm:react`, `pypi:numpy` and `django` in the same run.
- **Security audit signals.** Find deprecated packages, packages that run `preinstall`, `install` or `postinstall` scripts, packages published with npm provenance, packages nobody has released in years, and who published the last version.
- **Fast bulk downloads.** npm download counts are fetched for up to 128 packages per request, so lists of thousands of packages stay quick and light on npm.
- **Honest search.** npm search is the registry's own search with all its qualifiers. PyPI has no search that its robots.txt allows, so the PyPI keyword option is clearly a name prefix search instead of a silent surprise.
- **Compliant by design.** Only documented public APIs and paths that robots.txt allows. The actor does not automate the npmjs.com website, does not call PyPI endpoints its robots.txt disallows, and never collects PyPI emails.
- **Fair billing.** Error rows, packages that do not exist, unpublished packages, duplicates and packages below your download filter are never charged. Invalid input stops the run before the start fee.

### Use cases

- **Dependency and security audits**: check a list of dependencies for deprecation, install scripts, stale releases, missing repository links, licenses and maintainer count.
- **Developer tools research and market sizing**: compare libraries in a category by weekly downloads, release cadence and dependents, for example every npm package with the keyword `web-scraping`.
- **Lead generation for dev tool companies**: find popular packages in your niche and their public repository and homepage links. Maintainer emails are available for npm only, off by default, see the privacy note below.
- **Release monitoring**: schedule a daily run over your watch list and alert on a new `version`, a new `deprecated` flag or a jump in downloads.
- **Open source program offices and investors**: track adoption of projects over time with weekly and monthly download snapshots.
- **AI agents and RAG**: give an LLM fresh, structured package facts instead of stale training data.

### How to use

1. Put package names in **Package names**, one per line. Use `npm:` or `pypi:` to pick the registry, or just the name.
2. Or add **Search keywords** and set **Max packages per keyword**.
3. Pick the **Ecosystem**: npm and PyPI, npm only, or PyPI only.
4. Optionally set **Minimum weekly downloads**, the number of **Versions in release history**, the **dependency list** or **maintainer emails** (npm).
5. Click **Start**. Results appear in the **Packages**, **Security and maintenance** and **Errors** views and can be exported as JSON, CSV, Excel or XML.

### Input examples

The prefilled example, 6 npm and 6 PyPI packages:

```json
{
    "packages": ["npm:react", "npm:express", "npm:axios", "npm:zod", "npm:lodash", "npm:chalk",
                 "pypi:requests", "pypi:fastapi", "pypi:numpy", "pypi:pandas", "pypi:django", "pypi:flask"]
}
```

The 300 most relevant non deprecated npm packages tagged `web-scraping`, keeping only those with at least 1,000 weekly downloads:

```json
{
    "ecosystem": "npm",
    "searchKeywords": ["keywords:web-scraping not:deprecated"],
    "maxSearchResults": 300,
    "minWeeklyDownloads": 1000
}
```

Dependency audit of a package.json, with the dependency lists:

```json
{
    "packages": ["express", "lodash", "left-pad", "request", "@types/node", "esbuild"],
    "ecosystem": "npm",
    "includeDependencyList": true,
    "releaseHistoryLimit": 3
}
```

PyPI packages plus a PyPI name search:

```json
{
    "packages": ["requests", "scikit-learn", "Pillow", "torch"],
    "ecosystem": "pypi",
    "searchKeywords": ["fastapi"],
    "maxSearchResults": 20
}
```

### Output examples

An npm row (maintainers and dist tags shortened):

```json
{
    "type": "package",
    "ecosystem": "npm",
    "name": "typescript",
    "version": "7.0.2",
    "description": "TypeScript is a language for application scale JavaScript development",
    "license": "Apache-2.0",
    "authorName": "Microsoft Corp.",
    "maintainers": ["microsoft1es", "typescript-bot", "typescript-deploys", "microsoft-oss-releases", "..."],
    "maintainersCount": 7,
    "lastPublisher": "microsoft1es",
    "repositoryUrl": "https://github.com/microsoft/TypeScript",
    "homepage": "https://www.typescriptlang.org/",
    "bugsUrl": "https://github.com/microsoft/TypeScript/issues",
    "keywords": ["TypeScript", "Microsoft", "compiler", "language", "javascript"],
    "dependenciesCount": 20,
    "devDependenciesCount": 0,
    "peerDependenciesCount": 0,
    "optionalDependenciesCount": 20,
    "latestReleaseDate": "2026-07-08T15:55:18.431Z",
    "lastPublishDate": "2026-11-21T08:11:51.008Z",
    "firstReleaseDate": "2012-10-01T15:35:39.553Z",
    "daysSinceLastRelease": 136,
    "releaseCount": 3892,
    "releaseCountCapped": false,
    "distTags": { "latest": "7.0.2", "beta": "7.1.0-beta", "next": "7.1.0-dev.20261121.1" },
    "deprecated": false,
    "deprecationMessage": null,
    "hasInstallScripts": false,
    "installScripts": [],
    "hasProvenance": false,
    "moduleType": "module",
    "nodeEngine": ">=16.20.0",
    "unpackedSize": 2497498,
    "fileCount": 416,
    "weeklyDownloads": 450660908,
    "monthlyDownloads": 1818994830,
    "releaseHistory": [
        { "version": "7.1.0-dev.20261121.1", "date": "2026-11-21T08:11:51.008Z", "prerelease": true, "deprecated": false },
        { "version": "7.1.0-dev.20261120.1", "date": "2026-11-20T08:08:34.751Z", "prerelease": true, "deprecated": false }
    ],
    "packageUrl": "https://www.npmjs.com/package/typescript",
    "links": {
        "npm": "https://www.npmjs.com/package/typescript",
        "registry": "https://registry.npmjs.org/typescript",
        "repository": "https://github.com/microsoft/TypeScript",
        "homepage": "https://www.typescriptlang.org/",
        "bugs": "https://github.com/microsoft/TypeScript/issues",
        "tarball": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz",
        "downloadsApi": "https://api.npmjs.org/downloads/point/last-week/typescript"
    },
    "input": "npm:typescript",
    "scrapedAt": "2026-11-22T01:52:29.408Z"
}
```

A PyPI row:

```json
{
    "type": "package",
    "ecosystem": "pypi",
    "name": "fastapi",
    "normalizedName": "fastapi",
    "version": "0.165.0",
    "latestUploadVersion": "0.165.0",
    "description": "FastAPI framework, high performance, easy to learn, fast to code, ready for production",
    "license": null,
    "maintainers": null,
    "repositoryUrl": null,
    "dependenciesCount": null,
    "latestReleaseDate": "2026-11-18T19:15:35.000Z",
    "lastPublishDate": "2026-11-18T19:15:35.000Z",
    "firstReleaseDate": null,
    "oldestReleaseInFeedDate": "2026-10-19T09:48:53.000Z",
    "daysSinceLastRelease": 3,
    "releaseCount": 40,
    "releaseCountCapped": true,
    "prereleaseCountInFeed": 0,
    "weeklyDownloads": 135580850,
    "monthlyDownloads": 546754401,
    "downloadsLastDay": 13707211,
    "releaseHistory": [
        { "version": "0.165.0", "date": "2026-11-18T19:15:35.000Z", "prerelease": false },
        { "version": "0.164.0", "date": "2026-11-18T13:09:07.000Z", "prerelease": false }
    ],
    "packageUrl": "https://pypi.org/project/fastapi/",
    "links": {
        "pypi": "https://pypi.org/project/fastapi/",
        "releasesFeed": "https://pypi.org/rss/project/fastapi/releases.xml",
        "pypistats": "https://pypistats.org/packages/fastapi",
        "latestRelease": "https://pypi.org/project/fastapi/0.165.0/"
    },
    "input": "pypi:fastapi",
    "scrapedAt": "2026-11-22T01:55:48.849Z"
}
```

An error row (never charged):

```json
{
    "type": "error",
    "input": "npm:this-package-does-not-exist-zz9q",
    "ecosystem": "npm",
    "name": "this-package-does-not-exist-zz9q",
    "errorCode": "NOT_FOUND",
    "error": "No npm package named \"this-package-does-not-exist-zz9q\". Check the spelling; npm names are lowercase."
}
```

Error codes: `NOT_FOUND`, `UNPUBLISHED` (npm name reserved but the code was removed), `NO_RELEASES` (PyPI project without releases), `NO_RESULTS` (a search keyword matched nothing), `INVALID_INPUT`, `RATE_LIMITED`, `BLOCKED`, `PARSE_FAILED`, `ROBOTS_DISALLOWED`, `FAILED`.

### Field notes

- **Latest version**: npm uses the `latest` dist tag. PyPI uses the newest stable release (`version`) and also gives the newest upload, which can be a pre-release (`latestUploadVersion`).
- **Release dates and counts**: npm counts every published version and knows the first release date. PyPI release data comes from the project's public release feed, which lists the last 40 releases: below 40 the count and first release date are exact, at 40 `releaseCountCapped` is true and `firstReleaseDate` is null (`oldestReleaseInFeedDate` shows how far the feed goes).
- **Downloads**: npm numbers are from api.npmjs.org (last 7 and last 30 days). PyPI numbers are from pypistats.org, which is run by the Python Software Foundation, exclude known mirrors and include the last day. Both update once a day.
- **PyPI license, maintainers, repository, homepage, keywords and dependencies are null.** pypi.org/robots.txt disallows its JSON API for automated clients and its project pages show a bot challenge to scripts, so the actor does not read them. npm rows have all of these fields.
- **Dependents count** comes from npm search, so it is filled for rows found by a keyword.
- **Repository URLs** are normalized to browsable `https://` links (`git+https://...git`, `github:user/repo` and `git@github.com:...` all become `https://github.com/user/repo`).
- **Install scripts** lists the lifecycle scripts that run on `npm install` (`preinstall`, `install`, `postinstall`). A package with these scripts runs code on your machine when installed, which is worth reviewing in a security audit.
- **typesIncluded** means the latest version declares a `types` or `typings` field.

### Privacy and emails

Maintainer emails are **off by default**. With **Include maintainer emails (npm)** on, the actor adds `authorEmail` and `maintainerEmails` exactly as the npm registry publicly lists them. If you use them, you are responsible for following privacy and anti spam laws such as GDPR, CCPA and CAN-SPAM: have a lawful basis, honour opt outs and do not send unsolicited bulk email. PyPI emails are never collected: PyPI's terms forbid using its data to sell users' personal information, for example to recruiters, headhunters or job boards.

### Pricing

Pay per event, you only pay for what is delivered:

- **Actor start**: a small flat fee once per run.
- **npm package**: per npm package row.
- **PyPI package**: per PyPI package row (cheaper, the rows have fewer fields).

The current prices are on the Pricing tab. Never charged: error rows (not found, unpublished, no releases, invalid input, no search results), packages below your minimum weekly downloads, duplicates (the same package listed twice in different formats) and anything after your max total charge or Max results is reached.

Typical runs: the prefilled example is 1 start, 6 npm and 6 PyPI rows and takes about 10 seconds. A 300 package npm keyword search takes about 2 minutes.

### Use with the API, integrations and AI agents

- **API**: `POST https://api.apify.com/v2/acts/zhtech~npm-pypi-package-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN` with the JSON input as the body returns the rows in one call. Add `&view=packages` (or `security`, `errors`) for one view. An input with only `searchKeywords` runs just the search; an empty input `{}` runs the example package list.
- **Clients**: `apify-client` for JavaScript and Python. Example (JavaScript): `await client.actor('zhtech/npm-pypi-package-scraper').call({ packages: ['npm:express', 'pypi:requests'] })`.
- **Schedules and integrations**: run it daily over a watch list and connect Google Sheets, Slack, a webhook, Zapier, Make or n8n to track versions and downloads.
- **LLMs and MCP**: the actor works as a tool through the Apify MCP server (mcp.apify.com), so Claude, ChatGPT, Cursor and other agents can look up current package versions, licenses and downloads on demand. Set a max total charge on the run to cap the cost.

### FAQ

**Do I need an npm or PyPI account or an API key?**
No. Everything comes from public, unauthenticated APIs and feeds.

**Why does PyPI search only match the start of package names?**
pypi.org has no search the actor may use: its website search and JSON API are disallowed for automated clients in pypi.org/robots.txt, and the old XML-RPC search was switched off by PyPI in 2021. The actor uses the public search of pypistats.org, which returns up to 20 packages whose name starts with your keyword. For topic searches on PyPI, find the names elsewhere and paste them into Package names.

**Why are some PyPI fields null when npm rows have them?**
Same reason: the PyPI endpoints that carry license, links and dependencies are disallowed by pypi.org/robots.txt or protected by a bot challenge, and this actor does not work around either. Versions, release dates, summaries and downloads are available.

**What happens with a plain name like `requests` and Ecosystem set to both?**
The actor looks it up on npm and on PyPI and saves a row for each registry where it exists (there is an npm package called `requests` too). An error row appears only if the name exists in neither. Use `npm:` or `pypi:` to pick one.

**How fresh are the download numbers?**
npm and pypistats.org update once a day, soon after midnight UTC. Running more often than daily gives the same numbers.

**How many packages can I scrape?**
Lists of thousands of npm packages work well; the actor reads about 4 npm package documents per second and fetches downloads for 128 packages at once. PyPI is read at about 1 package per second to respect pypistats.org's rate limit and its request to use the API for specific packages rather than for the whole index.

**Is it legal to scrape npm and PyPI?**
The actor uses the registries' documented public APIs and public feeds at a polite rate, respects robots.txt and the published terms, and collects no PyPI personal data. You are responsible for how you use the data, especially any personal data such as maintainer emails, and for following the laws that apply to you.

### Limitations

- PyPI rows have no license, author, maintainers, repository, homepage, keywords or dependencies (see the FAQ), and release history covers the last 40 releases.
- PyPI keyword search matches the start of package names only, at most 20 per keyword.
- npm search returns at most 5,000 packages per keyword in this actor; split broad topics into several keywords.
- Download numbers are daily aggregates from the registries and can differ from other trackers.
- Very large npm packages (several thousand versions) are a few MB each to read, so runs over many of them take a little longer.

### Support

Found a wrong field, a package that does not parse, or need another data point? Open an issue on the Issues tab with the input you used and it will be looked at quickly.

# Actor input Schema

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

One package per line. Use npm:name or pypi:name to pick the registry (npm:express, npm:@types/node, pypi:requests), or paste a link (https://www.npmjs.com/package/express, https://pypi.org/project/requests/). A plain name is looked up in the registries selected under Ecosystem; with both, a row is saved for each registry where it exists. Versions and extras are ignored (express@4, requests==2.31). Leave it empty to only use search keywords. An empty input runs the example list.

## `ecosystem` (type: `string`):

Which registries to use for plain names and for search keywords. Names with an npm: or pypi: prefix or a link always go to their own registry (if that registry is selected here).

## `searchKeywords` (type: `array`):

Find packages instead of naming them. npm: the official registry search, ranked by relevance, with npm search qualifiers such as keywords:scraper, author:sindresorhus, maintainer:fb55, scope:types or not:deprecated. PyPI: pypi.org has no search that its robots.txt allows, so the actor uses the pypistats.org name search, which returns up to 20 packages whose name starts with your keyword (web-scraper, fastapi).

## `maxSearchResults` (type: `integer`):

Per keyword and registry, best matches first. npm allows up to 5000; the PyPI name search returns at most 20.

## `includeDownloads` (type: `boolean`):

Weekly and monthly downloads (npm: api.npmjs.org, up to 128 packages per request; PyPI: pypistats.org, mirrors excluded, plus the last day). Search results from npm already include them.

## `minWeeklyDownloads` (type: `integer`):

Skip packages with fewer weekly downloads. Skipped packages are not saved and not charged. 0 keeps everything.

## `releaseHistoryLimit` (type: `integer`):

Newest versions listed in releaseHistory with their dates and a pre-release flag. 0 leaves the list out. PyPI release feeds hold the last 40 releases.

## `includeDependencyList` (type: `boolean`):

Adds the runtime and peer dependencies of the latest npm version with their version ranges. Counts are always included.

## `includeMaintainerEmails` (type: `boolean`):

Adds authorEmail and maintainerEmails where the npm registry publicly lists them. Off by default. If you turn it on, you are responsible for following privacy and anti spam laws (GDPR, CAN-SPAM and others). PyPI emails are never collected: PyPI's terms forbid using its data to sell users' personal information.

## `maxItems` (type: `integer`):

Stop the run after this many saved packages. 0 means no limit. Your maximum cost per run (set in the run options) is respected as well.

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

Not needed: these are public APIs and the actor uses them slowly. Leave it off unless you see BLOCKED or RATE_LIMITED errors. Datacenter proxy is enough; residential is replaced with datacenter automatically.

## Actor input object example

```json
{
  "packages": [
    "npm:react",
    "npm:express",
    "npm:axios",
    "npm:zod",
    "npm:lodash",
    "npm:chalk",
    "pypi:requests",
    "pypi:fastapi",
    "pypi:numpy",
    "pypi:pandas",
    "pypi:django",
    "pypi:flask"
  ],
  "ecosystem": "both",
  "searchKeywords": [],
  "maxSearchResults": 10,
  "includeDownloads": true,
  "minWeeklyDownloads": 0,
  "releaseHistoryLimit": 10,
  "includeDependencyList": false,
  "includeMaintainerEmails": false,
  "maxItems": 0,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `security` (type: `string`):

No description

## `errors` (type: `string`):

No description

## `allResults` (type: `string`):

No description

## `runSummary` (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 = {
    "packages": [
        "npm:react",
        "npm:express",
        "npm:axios",
        "npm:zod",
        "npm:lodash",
        "npm:chalk",
        "pypi:requests",
        "pypi:fastapi",
        "pypi:numpy",
        "pypi:pandas",
        "pypi:django",
        "pypi:flask"
    ],
    "searchKeywords": [],
    "maxSearchResults": 10,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("zhtech/npm-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 = {
    "packages": [
        "npm:react",
        "npm:express",
        "npm:axios",
        "npm:zod",
        "npm:lodash",
        "npm:chalk",
        "pypi:requests",
        "pypi:fastapi",
        "pypi:numpy",
        "pypi:pandas",
        "pypi:django",
        "pypi:flask",
    ],
    "searchKeywords": [],
    "maxSearchResults": 10,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("zhtech/npm-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 '{
  "packages": [
    "npm:react",
    "npm:express",
    "npm:axios",
    "npm:zod",
    "npm:lodash",
    "npm:chalk",
    "pypi:requests",
    "pypi:fastapi",
    "pypi:numpy",
    "pypi:pandas",
    "pypi:django",
    "pypi:flask"
  ],
  "searchKeywords": [],
  "maxSearchResults": 10,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call zhtech/npm-pypi-package-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,zhtech/npm-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/jzKSW1Jg3TN9utyTe/builds/a4kso8xZMxo6WLk9n/openapi.json
