{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk File Downloader — URLs or Dataset to Files & ZIP",
    "description": "Download files in bulk from a list of URLs or a dataset column (PDFs, images, documents, audio, video, any file) and get them with clean names, SHA-256 and size, plus one ZIP. Google Drive, Dropbox, OneDrive links work. For n8n, Make and AI agents.",
    "version": "1.0",
    "x-build-id": "9C7otlB9XKBsLqNUj"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tidydata~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tidydata-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/tidydata~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-tidydata-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/tidydata~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-tidydata-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": {
          "fileUrls": {
            "title": "File links",
            "type": "array",
            "description": "One link per line: PDFs, images, Word/Excel/PowerPoint, CSV, ZIP, audio, video or any other file. Direct links, Google Drive files and public folders, Dropbox, OneDrive/SharePoint, GitHub and Wikimedia Commons share links work. Files on YouTube, TikTok, Instagram, Facebook, X, Vimeo and their CDNs are refused (their terms forbid downloading). Only download files you have the right to use.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or: dataset with file links (chain another Actor)",
            "type": "string",
            "description": "A dataset from another run (a scraper, Merge, a Google Sheet import…) whose rows contain file links. Only read access to this one dataset is requested."
          },
          "datasetUrlFields": {
            "title": "Dataset fields with the links",
            "type": "string",
            "description": "Field name(s), comma separated. Nested paths and lists work: images, images.url, media.0.src. Leave empty to detect it (fileUrl, downloadUrl, url, imageUrl, image, src…)."
          },
          "datasetNameField": {
            "title": "Dataset field for the file name (optional)",
            "type": "string",
            "description": "Used with naming 'From a dataset field', e.g. sku, title or id. The real extension is added (APL-001.jpg, APL-001.pdf); a repeated name gets -2, -3…"
          },
          "naming": {
            "title": "File names",
            "enum": [
              "original",
              "numbered",
              "field"
            ],
            "type": "string",
            "description": "Names are cleaned (no spaces or special characters) and kept unique: a repeated name gets -2, -3…",
            "default": "original"
          },
          "fileTypes": {
            "title": "Only these file types (optional)",
            "type": "string",
            "description": "Comma separated extensions, e.g. pdf, docx, xlsx. Other files are skipped for free. Leave empty to keep every file."
          },
          "createZip": {
            "title": "Also pack everything into a ZIP",
            "type": "boolean",
            "description": "One ZIP with all the files (split into parts over the size below). Included in the price.",
            "default": true
          },
          "zipName": {
            "title": "ZIP name",
            "type": "string",
            "description": "The ZIP is saved as zip-<name>.zip in the run's key-value store.",
            "default": "files"
          },
          "zipPartMb": {
            "title": "Max ZIP part size (MB)",
            "minimum": 50,
            "maximum": 1000,
            "type": "integer",
            "description": "Bigger downloads are split into several ZIP parts.",
            "default": 500
          },
          "skipDuplicates": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "Repeated links are downloaded once, and files with exactly the same content (same SHA-256) are saved once. Duplicates are free.",
            "default": true
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Safety limit for long lists and datasets.",
            "default": 1000
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Bigger files are skipped for free (up to 500 MB per file with the default 2 GB memory).",
            "default": 200
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Lower it if a server starts refusing requests (HTTP 429).",
            "default": 8
          },
          "fileTimeoutSecs": {
            "title": "Max time per file (seconds)",
            "minimum": 30,
            "maximum": 3000,
            "type": "integer",
            "description": "A file that takes longer (a very slow server) fails for free and the run goes on with the others.",
            "default": 600
          },
          "allowHtmlPages": {
            "title": "Also save web pages (HTML)",
            "type": "boolean",
            "description": "Off: a link that opens a web page instead of a file fails for free (usual with share or login pages). On: the HTML is saved as a file. Note: Apify adds a small safety script when it serves HTML records; the copy inside the ZIP is the original.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}