{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image & File Downloader: SKU-named ZIP + Image Audit",
    "description": "Download images and files in bulk from a list of links, a CSV/Google Sheet or another Actor's dataset. Names files by SKU, splits ZIPs at 500 MB, and audits every link: broken, duplicate, too small, non-square, wrong type, CMYK. $1 per 1,000 files, no start fee.",
    "version": "0.1",
    "x-build-id": "KGNV1kxB9pz3DrxSc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/open-data-tools~bulk-image-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-open-data-tools-bulk-image-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/open-data-tools~bulk-image-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-open-data-tools-bulk-image-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/open-data-tools~bulk-image-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-open-data-tools-bulk-image-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": "One direct file link per line (images, PDFs, documents, audio, video, archives). To name files by product, put the SKU on the same line: SKU-123, https://shop.example.com/img/123.jpg. A line can hold several links. Links listed twice are downloaded once.",
            "items": {
              "type": "string"
            }
          },
          "csvUrl": {
            "title": "CSV or Google Sheet link",
            "type": "string",
            "description": "Optional. A CSV/TSV file link or a Google Sheet shared as 'Anyone with the link' (for example a Shopify or WooCommerce product export). The column with file links and the SKU column are found automatically; a cell can hold several links."
          },
          "datasetId": {
            "title": "Dataset from another Actor",
            "type": "string",
            "description": "Optional. Download the files from another Actor's results, for example a product or real-estate scraper. Pick the dataset or paste its ID. In an Actor-to-Actor integration set it to {{resource.defaultDatasetId}}."
          },
          "urlField": {
            "title": "Link field (optional)",
            "type": "string",
            "description": "Column or field that holds the file links, for CSV and dataset input. Leave empty to detect it (image, images, imageUrl, photos, thumbnail, file, pdf, downloadUrl and similar). Dots reach nested fields (media.0.url). Separate several with commas: images, thumbnail."
          },
          "skuField": {
            "title": "SKU / ID field (optional)",
            "type": "string",
            "description": "Column or field used to name files {sku}_1.jpg, {sku}_2.jpg. Leave empty to detect it (sku, Variant SKU, handle, productId, asin, mpn, gtin, ean, id)."
          },
          "fileNaming": {
            "title": "File names",
            "enum": [
              "auto",
              "original",
              "sha1"
            ],
            "type": "string",
            "description": "The real file type decides the extension, so a .jpg link that serves WebP is saved as .webp (and flagged type-mismatch). Name clashes get -2, -3.",
            "default": "auto"
          },
          "zip": {
            "title": "Pack all files into ZIP",
            "type": "boolean",
            "description": "Adds files-001.zip (and -002, -003 when the size limit is reached) to the key-value store, each with a manifest.csv mapping every file back to its link and SKU. Links are in the run SUMMARY.",
            "default": false
          },
          "zipPartMb": {
            "title": "ZIP part size (MB)",
            "minimum": 10,
            "maximum": 2000,
            "type": "integer",
            "description": "A new ZIP part starts when this size would be passed. 500 MB opens easily on any computer and in email/drive uploads.",
            "default": 500
          },
          "saveFiles": {
            "title": "Save each file separately",
            "type": "boolean",
            "description": "Each file gets its own download link (fileUrl). Turn off to keep files only in the ZIP, or for an audit-only run (check links, sizes and dimensions without storing anything).",
            "default": true
          },
          "skipDuplicateFiles": {
            "title": "Store identical files once",
            "type": "boolean",
            "description": "Files with the same content (sha1) under different links are flagged duplicate and point to the first copy instead of being stored twice.",
            "default": true
          },
          "fileTypes": {
            "title": "File types",
            "enum": [
              "any",
              "images"
            ],
            "type": "string",
            "description": "Web pages (HTML) are never saved: the row is marked failed with flag html-page and is not charged.",
            "default": "any"
          },
          "minImageSide": {
            "title": "Flag images smaller than (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Images whose shorter side is below this get the flag 'small'. Marketplaces often want 1000 px or more for zoom. 0 turns the check off.",
            "default": 500
          },
          "maxFileMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Larger files fail with flag too-big and are not charged. For files over 100 MB raise the run memory too.",
            "default": 50
          },
          "maxFiles": {
            "title": "Maximum number of links",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on how many links are downloaded in this run."
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Files downloaded at the same time across all hosts.",
            "default": 8
          },
          "maxPerHost": {
            "title": "Parallel downloads per host",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Keeps the load on each website polite. Rate limits (HTTP 429) and server errors are retried up to 3 times, honouring Retry-After.",
            "default": 2
          },
          "timeoutSecs": {
            "title": "Timeout per file (seconds)",
            "minimum": 10,
            "maximum": 900,
            "type": "integer",
            "description": "A file that takes longer is retried, then marked failed.",
            "default": 120
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}