{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image and File Downloader - Scan Pages, ZIP",
    "description": "Download images, PDFs and files in bulk from direct links or scan any web page for media. Saves every file to storage with a public link, optional ZIP archive.",
    "version": "0.0",
    "x-build-id": "bPYcXN8nPhc8jVrcT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tiger19935~bulk-image-file-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tiger19935-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/tiger19935~bulk-image-file-downloader/runs": {
      "post": {
        "operationId": "runs-sync-tiger19935-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/tiger19935~bulk-image-file-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-tiger19935-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",
        "required": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "URLs",
            "type": "array",
            "description": "Web pages to scan (default) or direct file links (turn off Scan pages).",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "scanPages": {
            "title": "Scan pages for files",
            "type": "boolean",
            "description": "On: each URL is a web page and the actor finds the files on it. Off: each URL is a direct link to a file.",
            "default": true
          },
          "fileTypes": {
            "title": "File types",
            "type": "array",
            "description": "Which kinds of files to collect when scanning pages. Images are taken from img tags, srcset, social preview tags and icons; other types from links and media tags.",
            "items": {
              "type": "string",
              "enum": [
                "images",
                "documents",
                "archives",
                "audio",
                "video"
              ],
              "enumTitles": [
                "Images (JPG, PNG, WebP, SVG ...)",
                "Documents (PDF, Word, Excel, PowerPoint, CSV ...)",
                "Archives (ZIP, RAR, 7Z ...)",
                "Audio (MP3, WAV ...)",
                "Video (MP4, WebM ...)"
              ]
            },
            "default": [
              "images"
            ]
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 20000,
            "type": "integer",
            "description": "Stop after this many files have been downloaded (billing applies per downloaded file).",
            "default": 100
          },
          "maxFilesPerPage": {
            "title": "Max files per page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Only the first N candidate files found on each page are used.",
            "default": 100
          },
          "dedupe": {
            "title": "Remove duplicates",
            "type": "boolean",
            "description": "Skip files with identical content (compared by SHA-256). Duplicates are not billed.",
            "default": true
          },
          "minWidth": {
            "title": "Minimum image width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller images such as icons and tracking pixels.",
            "default": 0
          },
          "minHeight": {
            "title": "Minimum image height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this.",
            "default": 0
          },
          "minFileSizeKb": {
            "title": "Minimum file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip files smaller than this.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Skip files larger than this.",
            "default": 25
          },
          "imageFormat": {
            "title": "Convert images to",
            "enum": [
              "original",
              "webp",
              "jpeg",
              "png"
            ],
            "type": "string",
            "description": "Keep originals or convert all raster images to one format.",
            "default": "original"
          },
          "maxImageDimension": {
            "title": "Resize images (longest side, px)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Shrink larger images so that neither side exceeds this. 0 keeps the original size.",
            "default": 0
          },
          "imageQuality": {
            "title": "JPEG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality 1-100 for converted images.",
            "default": 85
          },
          "sameDomainOnly": {
            "title": "Same domain only",
            "type": "boolean",
            "description": "Only collect files hosted on the same domain as the page. CDN-hosted images are skipped when on.",
            "default": false
          },
          "urlIncludePattern": {
            "title": "URL must match (regex)",
            "type": "string",
            "description": "Optional regular expression. Only file URLs that match are downloaded, for example /uploads/ or \\.pdf$"
          },
          "urlExcludePattern": {
            "title": "URL must not match (regex)",
            "type": "string",
            "description": "Optional regular expression. File URLs that match are skipped, for example thumb|logo|sprite"
          },
          "createZip": {
            "title": "Create a ZIP archive",
            "type": "boolean",
            "description": "Also save all files as one files.zip in the key-value store (up to 400 MB).",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many files are downloaded at once.",
            "default": 6
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}