{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk File Downloader: URL List to Storage or ZIP",
    "description": "Bulk file downloader for a list of direct URLs (PDF, CSV, ZIP, images, …): saves each file to Apify storage with content type, size and SHA-256, plus an optional free archive.zip. HTML pages, duplicates and failures free. Respects robots.txt. $1 per 1,000 files. Plus $0.00005 start.",
    "version": "0.1",
    "x-build-id": "v7JY2Kqkdymh7xptM"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fecklesspleb~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fecklesspleb-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/fecklesspleb~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-fecklesspleb-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/fecklesspleb~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-fecklesspleb-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "File URLs",
            "type": "array",
            "description": "Direct file URLs to download. HTML pages (login walls, soft-404s) are skipped and not charged. To read URLs from a CSV file, a public Google Sheet or an Apify dataset, use CSV URL or Dataset below.",
            "default": [
              {
                "url": "https://www.python.org/static/img/python-logo.png"
              },
              {
                "url": "https://www.python.org/static/favicon.ico"
              }
            ],
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "minSizeKb": {
            "title": "Min file size (KB)",
            "minimum": 0,
            "type": "number",
            "description": "Skip files smaller than this. 0 keeps all.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Larger files are skipped and not charged.",
            "default": 50
          },
          "keyValueStoreName": {
            "title": "Key-value store name",
            "type": "string",
            "description": "Save files to a named key-value store instead of the run's default store."
          },
          "createZip": {
            "title": "Also create a zip",
            "type": "boolean",
            "description": "After downloads, write archive.zip of saved files into the same key-value store. Zipping is free. The zip is capped at 30% of Actor memory (5 to 100 MB); files that do not fit are left out and listed.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Downloads in parallel. The Actor may lower this automatically so that parallel downloads fit in its memory. Requests to one host are spaced at least 0.25 s apart.",
            "default": 10
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many files. 0 means no cap.",
            "default": 0
          },
          "preset": {
            "title": "Preset",
            "enum": [
              "none",
              "quickSample",
              "smallFilesOnly",
              "newFilesOnly"
            ],
            "type": "string",
            "description": "Optional shortcut. A preset only fills fields you left at their default; any field you changed keeps your value. Each preset caps the files it saves, so a preset run costs at most $0.01 (see Pricing).",
            "default": "none"
          },
          "skipAlreadyDownloaded": {
            "title": "Skip files downloaded by earlier runs",
            "enum": [
              "auto",
              "always",
              "never"
            ],
            "type": "string",
            "description": "Default Auto: runs started by an Apify Schedule skip files that an earlier scheduled run already saved, and skipped files are not charged. This creates a named key-value store bulk-file-downloader-skip-state in your Apify account (or the name in Skip state store name). To opt out, set this to Never. Files whose SHA-256 is already in the skip state store (saved and charged by an earlier run) are not saved again and not charged; they get a free row with status skipped. The file is still fetched to compute its hash. Auto turns this on only for scheduled runs; manual, API, webhook and integration (n8n, Make, Zapier) runs keep downloading every file unless you choose Always.",
            "default": "auto"
          },
          "skipStateStoreName": {
            "title": "Skip state store name",
            "type": "string",
            "description": "Named key-value store that remembers downloaded files (default bulk-file-downloader-skip-state). Use a different name per job so separate schedules do not share history. 1-63 letters, digits or hyphens."
          },
          "datasetId": {
            "title": "Dataset with URLs",
            "type": "string",
            "description": "Optional. Read URLs from an Apify dataset, for example the output of a scraper run. Added to the URL list (the default sample URL list is ignored when a dataset or CSV is set). Up to 5,000 URLs from Dataset and CSV together."
          },
          "datasetUrlField": {
            "title": "Dataset URL field",
            "type": "string",
            "description": "Field that holds the URL in each dataset item (dots for nested fields, e.g. product.image). Empty: the first of url, fileUrl, imageUrl, src, link, href that holds a URL. Lists of URLs are read too."
          },
          "csvUrl": {
            "title": "CSV URL or Google Sheet URL",
            "type": "string",
            "description": "Optional. A public CSV file URL, or a Google Sheet shared as 'Anyone with the link' (its normal URL is turned into the CSV export URL; no Google sign-in). Max 5 MB. Added to the URL list."
          },
          "csvUrlColumn": {
            "title": "CSV URL column",
            "type": "string",
            "description": "Header of the column with URLs. Empty: a column named url, else the first column that holds URLs (a file without a header row works too)."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}