{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader - URLs, Pages & Datasets to ZIP",
    "description": "Download images in bulk from image URLs, web pages (img, srcset, og:image) or any Apify dataset (images found automatically, file names from SKU). Public link per file + images.zip. Duplicates by SHA-256 are skipped and not charged, icons filtered, optional resize and WebP/JPG/PNG conversion. 300 im",
    "version": "0.1",
    "x-build-id": "BHNa3nzk6qze9sem6"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/martin10291~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-martin10291-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/martin10291~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-martin10291-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/martin10291~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-martin10291-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 URLs",
            "type": "array",
            "description": "Direct image (or file) links, one per line. Each is downloaded and stored with a public link. Leave empty if you use pages or a dataset.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web pages to collect images from",
            "type": "array",
            "description": "Web pages. Every image on the page is collected: <img> src, lazy data-src, the largest srcset size, og:image / twitter:image and links to image files. Small icons are filtered by Min width / Min height.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset (integration input)",
            "type": "string",
            "description": "Optional. A dataset ID or dataset URL, for example the result of a product scraper. In the Integrations tab of another actor set it to {{resource.defaultDatasetId}}. Every image link in every item is downloaded."
          },
          "imageFields": {
            "title": "Image fields in the dataset",
            "type": "array",
            "description": "Optional. Field names that hold the images, for example images, thumbnailUrl or media.url (dot paths and lists work). Empty = every field that looks like an image link is used.",
            "items": {
              "type": "string"
            }
          },
          "nameField": {
            "title": "File name field",
            "type": "string",
            "description": "Optional. Dataset field used for file names, for example sku, asin, id or title. Files become <value>_1.jpg, <value>_2.jpg ... Set File naming to 'name' to use it."
          },
          "datasetMaxItems": {
            "title": "Max dataset items",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Upper limit of dataset items read, to keep the cost under control.",
            "default": 1000
          },
          "monitorId": {
            "title": "Only-new mode: monitor ID",
            "type": "string",
            "description": "Optional. Any name, for example my-shop-images. Runs with the same monitor ID skip every URL stored in earlier runs, so a daily schedule downloads only new images. Empty = download everything every time."
          },
          "fileTypes": {
            "title": "File types",
            "enum": [
              "images",
              "all"
            ],
            "type": "string",
            "description": "Images only skips links that turn out not to be images. All files stores any file type.",
            "default": "images"
          },
          "outputFormat": {
            "title": "Convert images to",
            "enum": [
              "original",
              "jpg",
              "webp",
              "png"
            ],
            "type": "string",
            "description": "Keep the original bytes or convert every image (transparent images get a white background in JPG). SVG and HEIC stay as they are.",
            "default": "original"
          },
          "maxWidth": {
            "title": "Resize: max width (px)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Wider images are scaled down to this width, keeping the aspect ratio. 0 = no resize.",
            "default": 0
          },
          "quality": {
            "title": "JPG / WebP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "Quality for converted JPG and WebP images (30-100).",
            "default": 85
          },
          "minWidth": {
            "title": "Min width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Images narrower than this are skipped (icons, tracking pixels). 0 = keep all.",
            "default": 50
          },
          "minHeight": {
            "title": "Min height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Images lower than this are skipped. 0 = keep all.",
            "default": 50
          },
          "dedupeByContent": {
            "title": "Skip duplicate images",
            "type": "boolean",
            "description": "The same picture under different URLs (CDN sizes, mirrors) is stored once, detected by SHA-256 of the file content. Duplicates are not charged.",
            "default": true
          },
          "fileNaming": {
            "title": "File naming",
            "enum": [
              "auto",
              "name",
              "hash"
            ],
            "type": "string",
            "description": "How stored files are named. Names are made unique automatically.",
            "default": "auto"
          },
          "createZip": {
            "title": "Create ZIP",
            "type": "boolean",
            "description": "Also pack all stored files into images.zip (more parts images-2.zip ... for big runs). Links are in the OUTPUT and RUN_SUMMARY records.",
            "default": true
          },
          "zipPartMb": {
            "title": "ZIP part size (MB)",
            "minimum": 5,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum size of one ZIP part.",
            "default": 50
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many stored files (each stored file = one result).",
            "default": 200
          },
          "maxFileMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Bigger files are skipped.",
            "default": 25
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many files download at the same time (max 6 per host, to stay polite).",
            "default": 12
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}