{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader: Download Images from a URL List to ZIP",
    "description": "Download images in bulk from a list of URLs or web pages. Every file is saved to storage with a numbered name, with an optional ZIP, duplicate removal, resizing and conversion to JPG, PNG or WebP. One result row per image.",
    "version": "1.1",
    "x-build-id": "zD1cGb3yA9fJiHhSg"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-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/atesen-software~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-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/atesen-software~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-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",
        "properties": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to raster image files (JPG, PNG, WebP, GIF, AVIF, TIFF, BMP, HEIF), one per line. Supported images are saved to the run's key-value store. SVG files are unsupported. Only public links that open without a login work. Up to 10,000 per run.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Page URLs to extract images from (optional)",
            "type": "array",
            "description": "Public web pages to scan for images: <img> src and srcset (largest size), lazy-load data-src, <picture> sources, og:image and twitter:image. The Actor checks robots.txt for listed pages and their redirect destinations. JavaScript is not run, so images that a page adds with scripts are not found. Pages behind a login are not supported. Up to 200 pages per run.",
            "items": {
              "type": "string"
            }
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many image URLs to take from each page (in page order).",
            "default": 50
          },
          "outputFormat": {
            "title": "Output format",
            "enum": [
              "original",
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Keep the original raster image, or convert it to JPG, PNG or WebP.",
            "default": "original"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Shrink images wider than this, keeping the aspect ratio. 0 = no limit. Images are never enlarged.",
            "default": 0
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Shrink images taller than this, keeping the aspect ratio. 0 = no limit.",
            "default": 0
          },
          "quality": {
            "title": "Quality (JPG / WebP)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for converted or resized JPG and WebP files, 1-100.",
            "default": 85
          },
          "dedupe": {
            "title": "Duplicate detection",
            "enum": [
              "exact",
              "perceptual",
              "none"
            ],
            "type": "string",
            "description": "Exact: skip byte-identical files (SHA-256). Perceptual: also skip near-identical copies (same picture re-sized or re-compressed, 64-bit difference hash). Duplicates are listed in the dataset with a pointer to the first copy and are not charged.",
            "default": "exact"
          },
          "perceptualThreshold": {
            "title": "Perceptual match threshold",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Perceptual mode only: how many of the 64 hash bits may differ for two images to count as the same picture. 0 = nearly identical only, 5 = re-sized or re-compressed copies, 10+ = looser (more false matches).",
            "default": 5
          },
          "fileNameTemplate": {
            "title": "File name template",
            "type": "string",
            "description": "Name of each saved file. Placeholders: {index} (position in the list, 00001), {name} (file name from the URL), {hash} (first 12 characters of the SHA-256), {host} (site host name). The extension is added automatically. Characters that key-value store keys do not allow are replaced with '-'.",
            "default": "{index}-{name}"
          },
          "createZip": {
            "title": "Also create a ZIP archive",
            "type": "boolean",
            "description": "Also pack all saved images into ZIP file(s) in the key-value store (images-part-001.zip, ...). Large jobs are split into parts so memory and disk stay small. The single files are saved too.",
            "default": false
          },
          "zipPartMaxMb": {
            "title": "Max ZIP part size (MB)",
            "minimum": 5,
            "maximum": 1000,
            "type": "integer",
            "description": "A new ZIP part starts when the current one would grow past this size. Only the part being written sits on the run disk (twice the run memory), so keep it below that.",
            "default": 250
          },
          "maxImages": {
            "title": "Max images per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Upper limit on images downloaded in this run (direct URLs first, then images found on pages).",
            "default": 1000
          },
          "maxImageSizeMb": {
            "title": "Max size per image (MB)",
            "minimum": 0.01,
            "maximum": 100,
            "type": "number",
            "description": "Larger files are skipped (free) without being fully downloaded.",
            "default": 25
          },
          "maxTotalSizeMb": {
            "title": "Max total size (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "The run stops cleanly when the saved images reach this total size.",
            "default": 2000
          },
          "downloadTimeoutSecs": {
            "title": "Timeout per download (seconds)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Each image or page download must finish within this time.",
            "default": 60
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "How many images are downloaded at the same time. Lower it if a site answers HTTP 429.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}