{
  "openapi": "3.0.1",
  "info": {
    "title": "Composer Repository Extractor",
    "description": "Point at any Composer / Satis / Packagist-style PHP package repository (wpackagist, Roundcube, Packagist, private Satis) and get one structured row per package: version, license, authors, keywords, require, source/dist.",
    "version": "0.1",
    "x-build-id": "NmdBuSUMMAq0O2wgu"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~composer-repository-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-composer-repository-extractor",
        "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/datamule~composer-repository-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-composer-repository-extractor",
        "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/datamule~composer-repository-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-composer-repository-extractor",
        "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",
        "required": [
          "repoUrl"
        ],
        "properties": {
          "repoUrl": {
            "title": "Composer repository URL",
            "type": "string",
            "description": "Base URL of a Composer / Satis / Packagist-style PHP package repository, or its packages.json URL directly. The Composer repository protocol is self-describing: the root packages.json advertises how per-package metadata is reached, so ONE actor works against any self-hosted feed — wpackagist.org (WordPress plugins/themes), plugins.roundcube.net, Packagist itself, or a private Satis / Toran / Repman / Private Packagist. Examples: https://wpackagist.org or https://repo.packagist.org/packages.json . The run MODE is chosen automatically from the other fields you set (see below)."
          },
          "packages": {
            "title": "Explicit package list (MODE: packages)",
            "type": "array",
            "description": "PACKAGES MODE. An explicit list of 'vendor/name' packages to fetch directly (e.g. monolog/monolog, symfony/console). Works on every repo — for a Composer v1 repo the content hash is resolved automatically from the provider map. Leave EMPTY to ENUMERATE the repository instead. Fastest way to pull a known set of packages from any repo.",
            "items": {
              "type": "string"
            }
          },
          "vendorFilter": {
            "title": "Vendor filter (enumerate mode)",
            "type": "string",
            "description": "Optional vendor prefix used to narrow enumeration, e.g. 'wpackagist-plugin' or 'symfony'. Only packages whose name begins with '<vendor>/' are kept. Leave empty to enumerate all vendors."
          },
          "packageFilter": {
            "title": "Package name filter (enumerate mode)",
            "type": "string",
            "description": "Optional case-insensitive substring matched against the full 'vendor/name'. Only matching packages are kept during enumeration, e.g. 'cache' matches symfony/cache and wpackagist-plugin/wp-super-cache. Leave empty for no name filter."
          },
          "maxPackages": {
            "title": "Max packages (global cap)",
            "minimum": 1,
            "type": "integer",
            "description": "A GLOBAL cap on the number of package rows to emit (each row is one package and one billable event). Enumeration stops as soon as the cap is reached, so a small value is a cheap, deterministic sample. Large public repos (wpackagist ~90k packages) can return a very large set — keep this bounded. Default 100.",
            "default": 100
          },
          "discoveryOnly": {
            "title": "Discovery mode (describe the repo only)",
            "type": "boolean",
            "description": "DISCOVERY MODE. When true, the actor resolves the root packages.json and emits a SINGLE row describing the repository itself: its protocol (v2 metadata-url / v1 providers-url / inline), the advertised metadata + provider templates, how many provider-includes it exposes, and its available-package patterns. A cheap way to inspect what any Composer repo supports before a full run.",
            "default": false
          },
          "bearer": {
            "title": "Bearer token",
            "type": "string",
            "description": "Optional bearer token for a private / auth-gated repository (sent as the Authorization: Bearer header). Not required for public repos. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers as a JSON object, e.g. {\"Authorization\": \"Basic ...\"} for an HTTP-auth Satis, or a custom API header for Private Packagist. Not required for public repos. Header values are never logged."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}