{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader: URLs & Web Pages to Files + ZIP",
    "description": "Download images in bulk from direct image URLs or from any web page (img, srcset, og:image, lazy-loaded and linked images). Filter by size and format, remove duplicates, get a shareable link per file and one ZIP. Failed images are free.",
    "version": "0.1",
    "x-build-id": "FqEDZF3Je6cAoVqbU"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ctriolab~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ctriolab-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/ctriolab~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-ctriolab-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/ctriolab~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-ctriolab-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 image files (JPG, PNG, GIF, WebP, AVIF, SVG, BMP, ICO, TIFF, HEIF), one per line. Duplicates are removed. Leave both URL fields empty to try public-domain samples from Wikimedia Commons.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web page URLs (extract images)",
            "type": "array",
            "description": "Web pages to read. The Actor finds the images on each page (img src, srcset, lazy-load attributes, picture, og:image, twitter:image, inline background images and links to image files) and downloads them. Only the pages you list are read: no crawling, no login, no JavaScript rendering.",
            "items": {
              "type": "string"
            }
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 0,
            "type": "integer",
            "description": "Only the first N images found on each page are downloaded (page order, meta images first). 0 = no limit.",
            "default": 100
          },
          "maxImages": {
            "title": "Max images in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop saving after this many images. 0 = no limit.",
            "default": 0
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller images, e.g. icons and tracking pixels. Skipped images are not charged.",
            "default": 0
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip shorter images. Skipped images are not charged.",
            "default": 0
          },
          "minBytes": {
            "title": "Minimum file size (bytes)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip files smaller than this.",
            "default": 0
          },
          "maxBytes": {
            "title": "Maximum file size (bytes)",
            "minimum": 1000,
            "maximum": 500000000,
            "type": "integer",
            "description": "Larger files are stopped while downloading and skipped (not charged). Default 25 MB.",
            "default": 26214400
          },
          "formats": {
            "title": "Formats to keep",
            "type": "array",
            "description": "Leave empty to keep every image format. The format is read from the file itself, not from the URL.",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "png",
                "gif",
                "webp",
                "avif",
                "svg",
                "bmp",
                "ico",
                "tiff",
                "heif"
              ],
              "enumTitles": [
                "JPEG",
                "PNG",
                "GIF",
                "WebP",
                "AVIF",
                "SVG",
                "BMP",
                "ICO",
                "TIFF",
                "HEIF/HEIC"
              ]
            },
            "default": []
          },
          "srcsetMode": {
            "title": "Responsive images (srcset)",
            "enum": [
              "largest",
              "all"
            ],
            "type": "string",
            "description": "largest: download only the biggest version of each responsive image. all: download every size.",
            "default": "largest"
          },
          "includeMetaImages": {
            "title": "Include og:image and twitter:image",
            "type": "boolean",
            "description": "Also download the page's social preview images.",
            "default": true
          },
          "includeLinkedImages": {
            "title": "Include linked image files",
            "type": "boolean",
            "description": "Also download links (a href) that point straight at an image file, e.g. full-size images behind gallery thumbnails.",
            "default": true
          },
          "includeBackgroundImages": {
            "title": "Include inline background images",
            "type": "boolean",
            "description": "Also download images set in style=\"background-image: url(...)\" attributes. Images set only in CSS files are not found.",
            "default": true
          },
          "dedupeByContent": {
            "title": "Remove duplicate files",
            "type": "boolean",
            "description": "Different URLs that return the same file (same SHA-256) are saved once. The same URL is always downloaded only once per run.",
            "default": true
          },
          "onlyNewImages": {
            "title": "Only new images",
            "type": "boolean",
            "description": "Skip images that an earlier run with the same monitor name already saved (by URL and by file content). Use it for scheduled runs that watch the same pages.",
            "default": false
          },
          "monitorName": {
            "title": "Monitor name",
            "type": "string",
            "description": "Used with \"Only new images\". Runs with the same name share their memory of saved images (kept in your named key-value store \"bulk-image-downloader-state\").",
            "default": "default"
          },
          "createZip": {
            "title": "Also create one ZIP file",
            "type": "boolean",
            "description": "Adds images.zip with all saved images to the run's key-value store (link in the run summary).",
            "default": false
          },
          "maxZipMb": {
            "title": "Maximum ZIP size (MB)",
            "minimum": 1,
            "maximum": 3500,
            "type": "integer",
            "description": "Images that do not fit are still saved one by one, just not added to the ZIP.",
            "default": 1024
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt for web pages",
            "type": "boolean",
            "description": "Web pages that the site's robots.txt disallows are not read. Turn off only for sites you own or have permission to download from. Direct image URLs are not checked.",
            "default": true
          },
          "publicLinks": {
            "title": "Shareable file links",
            "type": "boolean",
            "description": "Makes this run's key-value store readable by anyone who has its link, so fileUrl opens without an API token. Turn off to keep the files private to your account.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Downloads at a time",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Parallel downloads.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (s)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time for one download. Network errors, timeouts, HTTP 429 and 5xx are retried twice.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}