Stats API

PyPI offers a JSON stats endpoint via a Content-Type: application/json GET request. Without the Content-Type header set, you will be returned a HTML page.

Example Client:


GET /stats/

Returns statistics in JSON format. This includes: - Total size of PyPI packages in bytes - Top 100 packages + their size in bytes

Example Request:

  • curl -H “Content-Type: application/json” -H “Accept: application/json”
GET /stats HTTP/1.1
Accept: application/json
Content-Type: application/json

Example response:

  "top_packages": {
    "CodeIntel": {
      "size": 23767329521
    "Fiona": {
      "size": 6209535709
    "FlexGet": {
      "size": 4387002448
  "total_packages_size": 23965450269
Status Codes: