{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk File Downloader: Download Files from URLs to ZIP",
    "description": "Bulk file downloader API: download files from URLs, or the PDFs, documents and media linked on web pages, in one run. Dedupe by SHA-256, allow or block extensions, get public links and one URL to ZIP archive. Pay per file.",
    "version": "0.1",
    "x-build-id": "yJwoUtztf7k6SBiHq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-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/data-done-right~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-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/data-done-right~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-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": {
          "urls": {
            "title": "File URLs",
            "type": "array",
            "description": "Direct links to the files to download (PDF, DOCX, XLSX, CSV, MP3, MP4, ZIP, images and more), one per line. Example: https://example.com/report.pdf. Use only files you have the right to download and reuse.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Or web pages to extract file links from",
            "type": "array",
            "description": "Web pages whose linked files you want: the Actor reads <a href>, <source>, <embed>, <object>, <audio> and <video> links and downloads the ones that end in a file extension from 'Only these extensions' (or a built-in list of document, archive, audio, video and image types). Example: https://example.com/reports. The page's robots.txt is respected; login-walled social sites are not supported.",
            "items": {
              "type": "string"
            }
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most URLs processed in this run (listed and extracted from pages together). URLs beyond this are not fetched and not charged.",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Files larger than this are skipped, checked from the headers and again while downloading. 1 MB = 1,000,000 bytes.",
            "default": 100
          },
          "allowedExtensions": {
            "title": "Only these extensions",
            "type": "array",
            "description": "Optional. Keep only files with these extensions, for example pdf, docx, csv. Leave empty to keep every type that is not blocked. The extension comes from the file's bytes, then the URL, the Content-Disposition name and the server's content type. For pageUrls it also decides which links are followed.",
            "items": {
              "type": "string"
            }
          },
          "blockedExtensions": {
            "title": "Blocked extensions",
            "type": "array",
            "description": "Files with these extensions are skipped (programs, installers, scripts and web pages by default). Blocked wins over 'Only these extensions'. Web pages (HTML) are never saved, whatever this list says, and a program or script you unblock is stored as .bin, never as .exe or .js.",
            "default": [
              "exe",
              "msi",
              "bat",
              "cmd",
              "com",
              "scr",
              "ps1",
              "sh",
              "dll",
              "jar",
              "vbs",
              "hta",
              "js",
              "mjs",
              "html",
              "htm",
              "xhtml",
              "shtml",
              "apk",
              "dmg",
              "pkg",
              "deb",
              "rpm"
            ],
            "items": {
              "type": "string"
            }
          },
          "dedupe": {
            "title": "Skip duplicate files",
            "type": "boolean",
            "description": "Files with identical content (SHA-256) are delivered once; later copies get status duplicate and are not charged.",
            "default": true
          },
          "zip": {
            "title": "Also make one ZIP",
            "type": "boolean",
            "description": "Also save all delivered files in one files.zip in the key-value store (with a manifest.csv), with a public link in the SUMMARY record. The ZIP itself is free.",
            "default": false
          },
          "zipMaxMb": {
            "title": "Max ZIP size (MB)",
            "minimum": 1,
            "maximum": 300,
            "type": "number",
            "description": "Files that would push the ZIP over this size are still saved and listed, but left out of the ZIP.",
            "default": 100
          },
          "keepOriginalNames": {
            "title": "Keep original file names in the ZIP",
            "type": "boolean",
            "description": "Off: ZIP entries are named 0001-name.ext (numbered, so names never clash). On: just name.ext, taken from the URL or Content-Disposition and sanitised (no folders, only letters, digits, dot, dash, underscore); a counter is added if two files share a name.",
            "default": false
          },
          "outputStoreName": {
            "title": "Save files in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period."
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many files are downloaded at the same time, across all hosts.",
            "default": 5
          },
          "perHostConcurrency": {
            "title": "Parallel downloads per host",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "At most this many downloads run at once on the same website, so a long list does not hammer one server.",
            "default": 3
          },
          "perHostDelayMs": {
            "title": "Delay per host (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum time between two requests to the same website.",
            "default": 250
          },
          "maxRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How often a download is retried after a network error, timeout or HTTP 429/5xx, with growing waits (Retry-After is honored). 401, 403 and 404 are never retried.",
            "default": 2
          },
          "timeoutSecs": {
            "title": "Timeout per file (seconds)",
            "minimum": 5,
            "maximum": 1800,
            "type": "integer",
            "description": "Time allowed for each download attempt, counted from when it gets its turn at its host (see the per-host delay).",
            "default": 120
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many pageUrls pages are read. Further pages get a skipped row.",
            "default": 20
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Send downloads through Apify Proxy or your own proxies. Usually not needed. Each retry uses a new session (new IP).",
            "default": {
              "useApifyProxy": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}