{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image & File Downloader from CSV, Google Sheet or Dataset",
    "description": "Downloads every image or file linked in a dataset, CSV, Excel or Google Sheet and stores each with a public link, keeping your columns. Inputs: datasetId or fileUrl, urlField, fileNameField, createZip. Charged per file stored plus per 10 MB; broken links and repeats free. Agent-ready: x402, MCP.",
    "version": "0.1",
    "x-build-id": "8ZW28Apka2LjDtaSv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/nerolabs~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-nerolabs-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/nerolabs~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-nerolabs-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/nerolabs~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-nerolabs-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": {
          "datasetId": {
            "title": "Dataset",
            "type": "string",
            "description": "An Apify dataset with file or image links in it, for example the output of a product, property, Google Maps or social media scraper. Links can be one per cell, several per cell, or an array such as 'images'. Every original column is kept next to each downloaded file. Use the picker rather than typing an ID."
          },
          "fileUrl": {
            "title": "File or Google Sheet URL",
            "type": "string",
            "description": "A public link to a CSV, TSV, Excel, JSON or JSON Lines file with file or image links in it. A normal Google Sheets link works: share it as 'Anyone with the link can view'. Used when no dataset is given."
          },
          "fileFormat": {
            "title": "File format",
            "enum": [
              "auto",
              "csv",
              "tsv",
              "json",
              "jsonl",
              "xlsx"
            ],
            "type": "string",
            "description": "Leave on 'Detect automatically' unless the link has no file extension and the server reports the wrong content type.",
            "default": "auto"
          },
          "sheetName": {
            "title": "Excel sheet name",
            "type": "string",
            "description": "Which sheet to read from an Excel workbook. Defaults to the first sheet."
          },
          "fileUrls": {
            "title": "File URLs",
            "type": "array",
            "description": "A plain list of links to download, for a quick one-off run with no spreadsheet. Use the dataset, file or Google Sheet inputs above to keep your own columns next to each file.",
            "items": {
              "type": "string"
            }
          },
          "data": {
            "title": "Rows",
            "type": "array",
            "description": "Rows as inline JSON, an alternative to a dataset or file. Each object needs a field holding one or more file links."
          },
          "urlField": {
            "title": "Link column",
            "type": "string",
            "description": "The column holding the file links. Several columns can be given separated by commas, for example 'mainImage, gallery'. Left empty, the column is detected automatically, preferring one whose links end in .jpg, .png, .pdf or .mp4 over one merely named 'url'."
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Only keep files of these types, judged from the file's own bytes. Anything else is skipped and not charged. Leave empty to keep every type.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "pdf",
                "document",
                "archive",
                "text",
                "other"
              ],
              "enumTitles": [
                "Images",
                "Video",
                "Audio",
                "PDF",
                "Office documents",
                "Archives (zip, gz)",
                "Text (csv, json, txt)",
                "Other"
              ]
            },
            "default": []
          },
          "fileNameField": {
            "title": "Name files by column",
            "type": "string",
            "description": "A column whose value names each file, for example 'sku' gives SKU-123.jpg, then SKU-123-2.jpg for a row's second file. Left empty, files are named row number, file number and the original file name, for example 0007-1-IMG_2041.jpg, so they sort in sheet order."
          },
          "createZip": {
            "title": "Also make a ZIP",
            "type": "boolean",
            "description": "Pack every downloaded file into one ZIP to download in one go, split into parts when the total is large. Charged by size like the files themselves.",
            "default": false
          },
          "zipPartMb": {
            "title": "ZIP part size",
            "minimum": 50,
            "maximum": 2000,
            "type": "integer",
            "description": "Largest size of one ZIP part. Downloads above this are split into downloaded-files-part-1-of-N.zip and so on.",
            "default": 1000
          },
          "storeName": {
            "title": "Keep files in a named store",
            "type": "string",
            "description": "Save the files into a named key-value store in your account, which Apify keeps indefinitely, instead of the run's own storage, which expires with your plan's retention (7 days on Free). A file with the same name as one already there is replaced, so a re-run refreshes the set. Letters, digits and dashes."
          },
          "dedupeUrls": {
            "title": "Download repeated links once",
            "type": "boolean",
            "description": "When the same link appears more than once, download it once and point every later row at the same file, free of charge.",
            "default": true
          },
          "headers": {
            "title": "Request headers",
            "type": "object",
            "description": "Extra HTTP headers sent with every download, for hosts that only serve files with a Referer or to a signed-in session, for example {\"Referer\": \"https://example.com/\"}."
          },
          "keep": {
            "title": "Which rows to keep",
            "enum": [
              "all",
              "downloaded",
              "problems"
            ],
            "type": "string",
            "description": "One output row per link. 'Problems only' is the quick way to find broken links, web pages and blocked hosts in a large list.",
            "default": "all"
          },
          "keepOriginalFields": {
            "title": "Keep my original columns",
            "type": "boolean",
            "description": "Keep every column from the input row next to each file, so photo 37 stays next to product 37. Turn off for file details only.",
            "default": true
          },
          "concurrency": {
            "title": "Downloads at a time",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many files to download in parallel. Files stream to disk, so memory is not the limit; be gentle with small hosts.",
            "default": 8
          },
          "requestTimeoutSecs": {
            "title": "Download timeout",
            "minimum": 5,
            "maximum": 900,
            "type": "integer",
            "description": "How long one file may take to download in full before it is abandoned. Raise it for large videos on slow hosts. A timed-out file is never charged.",
            "default": 120
          },
          "maxFileMb": {
            "title": "Largest file",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Files bigger than this are skipped and not charged.",
            "default": 200
          },
          "maxFilesPerRow": {
            "title": "Max files per row",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most links taken from one row, counted across every link column.",
            "default": 100
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 0,
            "maximum": 1000000,
            "type": "integer",
            "description": "A ceiling on files downloaded in the whole run, as a cost cap. Links beyond it are listed as skipped and not charged. 0 means no limit.",
            "default": 0
          },
          "maxItems": {
            "title": "Max rows",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "A ceiling on how many rows are read from the input."
          },
          "exportFormats": {
            "title": "Export files",
            "type": "array",
            "description": "Also write the results table (every row with its file link) as a downloadable CSV or Excel file.",
            "items": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ],
              "enumTitles": [
                "CSV",
                "Excel (xlsx)"
              ]
            },
            "default": []
          },
          "outputDatasetName": {
            "title": "Append to named dataset",
            "type": "string",
            "description": "Also append every kept row to a named dataset that persists across runs. Not charged again."
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "type": "string",
            "description": "POST the run summary (counts, sizes, ZIP links) to this URL when the run finishes, for Slack, Zapier, Make, n8n or your own API. Charged only on a confirmed 2xx response."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}