{
  "openapi": "3.0.1",
  "info": {
    "title": "npm & PyPI Package Scraper - Downloads & Risk Flags",
    "description": "Audit open-source dependencies fast. Profile any npm or PyPI package from the official registries: downloads, versions, maintainers, licence, freshness, deprecation, plus risk flags (DEPRECATED, UNMAINTAINED_2Y, SINGLE_MAINTAINER, NO_LICENSE) for supply-chain checks.",
    "version": "1.1",
    "x-build-id": "NUUJxfXxXCsouI7Tl"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~package-intel/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-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/that_red_bird~package-intel/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-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/that_red_bird~package-intel/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-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": {
          "packages": {
            "title": "Packages",
            "type": "array",
            "description": "Package names, e.g. express, @angular/core, lodash@4.17.15, requests==2.19.0. Prefix with npm: or pypi: to mix ecosystems, or use objects: {\"name\":\"requests\",\"ecosystem\":\"pypi\"}. Giving a version checks that exact version for vulnerabilities.",
            "default": [
              "express",
              "lodash"
            ],
            "items": {
              "type": "string"
            }
          },
          "ecosystem": {
            "title": "Default ecosystem",
            "enum": [
              "npm",
              "pypi"
            ],
            "type": "string",
            "description": "Used for any package given as a plain name without an npm: or pypi: prefix.",
            "default": "npm"
          },
          "packageJson": {
            "title": "package.json contents",
            "type": "string",
            "description": "Paste a whole package.json. Every dependency is audited, and the version range you declared is the version checked for known vulnerabilities. Leave empty to skip.",
            "default": ""
          },
          "includeDevDependencies": {
            "title": "Include devDependencies",
            "type": "boolean",
            "description": "Also audit devDependencies from the pasted package.json or package.json URLs.",
            "default": false
          },
          "requirementsTxt": {
            "title": "requirements.txt contents",
            "type": "string",
            "description": "Paste a whole requirements.txt. Pinned versions (requests==2.19.0) are checked for known vulnerabilities. Leave empty to skip.",
            "default": ""
          },
          "manifestUrls": {
            "title": "Manifest URLs",
            "type": "array",
            "description": "Links to package.json or requirements.txt files, e.g. a GitHub blob or raw URL. They are downloaded and audited like the pasted contents.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "searchQuery": {
            "title": "Or discover by search",
            "type": "string",
            "description": "Search npm for this term and profile everything it finds - useful for mapping a space, e.g. \"pdf parser\". Leave empty to skip.",
            "default": ""
          },
          "searchLimit": {
            "title": "Max search results",
            "minimum": 1,
            "maximum": 250,
            "type": "integer",
            "description": "How many packages to pull from the search before profiling them.",
            "default": 20
          },
          "checkVulnerabilities": {
            "title": "Check known vulnerabilities",
            "type": "boolean",
            "description": "Look every package version up in the open OSV vulnerability database (GitHub advisories, PyPA, CVEs) and list the advisories with severity and fixed versions.",
            "default": true
          },
          "includeRepoStats": {
            "title": "Include GitHub repo health",
            "type": "boolean",
            "description": "Add stars, forks, open issues, last commit date and archived status of the linked GitHub repository, plus dependents counts.",
            "default": true
          },
          "includeDependencies": {
            "title": "Include the dependency list",
            "type": "boolean",
            "description": "Include every direct dependency with its version range. Turn off to keep rows small.",
            "default": true
          },
          "onlyRisky": {
            "title": "Only packages with risk flags",
            "type": "boolean",
            "description": "Return only packages with at least one risk flag (deprecated, vulnerable, unmaintained, archived repo, single maintainer, no licence...). This is the supply-chain audit mode and only returned packages are billed.",
            "default": false
          },
          "minRiskScore": {
            "title": "Minimum risk score",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Return only packages whose 0-100 risk score is at least this. 0 = no limit. 35 or more means high risk.",
            "default": 0
          },
          "minDownloads": {
            "title": "Minimum monthly downloads",
            "minimum": 0,
            "type": "integer",
            "description": "Drop packages below this download count in the last 30 days. 0 = no limit.",
            "default": 0
          },
          "maxPackages": {
            "title": "Max packages",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Safety cap on how many packages are checked in one run (manifests and searches can be large).",
            "default": 200
          },
          "concurrency": {
            "title": "Concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many packages to look up in parallel.",
            "default": 5
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional proxy. Not needed normally - the registries do not block. If a source rate-limits the run, Apify's datacenter proxy is used automatically as a fallback.",
            "default": {
              "useApifyProxy": false
            }
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}