DEV Community

voiddo
voiddo

Posted on Originally published at voidd0.github.io

PyPI Scraper: how to get Python Package Details and Stats as JSON or CSV (Python, API, no code)

Snapshot PyPI package metadata using the public pypi.org/pypi//json endpoint.

This tutorial shows what the Actor v0iddo/pypi-package-tracker returns, how to run it on the Apify Store without code, and how to call it from Python and cURL.

What data you get

One row per result. Every row can be downloaded as JSON, CSV, Excel or HTML, or read through the API.

Field Label Type Example
snapshotAt Snapshot At date 2026-10-26T04:31:42+00:00
name Name text requests
latestVersion Latest Version text 2.34.2
summary Summary text Python HTTP for Humans.
author Author text
license License text Apache-2.0
homepage Homepage URL
projectUrls Project Urls object {"Documentation": "https://requests.readthedocs.io", "Source": "htt...
requiresPython Requires Python text >=3.10
classifiers Classifiers list ["Development Status :: 5 - Production/Stable", "Environment :: Web...
keywords Keywords text
releaseCount Release Count number 163

Real rows from a run of the Actor (fields that name people are left out):

[
  {
    "snapshotAt": "2026-10-26T04:31:42+00:00",
    "name": "requests",
    "latestVersion": "2.34.2",
    "summary": "Python HTTP for Humans.",
    "license": "Apache-2.0",
    "projectUrls": {
      "Documentation": "https://requests.readthedocs.io",
      "Source": "https://github.com/psf/requests"
    },
    "requiresPython": ">=3.10",
    "classifiers": [
      "Development Status :: 5 - Production/Stable",
      "Environment :: Web Environment",
      "Intended Audience :: Developers"
    ],
    "releaseCount": 163
  },
  {
    "snapshotAt": "2026-10-26T04:31:42+00:00",
    "name": "numpy",
    "latestVersion": "2.5.4",
    "summary": "Fundamental package for array computing in Python",
    "homepage": "https://numpy.org",
    "projectUrls": {
      "documentation": "https://numpy.org/doc/",
      "download": "https://pypi.org/project/numpy/#files",
      "homepage": "https://numpy.org",
      "release notes": "https://numpy.org/doc/stable/release",
      "source": "https://github.com/numpy/numpy",
      "tracker": "https://github.com/numpy/numpy/issues"
    },
    "requiresPython": ">=3.12",
    "classifiers": [
      "Development Status :: 5 - Production/Stable",
      "Intended Audience :: Developers",
      "Intended Audience :: Science/Research"
    ],
    "releaseCount": 152
  }
]
Enter fullscreen mode Exit fullscreen mode

No code: run it on the Apify Store

  1. Open the PyPI Scraper page on Apify.
  2. Fill in the input form. An example input is already filled in.
  3. Press Start, wait for the run to finish, and download the results as JSON, CSV or Excel from the Output tab.

The input that is pre-filled on the Actor page:

{
  "packages": [
    "requests",
    "numpy",
    "pandas"
  ]
}
Enter fullscreen mode Exit fullscreen mode

Python (apify-client)

Get your API token in Apify Console under Settings, then Integrations. The Actor id is v0iddo/pypi-package-tracker.

from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")

run_input = {'packages': ['requests', 'numpy', 'pandas']}

run = client.actor("v0iddo/pypi-package-tracker").call(run_input=run_input)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
Enter fullscreen mode Exit fullscreen mode

cURL

curl -X POST "https://api.apify.com/v2/acts/v0iddo~pypi-package-tracker/run-sync-get-dataset-items" \
  -H "Authorization: Bearer YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"packages": ["requests", "numpy", "pandas"]}'
Enter fullscreen mode Exit fullscreen mode

Price

$0.20 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.14 per 1,000.

FAQ

What data does the PyPI Scraper return?

Each result is one row in an Apify dataset. Fields include snapshotAt, name, latestVersion, summary, author, license, homepage, projectUrls, and more. The table above shows every field with an example value.

Can I use it without writing code?

Yes. Open the Actor page on Apify, fill in the input form (an example is already filled in), press Start, and download the results as JSON, CSV, Excel or HTML. You can also schedule runs there.

How much does it cost?

$0.20 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.14 per 1,000. A new Apify account gets $5 of platform credit every month.

Links

Top comments (1)

Collapse
 
alexshev profile image
Alex Shev •

Package metadata is more useful when the scraper distinguishes registry facts from derived metrics and records the retrieval timestamp. Version, release files, classifiers, and download counts change on different cadences; a normalized snapshot makes later comparisons reproducible instead of silently mixing fresh and stale fields.