{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader - Resize, Convert, ZIP, Dedupe",
    "description": "Download images in bulk from image links, web pages or an Apify dataset. Each file gets a public link, optional single ZIP, resize and convert to WebP, JPG or PNG, custom file names, SHA-256 dedupe and minimum size filter. Width, height, bytes and hash per image. Failed images are free.",
    "version": "0.1",
    "x-build-id": "fwX9uS86Zgw8Nby9X"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/scrapewise~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-scrapewise-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/scrapewise~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-scrapewise-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/scrapewise~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-scrapewise-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": {
          "urls": {
            "title": "Image links and web pages",
            "type": "array",
            "description": "Links to download from, one per line, mixed freely. A direct image link (jpg, png, webp, gif, avif, heic, svg...) is downloaded as is, for example https://picsum.photos/id/237/1200/800. A web page link, for example https://books.toscrape.com/, is opened and every image in its HTML is downloaded (up to 'Maximum images per web page'). The Actor tells them apart by what the server returns, not by the file extension. You pay only for images saved. Also accepts 'imageUrls' and 'startUrls'.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset with image links",
            "type": "string",
            "description": "Optional. An Apify dataset from your account to take image links from, picked from the list or pasted as an ID, for example the output of a product, real estate or social media scraper. Every item is scanned for image links (see 'Dataset fields'), and each saved row keeps the field it came from. Works together with the links above."
          },
          "datasetFields": {
            "title": "Dataset fields with the image links",
            "type": "array",
            "description": "Optional. Names of the dataset fields that hold the image links, one per line, with dots for nested fields, for example images, product.imageUrl or media.0.url. Lists inside a field are expanded. Leave empty to detect image links automatically: fields named image, photo, picture, thumbnail and similar, plus any link ending in an image extension.",
            "items": {
              "type": "string"
            }
          },
          "maxImages": {
            "title": "Maximum images",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many images are saved, for example 10 for a test or 5000 for a full catalog. Failed, duplicate and filtered-out images do not count and are free. Leave empty for no limit (every link and page in the input). Since you pay per image saved, this is also your cost cap."
          },
          "maxImagesPerPage": {
            "title": "Maximum images per web page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "How many image links to take from each web page, in the order they appear in the HTML, from 1 to 5,000 (default 500). Lower it to grab only the first images of each page, such as the main product photos. Direct image links are not affected.",
            "default": 500
          },
          "createZip": {
            "title": "Create a ZIP with all images",
            "type": "boolean",
            "description": "Off (default). On: also builds one ZIP archive of all saved images, stored as images.zip in the run's key-value store with a metadata.csv inside (link, file name, size, format, dimensions). Very large runs are split into parts: images-part-2.zip, images-part-3.zip and so on. No extra charge.",
            "default": false
          },
          "saveToKeyValueStore": {
            "title": "Save each image as a separate file",
            "type": "boolean",
            "description": "On (default): each image is stored as its own file in the run's key-value store and gets a public link in 'fileUrl'. Turn off to keep only the ZIP, or turn both this and the ZIP off for a metadata-only check of your links (size, format, dimensions, SHA-256 hash) without storing files.",
            "default": true
          },
          "fileNamePattern": {
            "title": "File name pattern",
            "type": "string",
            "description": "Name given to each saved file, built from placeholders: {index} (000001, order in the run), {name} (original file name), {hash} (first 12 characters of the SHA-256), {host} (site of the image), {page} (web page it was found on), {width}, {height} and {ext}. Default {index}-{name}.{ext}, for example 000001-photo.jpg. Use {hash}.{ext} to get stable names across runs. Names are made unique automatically."
          },
          "convertTo": {
            "title": "Convert to",
            "enum": [
              "original",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Convert every image to one format: JPG, PNG or WebP. Default 'Keep original format'. Transparent images converted to JPG get a white background. Animated GIF or WebP and SVG files are kept as they are. Conversion is included in the image price.",
            "default": "original"
          },
          "resizeMaxWidth": {
            "title": "Resize: maximum width (px)",
            "minimum": 16,
            "maximum": 20000,
            "type": "integer",
            "description": "Optional. Shrink images wider than this many pixels, keeping the aspect ratio, for example 1200. Accepts 16 to 20,000. Smaller images are never enlarged. Empty = keep the original width."
          },
          "resizeMaxHeight": {
            "title": "Resize: maximum height (px)",
            "minimum": 16,
            "maximum": 20000,
            "type": "integer",
            "description": "Optional. Shrink images taller than this many pixels, keeping the aspect ratio, for example 1200. Accepts 16 to 20,000. Smaller images are never enlarged. Empty = keep the original height."
          },
          "quality": {
            "title": "JPG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality from 1 to 100 (default 85) for JPG and WebP files, used only when an image is converted or resized. Lower numbers give smaller files; 75 to 85 is a good balance for the web.",
            "default": 85
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Skip images narrower than this many pixels, for example 200 to leave out icons, tracking pixels and thumbnails. Skipped images get a free row and are never charged. Empty or 0 = no minimum."
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Skip images shorter than this many pixels, for example 200. Skipped images get a free row and are never charged. Empty or 0 = no minimum."
          },
          "minFileSizeKB": {
            "title": "Minimum file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Optional. Skip files smaller than this many kilobytes, for example 10 to drop placeholder and spacer images. Skipped images are free. Empty or 0 = no minimum."
          },
          "maxFileSizeMB": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Files larger than this many megabytes are not downloaded and get a free TOO_LARGE row; the download stops as soon as the limit is passed. Accepts 1 to 200, default 25. The image price covers files up to 5 MB; each started megabyte above that is charged as 'Extra MB of a large image'.",
            "default": 25
          },
          "formats": {
            "title": "Only these formats",
            "type": "array",
            "description": "Optional. Keep only images whose real format (read from the file, not from the link) is in this list, one per line, for example jpg, png and webp. Other accepted values: gif, avif, heic, bmp, tiff, ico, svg. Other formats get a free row. Empty = all formats.",
            "items": {
              "type": "string"
            }
          },
          "dedupeByHash": {
            "title": "Skip duplicate images",
            "type": "boolean",
            "description": "On (default): the same file reached through different links is saved once, compared by the SHA-256 of its content; duplicates get a free row. Turn off to save every copy.",
            "default": true
          },
          "urlMustMatch": {
            "title": "Image link must match (regex)",
            "type": "string",
            "description": "Optional regular expression. Only image links found on web pages or in the dataset that match it are downloaded, for example /products/ or \\.jpe?g$. Links you paste directly are always downloaded."
          },
          "urlMustNotMatch": {
            "title": "Image link must not match (regex)",
            "type": "string",
            "description": "Optional regular expression. Image links found on web pages or in the dataset that match it are ignored, for example sprite|logo|icon. Links you paste directly are always downloaded."
          },
          "includeMetaImages": {
            "title": "Include social preview images",
            "type": "boolean",
            "description": "On (default): on web pages, also take the social preview images declared in the page head (og:image and twitter:image), which are often the main photo in full size. Turn off to take only the images in the page body.",
            "default": true
          },
          "includeBackgroundImages": {
            "title": "Include CSS background images",
            "type": "boolean",
            "description": "On (default): on web pages, also take background-image links written in style attributes, common for banners and hero images. Turn off to skip them.",
            "default": true
          },
          "includeLinkedImages": {
            "title": "Include images linked from the page",
            "type": "boolean",
            "description": "Off (default). On: on web pages, also download image files that the page links to, typical for galleries where a small thumbnail links to the full-size file.",
            "default": false
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 64,
            "type": "integer",
            "description": "How many files are downloaded at the same time, from 1 to 64 (default 16), with at most 8 per site so no single site is overloaded. Lower it if a site starts refusing downloads.",
            "default": 16
          },
          "downloadTimeoutSecs": {
            "title": "Timeout per file (seconds)",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Give up on a file that does not finish downloading in this many seconds, from 5 to 600 (default 60). Timed-out files get a free row and are not charged.",
            "default": 60
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default and not needed for most sites: images are downloaded directly, and an Apify datacenter proxy is tried automatically when a site refuses the first attempt. Turn on to send every download through the proxy you choose, for example a residential group for a site that blocks datacenter IPs.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}