{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk File Downloader — Links or a Dataset to Files and a ZIP",
    "description": "Bulk download files from a list of URLs or from a field of another run's dataset (images, PDFs, videos, documents): each file stored with a public link, size, type and SHA-256, duplicates skipped, plus one ZIP of everything. A bulk image downloader you can also call via API.",
    "version": "1.0",
    "x-build-id": "r4iOiEleBbB8oaiK1"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-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/steadyscrape~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-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/steadyscrape~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-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 links",
            "type": "array",
            "description": "Direct links to files: images, PDFs, videos, audio, documents, archives. One per line. A link that opens a web page is not a file and comes back as a free row that says so.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or take the links from a dataset",
            "type": "string",
            "description": "Pick the dataset of another run (a scraper's results, an import) and this Actor downloads the files its items link to: product photos, listing pictures, attachments, PDFs. Only the dataset you pick here can be read."
          },
          "datasetFields": {
            "title": "Dataset fields with the links",
            "type": "array",
            "description": "The fields of each dataset item that hold file links, as dotted paths; arrays are walked through, so images.url takes the url of every element of images. Leave empty to take every link in a field named like media (image, photo, thumbnail, video, file, pdf…) or ending in a file extension.",
            "items": {
              "type": "string"
            }
          },
          "fileTypes": {
            "title": "Kinds of files to keep",
            "type": "array",
            "description": "Keep only these kinds; the rest come back as free skipped rows, read no further than their headers. Empty keeps every kind of file. Web pages are never stored.",
            "items": {
              "type": "string",
              "enum": [
                "images",
                "videos",
                "audio",
                "documents",
                "archives",
                "other"
              ],
              "enumTitles": [
                "Images",
                "Videos",
                "Audio",
                "Documents (PDF, Office, text, CSV, JSON)",
                "Archives (ZIP, 7z, RAR, tar, gz)",
                "Anything else"
              ]
            },
            "default": []
          },
          "maxFiles": {
            "title": "Most files",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops starting downloads once this many files are stored.",
            "default": 1000
          },
          "maxTotalMegabytes": {
            "title": "Most megabytes in total",
            "minimum": 1,
            "type": "integer",
            "description": "The run never stores more than this. A file that would pass it is not stored and not charged, and the run stops there.",
            "default": 5000
          },
          "maxFileMegabytes": {
            "title": "Most megabytes per file",
            "minimum": 1,
            "maximum": 2048,
            "type": "integer",
            "description": "A bigger file is a free too_large row. A file waits on the run's disk until it is stored, and a run has twice its memory in disk: for files over 500 MB, give the run more memory.",
            "default": 500
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "On: a link a site's robots.txt disallows for this Actor (or for every robot) is a free row, and so is every link of a site whose robots.txt cannot be read. Off: you take responsibility for having the right to download those files.",
            "default": true
          },
          "skipDuplicates": {
            "title": "Skip duplicate files",
            "type": "boolean",
            "description": "A file with the same bytes (SHA-256) as one already stored in this run is not stored again and not charged; its row points to the first.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Downloads at once",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Files downloaded at the same time, never more than two from one host.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}