{
  "openapi": "3.0.1",
  "info": {
    "title": "7-Zip Recursive Archive Extractor: Enterprise-Grade Automation",
    "description": "High-performance 7-Zip extractor supporting 30+ formats (ZIP, RAR, 7Z, TAR, ISO, GZIP, BZIP2, XZ, CAB & more). Features recursive nested archive extraction, CRC-based incremental updates to skip unchanged files, security filtering, and dual KV Store + Dataset output. Saves up to 90% compute costs.",
    "version": "1.1",
    "x-build-id": "DPDUIJLfLlqrTRahQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/roach-sama~universal-archive-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-roach-sama-universal-archive-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/roach-sama~universal-archive-extractor/runs": {
      "post": {
        "operationId": "runs-sync-roach-sama-universal-archive-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/roach-sama~universal-archive-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-roach-sama-universal-archive-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",
        "properties": {
          "url": {
            "title": "Single archive URL",
            "type": "string",
            "description": "Direct URL to one archive file. Use this OR \"Multiple URLs\" OR \"Dataset source\" (choose exactly one input method)."
          },
          "urls": {
            "title": "Multiple archive URLs",
            "minItems": 1,
            "type": "array",
            "description": "List of archive URLs to process in parallel. Use this OR \"Single URL\" OR \"Dataset source\" (choose exactly one input method).",
            "items": {
              "type": "string"
            },
            "default": [
              "https://github.com/RoachxD/ScheduleOne.BunnyHopper/archive/refs/heads/main.zip",
              "https://github.com/RoachxD/ScheduleOne.HonestMainMenu/archive/refs/heads/main.zip"
            ]
          },
          "datasetId": {
            "title": "Source dataset",
            "type": "string",
            "description": "Apify Dataset ID containing archive URLs (e.g., output from a crawler). Combine with \"URL field name\" below. Use this OR \"Single URL\" OR \"Multiple URLs\"."
          },
          "urlField": {
            "title": "URL field name in dataset",
            "type": "string",
            "description": "Field name in dataset items containing archive URL(s). Accepts both single strings and arrays of URLs for batch processing."
          },
          "outputMode": {
            "title": "Output destination strategy",
            "enum": [
              "kv_store",
              "dataset",
              "both"
            ],
            "type": "string",
            "description": "Control where results go: KV Store = raw extracted files for download; Dataset = searchable per-file metadata index. \"Both\" provides maximum flexibility.",
            "default": "both"
          },
          "outputOptions": {
            "title": "Custom output destinations",
            "required": [],
            "type": "object",
            "description": "Override default storage names to organize multiple extraction runs or integrate with existing workflows.",
            "properties": {
              "storeName": {
                "title": "Custom KV store name",
                "type": "string",
                "editor": "textfield",
                "description": "Named KV store for extracted files and summary. Leave empty to use the run's default store."
              },
              "datasetName": {
                "title": "Custom dataset name",
                "type": "string",
                "editor": "textfield",
                "description": "Named dataset for the file index. Leave empty to use the run's default dataset."
              },
              "summaryKey": {
                "title": "Summary record key",
                "type": "string",
                "editor": "textfield",
                "default": "SUMMARY",
                "description": "KV store key for the final run statistics (total files, errors, extensions, etc.)."
              },
              "flattenPaths": {
                "title": "Flatten file paths in KV",
                "type": "boolean",
                "editor": "checkbox",
                "default": false,
                "description": "Convert nested paths to flat keys (e.g., \"report.pdf-a1b2c3d4\") to avoid deep folder structures and potential key collisions."
              }
            },
            "additionalProperties": false
          },
          "concurrency": {
            "title": "Parallel archive processing",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Number of archives to download and extract simultaneously. Higher values = faster completion but more memory usage. Reduce if hitting rate limits.",
            "default": 10
          },
          "httpOptions": {
            "title": "Download & network settings",
            "required": [],
            "type": "object",
            "description": "Fine-tune HTTP behavior: timeouts, retries, authentication headers, and proxy routing for archive downloads.",
            "properties": {
              "timeoutMillis": {
                "title": "Request timeout (milliseconds)",
                "type": "integer",
                "editor": "number",
                "minimum": 1000,
                "default": 120000,
                "description": "Maximum wait time for each HTTP request. Increase for slow servers or large files; decrease to fail fast on unresponsive sources."
              },
              "maxRetries": {
                "title": "Maximum retry attempts",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 3,
                "description": "Number of automatic retries for failed downloads. Helps overcome transient network issues."
              },
              "maxRedirects": {
                "title": "Maximum HTTP redirects",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 5,
                "description": "How many redirect hops to follow before aborting. Protects against redirect loops."
              },
              "skipHeadPrecheck": {
                "title": "Skip HEAD pre-check",
                "type": "boolean",
                "editor": "checkbox",
                "default": false,
                "description": "Bypass preliminary HEAD request for file size. Enable if servers block HEAD methods; streaming guard still enforces size limits."
              },
              "headers": {
                "title": "Custom HTTP headers",
                "type": "array",
                "editor": "keyValue",
                "description": "Add authentication tokens, API keys, or custom User-Agent strings. Example: Authorization: Bearer YOUR_TOKEN",
                "placeholderKey": "Header name",
                "placeholderValue": "Header value",
                "default": [],
                "items": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string",
                      "title": "Header name",
                      "description": "HTTP header name (e.g., Authorization, User-Agent)"
                    },
                    "value": {
                      "type": "string",
                      "title": "Header value",
                      "description": "Header value, such as token or custom user agent string"
                    }
                  },
                  "required": [
                    "key",
                    "value"
                  ],
                  "additionalProperties": false
                }
              },
              "useApifyProxy": {
                "title": "Enable Apify Proxy",
                "type": "boolean",
                "editor": "checkbox",
                "default": false,
                "description": "Route downloads through Apify's residential/datacenter proxy network. Requires appropriate plan subscription."
              },
              "proxyUrl": {
                "title": "Custom proxy URL",
                "type": "string",
                "editor": "textfield",
                "description": "Alternative proxy endpoint (ignored if Apify Proxy is enabled). Format: http://user:pass@proxy.example.com:8080"
              },
              "apifyProxyGroups": {
                "title": "Apify Proxy groups",
                "type": "array",
                "editor": "stringList",
                "description": "Target specific proxy groups when using Apify Proxy (e.g., RESIDENTIAL, GOOGLE_SERP).",
                "items": {
                  "type": "string"
                }
              },
              "apifyProxyCountry": {
                "title": "Apify Proxy country",
                "type": "string",
                "editor": "textfield",
                "description": "Two-letter country code for geo-targeted proxy exit nodes (e.g., US, GB, DE)."
              }
            },
            "additionalProperties": false
          },
          "limits": {
            "title": "Size & volume safeguards",
            "required": [],
            "type": "object",
            "description": "Prevent runaway processing by capping download sizes, file counts, and individual file sizes. Protects compute credits and memory.",
            "properties": {
              "maxDownloadBytes": {
                "title": "Max archive download size (bytes)",
                "type": "integer",
                "editor": "number",
                "minimum": 1,
                "default": 524288000,
                "description": "Hard cap on archive file size (default: 500 MB). Archives exceeding this limit are rejected before extraction. Set higher for large datasets."
              },
              "maxFiles": {
                "title": "Max files per archive",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 1000,
                "description": "Stop processing after this many files per archive (including nested archives). 0 = unlimited. Prevents infinite-loop archives."
              },
              "maxFilesOverflowMode": {
                "title": "Behavior after max files reached",
                "type": "string",
                "editor": "select",
                "enum": [
                  "summary_only",
                  "dataset_rows"
                ],
                "enumTitles": [
                  "Summary only (no dataset rows after cap)",
                  "Dataset rows for all skipped files"
                ],
                "default": "summary_only",
                "description": "When more files exist than maxFiles, keep counting in SUMMARY. By default dataset rows are not written for overflow; switch to dataset_rows to keep per-file skip records."
              },
              "maxFileSizeBytes": {
                "title": "Max individual file size (bytes)",
                "type": "integer",
                "editor": "number",
                "minimum": 0,
                "default": 524288000,
                "description": "Skip files larger than this limit (default: 500 MB). 0 = no per-file limit. Useful for filtering out large media files."
              }
            },
            "additionalProperties": false
          },
          "filters": {
            "title": "Security & data selection (filters)",
            "required": [],
            "type": "object",
            "description": "Control which files are extracted using extension allowlists/blocklists and path pattern exclusions. Blocks executables by default for security.",
            "properties": {
              "allowedExtensions": {
                "title": "Allowed extensions (allowlist)",
                "type": "array",
                "editor": "stringList",
                "description": "If set, ONLY these extensions will be extracted (e.g., .pdf, .csv, .json). Leave empty to allow all except blocked types.",
                "items": {
                  "type": "string"
                }
              },
              "blockedExtensions": {
                "title": "Blocked extensions (security)",
                "type": "array",
                "editor": "stringList",
                "description": "Never extract these file types. Default blocks executables and scripts to prevent malware execution.",
                "default": [
                  ".exe",
                  ".dll",
                  ".bat",
                  ".cmd",
                  ".sh",
                  ".ps1",
                  ".msi"
                ],
                "items": {
                  "type": "string"
                }
              },
              "excludedPatterns": {
                "title": "Excluded path patterns",
                "type": "array",
                "editor": "stringList",
                "description": "Skip files whose paths contain these substrings. Default removes macOS metadata folders and system files.",
                "default": [
                  "__MACOSX/",
                  ".DS_Store"
                ],
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "formats": {
            "title": "Archive types & nested extraction",
            "required": [],
            "type": "object",
            "description": "Specify which archive formats to accept and how deep to recurse into nested archives. Supports ZIP, RAR, 7Z, TAR, ISO, CAB, and 30+ more formats.",
            "properties": {
              "archiveTypes": {
                "title": "Allowed archive formats",
                "type": "array",
                "editor": "stringList",
                "description": "\"auto\" accepts any 7-Zip-supported format (30+ types). Or specify exact formats: zip, rar, 7z, tar, gz, bz2, xz, iso, cab, arc, zipx, etc.",
                "default": [
                  "auto"
                ],
                "items": {
                  "type": "string"
                }
              },
              "extractNestedArchives": {
                "title": "Enable recursive extraction",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "description": "Automatically detect and extract archives found inside archives. Example: process data.zip containing backup.tar.gz containing files.7z."
              },
              "nestedArchiveDepth": {
                "title": "Maximum nesting depth",
                "type": "integer",
                "editor": "number",
                "default": 2,
                "description": "How many archive layers to recurse (0=top-level only, 1=one layer deep, 2=two layers, etc.). Prevents infinite recursion attacks."
              },
              "nestedBeyondDepthBehavior": {
                "title": "Behavior for too-deep nesting",
                "type": "string",
                "editor": "select",
                "enum": [
                  "skip",
                  "extract_as_file"
                ],
                "enumTitles": [
                  "Skip entirely (mark as SKIPPED_NESTED_TOO_DEEP)",
                  "Extract as regular file (don't recurse)"
                ],
                "default": "skip",
                "description": "When an archive is found beyond the max depth: either skip it completely or treat it as a normal file without recursion."
              },
              "followSymlinks": {
                "title": "Follow symlinks when target exists",
                "type": "boolean",
                "editor": "checkbox",
                "default": false,
                "description": "When enabled, symbolic links inside the archive are resolved if their target exists within the extracted temp directory; otherwise they are recorded as metadata-only (status SYMLINK)."
              },
              "listTimeoutMillis": {
                "title": "7-Zip listing timeout (ms)",
                "type": "integer",
                "editor": "number",
                "default": 0,
                "description": "Abort 7-Zip directory listing after this many milliseconds. 0 = no timeout. Use for archives that hang during inspection."
              }
            },
            "additionalProperties": false
          },
          "incremental": {
            "title": "Incremental extraction (compute saver)",
            "required": [],
            "type": "object",
            "description": "Skip unchanged files between runs using CRC+size signatures. Saves compute credits and bandwidth by only processing new or modified files.",
            "properties": {
              "enabled": {
                "title": "Enable incremental extraction",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "description": "Track file signatures per archive URL. On subsequent runs, unchanged files are automatically skipped. Reduces compute costs by up to 90% for repeat processing."
              },
              "indexKeyPrefix": {
                "title": "Index storage key prefix",
                "type": "string",
                "editor": "textfield",
                "default": "INCR--",
                "description": "KV store key prefix for incremental state records. Only use letters, numbers, and !-_.'() to keep keys KV-safe."
              },
              "strategy": {
                "title": "Change detection method",
                "type": "string",
                "editor": "select",
                "enum": [
                  "crc+size",
                  "sizeOnly"
                ],
                "enumTitles": [
                  "CRC32 + File Size (recommended, accurate)",
                  "File Size Only (faster, less precise)"
                ],
                "default": "crc+size",
                "description": "CRC+size detects content changes even when file size stays the same. Size-only is faster but can miss modifications."
              },
              "onlyNewOrChanged": {
                "title": "Extract only new/changed files",
                "type": "boolean",
                "editor": "checkbox",
                "default": true,
                "description": "Skip extraction for unchanged files (they still appear in the dataset index with SKIPPED_UNCHANGED status). Disable to always re-extract everything."
              }
            },
            "additionalProperties": false
          },
          "errorHandling": {
            "title": "Failure tolerance & recovery",
            "required": [],
            "type": "object",
            "description": "Choose between strict fail-fast behavior or lenient continue-on-error mode. Strict mode aborts immediately on any failure; lenient mode logs errors and continues.",
            "properties": {
              "mode": {
                "title": "Error handling strategy",
                "type": "string",
                "editor": "select",
                "enum": [
                  "lenient",
                  "strict"
                ],
                "enumTitles": [
                  "Lenient (log errors, continue processing)",
                  "Strict (abort run on first error)"
                ],
                "default": "lenient",
                "description": "Lenient mode processes all archives even when some fail. Strict mode aborts immediately on the first download or extraction error, ensuring no partial results."
              },
              "maxPerArchiveErrors": {
                "title": "Max file errors per archive",
                "type": "integer",
                "editor": "number",
                "default": 20,
                "description": "In lenient mode, treat an archive as failed after this many file-level errors. Prevents endless processing of corrupted archives."
              }
            },
            "additionalProperties": false
          },
          "webhook": {
            "title": "Completion webhook notification",
            "required": [],
            "type": "object",
            "description": "POST a signed JSON payload with run statistics to your endpoint when extraction completes. Useful for pipeline automation and monitoring.",
            "properties": {
              "url": {
                "title": "Webhook endpoint URL",
                "type": "string",
                "editor": "textfield",
                "description": "POST target for the final run summary. Payload includes timestamps, file counts, errors, and per-archive breakdowns."
              },
              "secret": {
                "title": "HMAC signing secret",
                "type": "string",
                "editor": "textfield",
                "description": "Optional secret for HMAC-SHA256 payload signing. Signature appears in x-universal-archive-signature header for verification."
              }
            },
            "additionalProperties": false
          },
          "textOptions": {
            "title": "Text encoding normalization",
            "required": [],
            "type": "object",
            "description": "Best-effort UTF-8 verification for text-like files. Attempts to decode as UTF-8 and store normalized bytes; falls back to original bytes if decoding fails.",
            "properties": {
              "convertTextToUtf8": {
                "title": "Normalize text to UTF-8",
                "type": "boolean",
                "editor": "checkbox",
                "default": false,
                "description": "Attempt to decode text files as UTF-8 and re-store them in UTF-8 form. If decoding fails, the original bytes are kept."
              },
              "textExtensions": {
                "title": "Text file extensions",
                "type": "array",
                "editor": "stringList",
                "description": "Extensions to treat as text for normalization (e.g., .txt, .csv, .json, .xml, .html, .md, .log, .ini, .yaml). Empty = use built-in defaults.",
                "items": {
                  "type": "string"
                }
              }
            },
            "additionalProperties": false
          },
          "debug": {
            "title": "Enable debug logging",
            "type": "boolean",
            "description": "Switch to DEBUG log level for detailed diagnostics: HTTP traffic, archive contents, 7-Zip output, and full summary object. Use for troubleshooting.",
            "default": 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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}