{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk File and Image Downloader: URLs to Files, ZIP",
    "description": "Download thousands of files or images from a URL list or any dataset field. Each file gets a stable link, SHA-256 hash, size, type and image dimensions; optional ZIP parts, WebP or JPEG conversion and resizing. Failed and duplicate files are free.",
    "version": "0.1",
    "x-build-id": "ibAZVC5sRdhmIJKQa"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/magicfingers~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-magicfingers-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/magicfingers~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-magicfingers-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/magicfingers~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-magicfingers-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",
            "maxItems": 50000,
            "type": "array",
            "description": "Direct links to files or images, one per line (count: up to 50,000 URLs per run, together with the dataset). Only http and https links to public servers. Repeated URLs are downloaded once. Pages that need a log-in and video sites are not supported.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with URLs",
            "type": "string",
            "description": "Optional: also read URLs from this dataset (ID or name), for example the output of a scraper run. The Actor only reads it. Rows are read 1,000 at a time."
          },
          "urlField": {
            "title": "URL field in the dataset",
            "maxLength": 200,
            "type": "string",
            "description": "Field of each dataset row that holds the URL, as a dot path such as images.url (text: a field name). Arrays are expanded, so a list of image links gives one file per link. Objects with a url or src field are read too.",
            "default": "url"
          },
          "output": {
            "title": "Output",
            "enum": [
              "files",
              "zip",
              "both"
            ],
            "type": "string",
            "description": "files: each file is stored as its own record with its own link. zip: files are packed into ZIP parts of up to 500 MB and only the parts are stored. both: separate records and ZIP parts.",
            "default": "files"
          },
          "fileNamePattern": {
            "title": "File name pattern",
            "maxLength": 200,
            "type": "string",
            "description": "Name of each stored file (text with tokens): {index} position in the list, {basename} original file name, {stem} name without extension, {ext} extension, {hash} first 16 characters of the SHA-256 hash, {host} host name, and with a dataset any top-level field of the row, such as {sku}. The extension is added when missing; repeated names get -2, -3.",
            "default": "{index}-{basename}"
          },
          "keyValueStoreName": {
            "title": "Named store",
            "maxLength": 63,
            "type": "string",
            "description": "Optional name of a key-value store to keep the files after the run's retention period (letters, digits and hyphens, at most 63 characters). It is created when missing. Empty: the run's own store, kept for the retention period of your plan."
          },
          "convertImagesTo": {
            "title": "Convert images to",
            "enum": [
              "none",
              "webp",
              "jpeg",
              "png"
            ],
            "type": "string",
            "description": "Optional format for images (PNG, JPEG, GIF, WebP, BMP, TIFF, ICO, AVIF). none keeps each image as it is. Animated images and images too large for the run's memory are kept as they are.",
            "default": "none"
          },
          "maxImageWidth": {
            "title": "Max image width",
            "minimum": 16,
            "maximum": 10000,
            "type": "integer",
            "description": "Shrink wider images to this width, keeping the aspect ratio (unit: pixels). Empty: no resizing. Narrower images are not enlarged.",
            "default": null
          },
          "skipDuplicates": {
            "title": "Skip duplicate files",
            "type": "boolean",
            "description": "Store identical content once (same SHA-256 hash). A repeated file gets a free row whose duplicateOf names the first copy.",
            "default": true
          },
          "maxFileSizeMb": {
            "title": "Max file size",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Skip files larger than this (unit: MB, 1 MB = 1,048,576 bytes). The download stops as soon as a file passes the limit. The run's disk is twice its memory: when a limit cannot fit, the run stops before any download and says how much memory it needs.",
            "default": 50
          },
          "allowedContentTypes": {
            "title": "Allowed content types",
            "maxItems": 50,
            "type": "array",
            "description": "Optional allow-list of media types, one per line, for example image/* or application/pdf. Empty: every type except HTML pages. Files of other types are listed in FAILED and not charged.",
            "items": {
              "type": "string"
            }
          },
          "requestHeaders": {
            "title": "Request headers",
            "type": "object",
            "description": "Optional headers sent with every download, as a JSON object of text values, for example {\"Referer\": \"https://example.com/\"} (count: at most 20). Authorization and Cookie headers are not allowed: public files only."
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Most downloads at the same time (unit: files). The Actor may use fewer when large files would not fit on the run's disk.",
            "default": 10
          },
          "fileTimeoutSecs": {
            "title": "File timeout",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "Longest time for one download attempt, redirects included (unit: seconds). Timeouts are tried 3 times in total.",
            "default": 120
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy for the downloads (an Apify Proxy group or your own proxy URLs). Default: no proxy.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}