{
  "openapi": "3.0.1",
  "info": {
    "title": "PyPI Package Scraper — Downloads, Releases, Vulnerabilities",
    "description": "Python package intelligence for AI agents and due diligence: downloads (day/week/month, by Python version and OS), release history and cadence, parsed requirements, license (PEP 639), development status, known vulnerabilities (OSV), owners, project URLs.",
    "version": "0.1",
    "x-build-id": "Ou68fJ8JpeFMByKqf"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/yadroo~pypi-package-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-yadroo-pypi-package-intel",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/yadroo~pypi-package-intel/runs": {
      "post": {
        "operationId": "runs-sync-yadroo-pypi-package-intel",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/yadroo~pypi-package-intel/run-sync": {
      "post": {
        "operationId": "run-sync-yadroo-pypi-package-intel",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "packages",
              "recentUpdates",
              "newPackages"
            ],
            "type": "string",
            "description": "`packages` returns one rich item per name in `packages`. `recentUpdates` / `newPackages` read PyPI's public RSS feeds (the last ~40 events, no history) — use them with `keywords` for monitoring new releases/projects in a niche (e.g. `mcp`, `langchain`, `agent`).",
            "default": "packages"
          },
          "packages": {
            "title": "Package names",
            "type": "array",
            "description": "PyPI project names (case/separator-insensitive, PEP 503 normalized). Pin a specific version with `name==1.2.3` (or `name@1.2.3`) to get that release's metadata and the vulnerabilities known for exactly that version. Duplicates are skipped. Required in `packages` mode.",
            "items": {
              "type": "string"
            }
          },
          "keywords": {
            "title": "Keywords (feed modes)",
            "type": "array",
            "description": "Only for `recentUpdates` / `newPackages`: keep feed items whose name or summary contains any of these words (case-insensitive). Empty = keep everything.",
            "items": {
              "type": "string"
            }
          },
          "maxItems": {
            "title": "Max items (feed modes)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Cap for feed modes. Note the PyPI feeds themselves only carry the latest ~40 entries.",
            "default": 100
          },
          "includeDownloads": {
            "title": "Include downloads (pypistats.org)",
            "type": "boolean",
            "description": "Daily / weekly / monthly download counts (mirrors excluded). pypistats is IP rate-limited and refreshed once per day; the actor paces requests (~1 s each). Turn off for fastest metadata-only runs.",
            "default": true
          },
          "downloadsBreakdown": {
            "title": "Downloads breakdown (Python minor × OS, last 30 days)",
            "type": "boolean",
            "description": "Adds `downloadsByPythonMinor30d` (e.g. {\"3.12\": 123456, ...}) and `downloadsBySystem30d` ({\"Linux\": ..., \"Windows\": ..., \"Darwin\": ..., \"null\": ...}). Costs 2 extra pypistats requests per package.",
            "default": false
          },
          "downloadsHistoryDays": {
            "title": "Downloads history (days)",
            "minimum": 0,
            "maximum": 180,
            "type": "integer",
            "description": "0 = off. N = add `downloadsHistory` with a daily series for the last N days (max 180 — that is all pypistats keeps) plus the total. 1 extra pypistats request per package.",
            "default": 0
          },
          "includeMirrors": {
            "title": "Count mirror downloads",
            "type": "boolean",
            "description": "Include downloads by known mirrors (bandersnatch etc.) in the breakdown/history. The headline day/week/month numbers from pypistats always exclude mirrors.",
            "default": false
          },
          "includeVulnerabilities": {
            "title": "Include known vulnerabilities (OSV)",
            "type": "boolean",
            "description": "Known vulnerabilities for the returned version, as reported by PyPI (source: OSV / PyPA advisory DB): id, aliases (CVE/GHSA), summary, fixed-in versions, link. `vulnerabilityCount` is always present.",
            "default": true
          },
          "includeReleases": {
            "title": "Include release history",
            "type": "boolean",
            "description": "Adds `recentVersions` (newest first): version, date, file count, wheel/sdist presence, yanked flag, requires_python. Cadence metrics (`releasesLast90d`, `daysSinceLastRelease`, ...) are always computed.",
            "default": true
          },
          "versionsLimit": {
            "title": "Recent versions to include",
            "minimum": 0,
            "maximum": 200,
            "type": "integer",
            "description": "How many entries to keep in `recentVersions`.",
            "default": 10
          },
          "includeClassifiers": {
            "title": "Include raw Trove classifiers",
            "type": "boolean",
            "description": "Full `classifiers` array. `developmentStatus`, `pythonVersions` and `licenseClassifiers` are extracted from them regardless.",
            "default": true
          },
          "descriptionChars": {
            "title": "Long description characters",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "0 = omit. N = include the first N characters of the project's long description (README) as `description`, with `descriptionContentType` (text/markdown, text/x-rst...).",
            "default": 0
          },
          "fields": {
            "title": "Only these output fields",
            "type": "array",
            "description": "Optional whitelist of top-level output fields (e.g. [\"version\", \"license\", \"downloadsMonth\", \"vulnerabilityCount\"]). `id`, `name` and `error` are always kept. Empty = full item.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}