{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader & Compressor: Full-Size, WebP, ZIP",
    "description": "Download all images from web pages, direct links, a CSV/TXT list of URLs or Dropbox/Drive share links at full size (srcset, lazy, og:image, CSS). Compress to a target size in KB, convert to WebP/JPEG/PNG, resize, dedupe; one ZIP. $0.0015 per file saved; failed files free.",
    "version": "0.1",
    "x-build-id": "MhxOOh9gSvZoM6MFQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/webstack-labs~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-webstack-labs-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/webstack-labs~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-webstack-labs-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/webstack-labs~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-webstack-labs-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": "Web pages or file links",
            "type": "array",
            "description": "Web pages (every image in their HTML is downloaded: img, srcset at the largest size, lazy-load data-src, picture, og:image, CSS backgrounds) and/or direct links to images or files (downloaded as they are). Dropbox and Google Drive share links of an image or file (shared with anyone who has the link) work. Up to 1,000 URLs per run. One row per file.",
            "items": {
              "type": "string"
            }
          },
          "urlListFile": {
            "title": "URL list file (optional)",
            "type": "string",
            "description": "Link to a .txt, .csv, .tsv or JSON file that lists the pages or image links (one per line, or in any CSV column; header rows are ignored). Its URLs are added after \"urls\"; the 1,000-URL limit covers both. A Dropbox or Google Drive share link to the file works. Reading the list is free. Leave empty to use only \"urls\"."
          },
          "maxFiles": {
            "title": "Max files per run",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many files are saved (each saved file is charged once). Default 500.",
            "default": 500
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Download at most this many image links from one page (in page order). Default 200.",
            "default": 200
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Skip images narrower than this (icons, thumbnails). Skipped images are free. Default 0 (keep all). 1x1 tracking pixels are always skipped.",
            "default": 0
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Skip images lower than this. Skipped images are free. Default 0 (keep all).",
            "default": 0
          },
          "convertTo": {
            "title": "Convert images to",
            "enum": [
              "original",
              "webp",
              "jpeg",
              "png"
            ],
            "type": "string",
            "description": "original (default) keeps each file byte for byte. webp, jpeg or png re-encodes raster images (SVG and non-image files are kept as they are). Included in the file price.",
            "default": "original"
          },
          "maxDimension": {
            "title": "Resize: longest side (px)",
            "minimum": 0,
            "maximum": 16000,
            "type": "integer",
            "description": "Shrink images whose longer side is larger than this, keeping the aspect ratio (never enlarges). 0 (default) = no resizing.",
            "default": 0
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "Quality 30-100 when images are converted or resized to JPEG or WebP. Default 85.",
            "default": 85
          },
          "targetSizeKb": {
            "title": "Compress to at most (KB)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Image compressor: make every raster image at most this many kilobytes (for example 200 for web pages, 1000 for upload limits). JPEG and WebP get a lower quality (down to 30), PNG a 256-colour palette, and only if that is not enough the image is scaled down. Keeps the format unless 'Convert images to' is set. Rows show bytes before and after and overTargetSize. Animated images and SVG are kept as they are. 0 (default) = no limit. Included in the file price.",
            "default": 0
          },
          "dedupe": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "Skip files whose content (SHA-256) was already saved in this run, for example the same logo on every page. Duplicates are free. Default true.",
            "default": true
          },
          "createZip": {
            "title": "Create a ZIP",
            "type": "boolean",
            "description": "Also put all saved files into one images.zip in the key-value store (folders by site). The link is in the run summary (SUMMARY.zipUrl). Default true.",
            "default": true
          },
          "linkedFileTypes": {
            "title": "Also download linked files",
            "type": "array",
            "description": "File types to download when a page links to them (a href), besides images: pdf, svg, zip, csv, xlsx, docx, pptx, mp4, mp3, json, txt. Default: none (images only).",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "includeCssBackgrounds": {
            "title": "Include CSS background images",
            "type": "boolean",
            "description": "Also take images from inline style attributes and style blocks (background-image: url(...)). Default true.",
            "default": true
          },
          "includeMetaImages": {
            "title": "Include social preview images",
            "type": "boolean",
            "description": "Also take the page's og:image and twitter:image (social preview) images. Default true.",
            "default": true
          },
          "sameSiteOnly": {
            "title": "Only images from the same site",
            "type": "boolean",
            "description": "Skip images hosted on other domains than the page (ads, trackers, embeds). CDN subdomains of the same site are kept. Default false.",
            "default": false
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Files larger than this fail (free). Default 50.",
            "default": 50
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages and files that the site's robots.txt disallows for bots (free rows). Default true; turn off only for sites you own or may download from.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}