{
  "openapi": "3.0.1",
  "info": {
    "title": "Package Search — npm, PyPI and crates.io in One Shape",
    "description": "Search and profile open-source packages across npm, PyPI and crates.io and get them back in one common shape: licence, repository, maintainers, first and last release, release count, download figures, dependent count, deprecation and yank status, and runtime dependencies. Optional.",
    "version": "0.1",
    "x-build-id": "Gr8Vpa2Iak7kiKMyR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/dalbian~package-registry-search-npm-pypi-crates/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-dalbian-package-registry-search-npm-pypi-crates",
        "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/dalbian~package-registry-search-npm-pypi-crates/runs": {
      "post": {
        "operationId": "runs-sync-dalbian-package-registry-search-npm-pypi-crates",
        "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/dalbian~package-registry-search-npm-pypi-crates/run-sync": {
      "post": {
        "operationId": "run-sync-dalbian-package-registry-search-npm-pypi-crates",
        "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": {
          "queries": {
            "title": "Search terms",
            "type": "array",
            "description": "One free-text search per line, run against every registry you select below. Use a single word where you can: npm treats a multi-word query as OR over the words and will return popular packages that match only one of them, so 'websocket' is a sharper query than 'fast websocket client'. PyPI has no JSON search endpoint at all — a term here is resolved against PyPI as an exact project name and nothing else. See the README for the detail.",
            "default": [
              "websocket"
            ],
            "items": {
              "type": "string"
            }
          },
          "packages": {
            "title": "Direct lookups",
            "type": "array",
            "description": "Known packages to profile, one per line, written as registry:name — npm:express, pypi:requests, crates:serde. Scoped npm names work as npm:@types/node. A bare name with no prefix is looked up in every registry you selected below, which is the quick way to see where a name is taken.",
            "default": [
              "npm:express",
              "pypi:requests",
              "crates:serde"
            ],
            "items": {
              "type": "string"
            }
          },
          "registries": {
            "title": "Registries",
            "type": "array",
            "description": "Which registries to query. Leaving all three on is what makes the output comparable side by side; turn PyPI off if you only ever search, since PyPI cannot be searched.",
            "items": {
              "type": "string",
              "enum": [
                "npm",
                "pypi",
                "crates"
              ],
              "enumTitles": [
                "npm — JavaScript and TypeScript (search + lookup)",
                "PyPI — Python (lookup by exact name only)",
                "crates.io — Rust (search + lookup)"
              ]
            },
            "default": [
              "npm",
              "pypi",
              "crates"
            ]
          },
          "maxResultsPerQuery": {
            "title": "Maximum results per query per registry",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on packages returned per search term per registry. npm pages 250 at a time and crates.io 100; crates.io refuses to page past the first 1000 relevance-ranked results, so 1000 is the hard ceiling there.",
            "default": 20
          },
          "includeVersionHistory": {
            "title": "Include version history",
            "type": "boolean",
            "description": "Add one row per released version with its publication date, licence, and yank or deprecation status. Off by default because popular packages carry thousands of versions — TypeScript alone has more than 3800.",
            "default": false
          },
          "maxVersions": {
            "title": "Maximum versions per package",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Cap on version rows per package, newest first.",
            "default": 25
          },
          "includeDependencies": {
            "title": "Include runtime dependencies",
            "type": "boolean",
            "description": "List the runtime dependencies the current version declares. Build, test and development dependencies are excluded, as are PyPI extras, so the list is what actually gets installed alongside the package.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}