{
  "openapi": "3.0.1",
  "info": {
    "title": "Parallel Bulk File Downloader – Fast URL Downloads",
    "description": "Download hundreds of public HTTP/HTTPS files in parallel from a URL list, stream them to Apify storage, and get one manifest row per file with checksums, status, size and download URL.",
    "version": "0.1",
    "x-build-id": "Dq74crDkamJIxTqg7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/automa-flow~parallel-bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-automa-flow-parallel-bulk-file-downloader",
        "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/automa-flow~parallel-bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-automa-flow-parallel-bulk-file-downloader",
        "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/automa-flow~parallel-bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-automa-flow-parallel-bulk-file-downloader",
        "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": {
          "datasetId": {
            "title": "Source Dataset",
            "pattern": "^(?:[A-Za-z0-9]{17})?$",
            "type": "string",
            "description": "Import from a completed upstream Actor. Takes priority over pasted and JSON URLs. Read access required."
          },
          "resumeFromStoreId": {
            "title": "Continue from run storage",
            "pattern": "^(?:[A-Za-z0-9]{17})?$",
            "type": "string",
            "description": "Select the Key-Value Store from a stopped Dataset-mode run, or copy its CONTINUE_INPUT. Reuses its frozen source and confirmed files. Takes priority over other source settings. Never continue concurrently."
          },
          "urlField": {
            "title": "URL field in Dataset",
            "pattern": "^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$",
            "maxLength": 200,
            "type": "string",
            "description": "One HTTP/HTTPS URL per row. Dot paths such as image.url are supported; arrays require an explicit index, such as images.0.url.",
            "default": "url"
          },
          "metadataFields": {
            "title": "Fields to preserve",
            "maxItems": 20,
            "type": "array",
            "description": "Selected scalar fields are copied to metadata in each output row. Dot paths supported. At most 1024 JSON bytes per value and 4096 bytes combined; missing values are omitted.",
            "items": {
              "type": "string",
              "maxLength": 200,
              "pattern": "^[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*$"
            },
            "default": [
              "productId",
              "sku",
              "SKU"
            ]
          },
          "fileNameField": {
            "title": "Optional file name field",
            "pattern": "^(?:[A-Za-z0-9_-]+(?:\\.[A-Za-z0-9_-]+)*)?$",
            "maxLength": 200,
            "type": "string",
            "description": "Optional source field containing a custom file name, up to 255 characters."
          },
          "datasetOffset": {
            "title": "Dataset start offset",
            "minimum": 0,
            "maximum": 1000000000,
            "type": "integer",
            "description": "Zero-based source row. Use NEXT_INPUT to process the next range after finishing this batch.",
            "default": 0
          },
          "maxItems": {
            "title": "Maximum Dataset rows per batch",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Rows selected into a frozen batch, including invalid URLs and duplicates. Dataset pages contain 50 rows. Pasted and JSON URL lists remain limited to 500.",
            "default": 1000
          },
          "urlsText": {
            "title": "File URLs (one per line)",
            "pattern": "^[ \\t\\r\\n]*(?:(?=https?://)[^\\s]{8,2048}[ \\t]*(?:\\r?\\n[ \\t\\r\\n]*|$)){0,500}(?![\\s\\S])",
            "maxLength": 1050000,
            "type": "string",
            "description": "Paste up to 500 public HTTP/HTTPS URLs, one per line. Blank lines and surrounding spaces are ignored. A non-empty list takes priority over the JSON URLs below. Leave blank to use JSON and custom file names."
          },
          "urls": {
            "title": "File URLs (JSON, optional names)",
            "minItems": 0,
            "maxItems": 500,
            "type": "array",
            "description": "Existing JSON format: up to 500 public HTTP/HTTPS URLs with optional fileName. Used only when urlsText is blank. Provide at least one URL in either field.",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "File URL",
                  "description": "Public http:// or https:// URL of the file to download.",
                  "minLength": 1,
                  "maxLength": 2048,
                  "pattern": "^https?://"
                },
                "fileName": {
                  "type": "string",
                  "title": "Output file name",
                  "description": "Optional file name override. Otherwise use Content-Disposition filename* or filename, then the final URL. All names are sanitized; remote paths are never used as local paths.",
                  "maxLength": 255
                }
              }
            }
          },
          "concurrency": {
            "title": "Download concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many files to download at once (1-20). Default 5. Prefer 3-10 for most public hosts.",
            "default": 5
          },
          "maxFileSizeMb": {
            "title": "Max file size (MiB)",
            "minimum": 1,
            "maximum": 256,
            "type": "integer",
            "description": "Reject responses larger than this limit when Content-Length is present, and enforce the same limit while streaming.",
            "default": 100
          },
          "timeoutSeconds": {
            "title": "Per-file timeout (seconds)",
            "minimum": 10,
            "maximum": 600,
            "type": "integer",
            "description": "Total source-download deadline per attempt, including DNS, redirects and body transfer. Queue time, retry backoff and storage upload are excluded.",
            "default": 120
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 4,
            "type": "integer",
            "description": "Extra attempts after the first try for timeouts, network errors and retryable HTTP statuses (408/425/429/5xx). Failed URLs, security rejections and oversize responses are never retried.",
            "default": 2
          },
          "overwrite": {
            "title": "Overwrite existing keys",
            "type": "boolean",
            "description": "When false (default), colliding sanitized file names within the run get a unique Key-Value Store key. When true, the same key may be overwritten. Dataset mode always keeps unique file keys for safe continuation.",
            "default": false
          },
          "resumeStoreIds": {
            "title": "Earlier continuation storages",
            "maxItems": 20,
            "type": "array",
            "description": "Filled by CONTINUE_INPUT. Keep the complete list to permit read-only access to files and snapshots from earlier steps."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}