Skip to the content

Scraper API

PyPI

pypi.packageAvailable

PyPI package

Its summary, latest version, licence, Python requirement, dependencies, links, classifiers, its releases with the date of each, the latest version's files, known vulnerabilities, and its downloads in the last day, week and month.

Give it a project's name, or its address on pypi.org.

1 unit a run, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a run
Inputs
3, 1 required
Record
27 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/pypi.package/runs

{
"input": {
"package": "sampleproject",
"max_releases": 3
}
}

sent, and answered

a record of the run27 fields

{
name: "sampleproject"
url: "https://pypi.org/project/sampleproject/"
version: "4.0.0"
summary: "A sample Python project"
description: null
description_content_type: "text/markdown"
author: "A. Random Developer"
maintainer: "A. Great Maintainer"
license: "MIT License"
… 18 more fields

ok1 unit a run

A record this scraper returned for this input. The first 9 of its 27 fields are set down here; the whole record is below.

pypi.org
The page PyPI package reads, as a browser shows it
The page this scraper reads, photographed in a browser on 19 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Check a dependency's health
The latest version and when it was uploaded, the yanked flag, the releases and any known vulnerabilities, before a project goes into your requirements.
Measure adoption
Downloads of the last day, week and month beside the release count, to compare Python projects that do the same job.
Audit what you install
The licence, requires_python, the declared dependencies and the files of the latest release with their sizes, for every project in a lockfile.

What you send

A project's name, or its address on pypi.org. These are its 3 inputs, as its schema has them.

packagestring Required
The project's name, such as requests or scikit-learn, or its address on pypi.org.
max_releasesinteger Optional
Return this many of its releases, newest first: 20 unless you say otherwise; 0 returns none.Default 20
include_descriptionboolean Optional
true also returns the project's long description, its README, as written.Default false

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/pypi.package/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"package":"sampleproject","max_releases":3}}'

# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
from enrichednow import EnrichedNow

client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY

# Start a run, wait for it to end, and get its records
result = client.scrape("pypi.package", {
    "package": "sampleproject",
    "max_releases": 3,
})
print(result.run.id, result.run.status, result.run.record_count)

# Read its records: pages are fetched as you go
for record in result.records:
    print(record)

Install it with pip install enrichednow, then save as run.py and run python3 run.py

import EnrichedNow from "enrichednow";

const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY

// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("pypi.package", {
  package: "sampleproject",
  max_releases: 3,
});
console.log(run.id, run.status, run.record_count);

// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);

Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	enrichednow "github.com/enrichednow/enrichednow-go"
)

func main() {
	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
	defer cancel()

	// Start a run, wait for it to end, and get its records
	run, records, err := client.Scrape(ctx, "pypi.package", map[string]any{"package": "sampleproject", "max_releases": 3})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(run.ID, run.Status, run.RecordCount)

	// Read its records: pages are fetched as you go
	for records.Next() {
		fmt.Println(string(records.Current()))
	}
	if err := records.Err(); err != nil {
		log.Fatal(err)
	}
}

Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;

public class Run {
    public static void main(String[] args) {
        EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY

        // Start a run, wait for it to end, and get its records
        ScrapeResult result = client.scrape("pypi.package", Map.of("package", "sampleproject", "max_releases", 3));
        System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());

        // Read its records: pages are fetched as you go
        for (Map<String, Object> record : result.records()) {
            System.out.println(record);
        }
    }
}

Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

enrichednow run pypi.package --input package=sampleproject --input max_releases=3

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

Its summary, latest version, licence, Python requirement, dependencies, links, classifiers, its releases with the date of each, the latest version's files, known vulnerabilities, and its downloads in the last day, week and month. A record has 27 fields. One we could not read is null, never an empty string or a zero.

A record pypi.package returned
{
  "name": "sampleproject",
  "url": "https://pypi.org/project/sampleproject/",
  "version": "4.0.0",
  "summary": "A sample Python project",
  "description": null,
  "description_content_type": "text/markdown",
  "author": "A. Random Developer",
  "maintainer": "A. Great Maintainer",
  "license": "MIT License",
  "keywords": [
    "sample",
    "setuptools",
    "development"
  ],
  "classifiers": [
    "Development Status :: 3 - Alpha",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License"
  ],
  "requires_python": ">=3.9",
  "requires_dist": [
    "peppercorn",
    "check-manifest; extra == \"dev\"",
    "coverage; extra == \"test\""
  ],
  "project_urls": {
    "Bug Reports": "https://github.com/pypa/sampleproject/issues",
    "Funding": "https://donate.pypi.org",
    "Homepage": "https://github.com/pypa/sampleproject",
    "Say Thanks!": "http://saythanks.io/to/example",
    "Source": "https://github.com/pypa/sampleproject/"
  },
  "homepage": "https://github.com/pypa/sampleproject",
  "yanked": false,
  "yanked_reason": null,
  "release_count": 7,
  "releases": [
    {
      "version": "4.0.0",
      "uploaded_at": "2024-11-06T22:37:09.220617Z",
      "files": 2,
      "yanked": false
    },
    {
      "version": "3.0.0",
      "uploaded_at": "2022-12-01T18:51:00.007372Z",
      "files": 2,
      "yanked": false
    }
  ],
  "first_uploaded_at": "2015-06-14T14:37:56.383366Z",
  "latest_uploaded_at": "2024-11-06T22:37:09.220617Z",
  "files": [
    {
      "filename": "sampleproject-4.0.0-py3-none-any.whl",
      "package_type": "bdist_wheel",
      "python_version": "py3",
      "size_bytes": 4661,
      "url": "https://files.pythonhosted.org/packages/d7/73/c16e5f3f0d37c60947e70865c255a58dc408780a6474de0523afd0ec553a/sampleproject-4.0.0-py3-none-any.whl",
      "uploaded_at": "2024-11-06T22:37:09.220617Z",
      "sha256": "c23e447ea90d796d1e645c35c4b2de125040add12a845825546f91c93f391b6b"
    },
    {
      "filename": "sampleproject-4.0.0.tar.gz",
      "package_type": "sdist",
      "python_version": "source",
      "size_bytes": 5760,
      "url": "https://files.pythonhosted.org/packages/48/8c/c18d25735962870ccb6d1cd2ac7bde40008a332211055e260cb7ec4c6bab/sampleproject-4.0.0.tar.gz",
      "uploaded_at": "2024-11-06T22:37:10.868088Z",
      "sha256": "0ace7980f82c5815ede4cd7bf9f6693684cec2ae47b9b7ade9add533b8627c6b"
    }
  ],
  "vulnerabilities": [],
  "downloads_last_day": 16542,
  "downloads_last_week": 119851,
  "downloads_last_month": 505681,
  "fetched_at": "2026-11-19T18:07:41.099216Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

Values shortened for this page: classifiers: 11 items, the first 3 shown; releases: 3 items, the first 2 shown.

The fields of a record

namestring
The project's name as PyPI writes it, e.g. "Flask".
urlstring
The project's page on pypi.org.
versionstring or null
The latest version.
summarystring or null
The project's one-line summary.
descriptionstring or null
The project's long description (its README) as written, when include_description asked for it.
description_content_typestring or null
The format of the long description, e.g. "text/markdown", "text/x-rst".
authorstring or null
The author's name as the project's metadata states it.
maintainerstring or null
The maintainer's name as the project's metadata states it; null when it names none.
licensestring or null
The licence: the expression or short name the metadata states, else the licence its classifiers name.
keywordslist of strings
The project's keywords.
classifierslist of strings
The project's trove classifiers, e.g. "Programming Language :: Python :: 3.12".
requires_pythonstring or null
The Python versions the latest release supports, e.g. ">=3.9".
requires_distlist of strings
The latest release's dependencies as requirement strings, extras included, e.g. "urllib3<3,>=1.21.1".
project_urlsobject
The links the project names, by label, e.g. {"Documentation": "https://…", "Source": "https://…"}.
homepagestring or null
The project's home page, when it names one.
yankedboolean
True when the latest release was withdrawn by its maintainers.
yanked_reasonstring or null
The reason the maintainers gave for withdrawing it.
release_countinteger
How many releases the project has.
releaseslist of objects
The newest releases first, as many as max_releases asked for.Each holds version, uploaded_at, files, yanked.
first_uploaded_atdatetime or null
When the project's first file was uploaded, in UTC.
latest_uploaded_atdatetime or null
When the latest version was uploaded, in UTC.
fileslist of objects
The files of the latest version.Each holds filename, package_type, python_version, size_bytes, url, uploaded_at, sha256.
vulnerabilitieslist of strings
The identifiers of the known vulnerabilities PyPI lists for the latest version, e.g. "GHSA-…", "PYSEC-…". Empty when it lists none.
downloads_last_dayinteger or null
Downloads on the last day counted, as pypistats.org states them.
downloads_last_weekinteger or null
Downloads in the last seven days counted.
downloads_last_monthinteger or null
Downloads in the last thirty days counted.
fetched_atdatetime
When the project was read, in UTC.

The whole schema, in its reference

Units and limits

Counted per request
Billed per request: a run that returns data costs 1 unit, however many records it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • PyPI itself publishes no download counts: they are those of pypistats.org, and a project it has no counts for has them null.
  • The author and the maintainer are returned by name. Email addresses are not returned.
  • There is no search: PyPI offers none to read.

The bounds its schema sets

max_releases
0 to 2,000; 20 unless you say otherwise

Scraper API pricing: how units workThe five ways a run ends

Questions

What does PyPI package return?

Its summary, latest version, licence, Python requirement, dependencies, links, classifiers, its releases with the date of each, the latest version's files, known vulnerabilities, and its downloads in the last day, week and month. A record has 27 fields, among them name, url, version, summary, description and description_content_type. A value that could not be read is null, never an empty string or a zero.

What do I send?

A project's name, or its address on pypi.org. The input package is required. Optional: max_releases and include_description.

How is it counted?

Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: max_releases 0 to 2,000 (20 unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

PyPI itself publishes no download counts: they are those of pypistats.org, and a project it has no counts for has them null. The author and the maintainer are returned by name. Email addresses are not returned. There is no search: PyPI offers none to read.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id pypi.package and the same input. It costs what the same API call costs.

PyPI

Projects of the Python Package Index: a project's details, releases, files and download counts.

PyPI on the line-up

Where
Worldwide

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.