{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader - Download All Images from URLs + ZIP",
    "description": "Download all images (JPG, PNG, WebP, SVG, GIF, AVIF) or files like PDFs from web pages or direct links into a ZIP and key-value store. Input: URLs; optional file types, minimum size, crawl depth. Returns per file: download URL, type, width, height, bytes, alt text, source page. Default: 20 files.",
    "version": "1.0",
    "x-build-id": "nD38T4ArRLZftfmv8"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kadi_bence~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kadi_bence-bulk-image-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/kadi_bence~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-kadi_bence-bulk-image-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/kadi_bence~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-kadi_bence-bulk-image-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "URLs (web pages or direct file links)",
            "type": "array",
            "description": "Web pages to download images/files from, and/or direct file links, one per line. Example: https://example.com/gallery or https://example.com/report.pdf. Pages are scanned for <img>, srcset, <picture>, lazy-loaded images, og:image, CSS backgrounds and links to files. Direct file links are always downloaded, whatever their type. Pages that load images with JavaScript are not supported. Only download files you have the right to use.",
            "items": {
              "type": "string"
            }
          },
          "fileTypes": {
            "title": "File types to download from pages",
            "type": "array",
            "description": "Which files found on the pages to keep. The real type is checked from the file's bytes, not just its name. Default: common image formats. Example: choose only PDF to get every PDF linked from a page.",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "png",
                "webp",
                "gif",
                "svg",
                "avif",
                "bmp",
                "ico",
                "tiff",
                "heic",
                "pdf",
                "doc",
                "docx",
                "xls",
                "xlsx",
                "ppt",
                "pptx",
                "odt",
                "ods",
                "rtf",
                "epub",
                "csv",
                "txt",
                "json",
                "xml",
                "zip",
                "gz",
                "7z",
                "rar",
                "mp3",
                "wav",
                "ogg",
                "m4a",
                "mp4",
                "webm",
                "mov"
              ],
              "enumTitles": [
                "JPG / JPEG",
                "PNG",
                "WebP",
                "GIF",
                "SVG",
                "AVIF",
                "BMP",
                "ICO (favicons)",
                "TIFF",
                "HEIC / HEIF",
                "PDF",
                "Word (DOC)",
                "Word (DOCX)",
                "Excel (XLS)",
                "Excel (XLSX)",
                "PowerPoint (PPT)",
                "PowerPoint (PPTX)",
                "OpenDocument text (ODT)",
                "OpenDocument sheet (ODS)",
                "RTF",
                "EPUB",
                "CSV",
                "TXT",
                "JSON",
                "XML",
                "ZIP",
                "GZIP",
                "7-Zip",
                "RAR",
                "MP3",
                "WAV",
                "OGG",
                "M4A",
                "MP4",
                "WebM",
                "MOV"
              ]
            },
            "default": [
              "jpg",
              "png",
              "webp",
              "gif",
              "svg",
              "avif"
            ]
          },
          "minWidth": {
            "title": "Min image width (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Skip images narrower than this. Example: 150 skips icons, spacers and tracking pixels. 0 = no limit. Images whose size can't be read are kept. Skipped files are free.",
            "default": 0
          },
          "minHeight": {
            "title": "Min image height (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Skip images shorter than this. Example: 150. 0 = no limit.",
            "default": 0
          },
          "minFileSizeKb": {
            "title": "Min file size (KB)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Skip files smaller than this. Example: 10. 0 = no limit.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Skip files larger than this (checked before downloading when the server reports the size, and while downloading). Up to 100 MB.",
            "default": 25
          },
          "createZip": {
            "title": "Create ZIP",
            "type": "boolean",
            "description": "Pack every saved file into files.zip in the key-value store (split into files-part-2.zip, files-part-3.zip... when it passes the ZIP size limit).",
            "default": true
          },
          "storeFiles": {
            "title": "Save each file to the key-value store",
            "type": "boolean",
            "description": "Save every file as its own key-value store record with a public link (publicUrl in the results). Turn off if you only need the ZIP. Keep at least one of this and Create ZIP on.",
            "default": true
          },
          "dedupe": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "Skip files whose content (SHA-256) was already saved in this run, even under a different URL. Duplicates are free.",
            "default": true
          },
          "fileNamePattern": {
            "title": "File name pattern",
            "type": "string",
            "description": "Name of each saved file (key-value store key and name inside the ZIP). Tokens: {index} (00001...), {name} (original file name), {host}, {hash} (SHA-256 prefix), {page} (number of the start URL), {type}. Must contain {index}, {name} or {hash}. The extension is added automatically. Characters not allowed in keys become '-'. Example: {host}-{index}-{name}.",
            "default": "{index}-{name}"
          },
          "outputSkipped": {
            "title": "List skipped files too",
            "type": "boolean",
            "description": "Also add a (free) row for files that were skipped: duplicates, too small, wrong type, too large, blocked by robots.txt. Failed downloads are always listed.",
            "default": false
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many files are saved. You pay per saved file, so this also caps the cost. Default 20; example: 1000.",
            "default": 20
          },
          "maxDepth": {
            "title": "Crawl depth",
            "minimum": 0,
            "maximum": 2,
            "type": "integer",
            "description": "0 = only the pages you list. 1 = also pages they link to on the same website. 2 = one level further. Direct file links are never crawled.",
            "default": 0
          },
          "maxPagesPerStartUrl": {
            "title": "Max pages per start URL",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "With a crawl depth above 0: at most this many pages are scanned per URL you listed (including that page). Example: 50.",
            "default": 5
          },
          "zipMaxMb": {
            "title": "ZIP part size limit (MB)",
            "minimum": 10,
            "maximum": 400,
            "type": "integer",
            "description": "Start a new ZIP part when the current one reaches this size. Larger parts need more run memory (about 2x the part size). Example: 100.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many files to download at the same time (at most 6 per website, and fewer when the run's memory is small). Example: 10.",
            "default": 10
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Usually not needed. Use Apify Proxy (datacenter) to download from other IP addresses. Residential proxies are not supported. This Actor does not bypass logins, paywalls or bot protection.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}