{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk File Downloader and Image Downloader: Web Pages, PDFs",
    "description": "Bulk file downloader: saves the files of links, web pages, a CSV or Google Sheet, or another actor's dataset: images, video, audio, PDFs, documents, archives. Each file is stored with a link, its name, type, size, SHA-256 and image size, and all in one ZIP if you ask. Duplicates are not charged.",
    "version": "0.1",
    "x-build-id": "V00WYbiRTI9fLFqOJ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/v0iddo~bulk-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-v0iddo-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/v0iddo~bulk-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-v0iddo-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/v0iddo~bulk-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-v0iddo-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": {
          "fileUrls": {
            "title": "File links",
            "type": "array",
            "description": "Direct links to files of any type (images, video, audio, PDF, documents, archives). Each one is downloaded whatever its type. A link that turns out to be a web page comes back as a row that says so: put it under Pages instead.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Pages",
            "type": "array",
            "description": "Web pages to download files from: the images it shows (the largest size it offers), its video and audio, and the files it links to, filtered by File types. Pages are read as HTML without a browser, so files a page loads with JavaScript only are not found.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "Datasets of other runs",
            "type": "array",
            "description": "Datasets of your Apify account whose items hold file links, for example the results of a TikTok, eBay or Shopify scraper: pick them, or give their IDs or names through the API. Their file links are downloaded like File links; this actor may only read the datasets."
          },
          "csvUrls": {
            "title": "Spreadsheets of links",
            "type": "array",
            "description": "Links to CSV, TSV, JSON or JSON Lines files, or Google Sheets shared with anyone who has the link: the file links in their rows are downloaded like File links. The first row names the columns; Link fields picks them.",
            "items": {
              "type": "string"
            }
          },
          "urlFields": {
            "title": "Link fields or columns",
            "type": "array",
            "description": "The dataset fields or spreadsheet columns that hold the file links, for example displayUrl, images, media.url or Image URL (a field with a list takes every link in it). Empty: the fields whose name or link points to a file (image, photo, video, audio, media, file, pdf, cover, .jpg, .mp4 ...); profile pictures are left out.",
            "items": {
              "type": "string"
            }
          },
          "fileNameField": {
            "title": "Name files by",
            "type": "string",
            "description": "A dataset field or spreadsheet column whose value names each file, for example sku or handle: the file is then sku123.jpg (sku123-2.jpg for the second file of the same row) instead of its own name."
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Which files to take from Pages. Direct file links and links from datasets are always downloaded.",
            "items": {
              "type": "string",
              "enum": [
                "image",
                "video",
                "audio",
                "pdf",
                "document",
                "archive"
              ],
              "enumTitles": [
                "Images",
                "Videos",
                "Audio",
                "PDF files",
                "Documents (Word, Excel, PowerPoint, OpenDocument, text, CSV, EPUB)",
                "Archives (ZIP, RAR, 7z, TAR, GZ)"
              ]
            },
            "default": [
              "image"
            ]
          },
          "sameSiteOnly": {
            "title": "Only files from the page's own site",
            "type": "boolean",
            "description": "Take only files on the host of the page or its subdomains, leaving out files on other hosts (many sites keep their images on a separate CDN host, so this can drop them).",
            "default": false
          },
          "maxFilesPerPage": {
            "title": "Maximum files per page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Caps the files taken from one page, in the order they appear on it.",
            "default": 200
          },
          "minImageKB": {
            "title": "Skip images under (KB)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Images found on pages that are smaller than this are left out (icons, spacers, tracking pixels) and not charged, and so are SVG images drawn under 48 px; 0 keeps every image. Direct links are always kept.",
            "default": 5
          },
          "maxFileMB": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Larger files come back as a row with the reason, at no charge. Above 100 MB give the run more memory: 1 GB for every 150 MB of this limit (a few files can be in memory at once).",
            "default": 100
          },
          "zipFiles": {
            "title": "Also put every file in one ZIP",
            "type": "boolean",
            "description": "Every file the run stores also goes into files.zip, linked in the last row of the dataset (that row costs nothing). The ZIP holds up to a third of the run's memory (about 680 MB at the default 2 GB): later files are stored and linked as usual. Give the run more memory for a bigger ZIP.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "The run stops after this many result rows. It also caps what one run can cost.",
            "default": 1000
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Leave as is: the run reads the site directly, without a proxy. Pick proxy groups here only to send it through Apify Proxy."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}