{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Image Downloader: Bulk Images from Pages or URL Lists",
    "description": "Download every image from web pages or direct image URLs as files or ZIP archives, with source page, alt text, size, format and hash per image. robots.txt honored, no proxy. Or list image URLs only, for audits. USD 2.50 per 1,000 images saved.",
    "version": "1.0",
    "x-build-id": "wlohol5D78S9FdW4d"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jtpalms~website-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jtpalms-website-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/jtpalms~website-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-jtpalms-website-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/jtpalms~website-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-jtpalms-website-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": {
          "startUrls": {
            "title": "Web pages or image URLs",
            "type": "array",
            "description": "Web pages or direct image URLs, one per line. A page is fetched with plain HTTP, no browser: images that only appear after JavaScript runs are not found. The default is the Featured pictures page of Wikimedia Commons, whose pictures are freely licensed.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "download",
              "list"
            ],
            "type": "string",
            "description": "download: save every image (charged per image saved). list: return image URLs, alt text and page details without downloading anything, for audits (charged per image listed, much cheaper).",
            "default": "download"
          },
          "outputFormat": {
            "title": "Where the images go",
            "enum": [
              "files",
              "zip",
              "zipPerUrl"
            ],
            "type": "string",
            "description": "files: each image is its own file in the key-value store with a public link in its row. zip: archives of the whole run (split at the size below). zipPerUrl: one archive per input page. Archives are written when full or at the end of the run, and a row is charged only after its archive exists.",
            "default": "files"
          },
          "filenameMode": {
            "title": "File names",
            "enum": [
              "original",
              "hash",
              "numbered"
            ],
            "type": "string",
            "description": "original: the name in the image URL, made safe, with the real format as extension. hash: the first 16 characters of the SHA-256. numbered: image-0001, image-0002 and so on.",
            "default": "original"
          },
          "maxZipMb": {
            "title": "Split ZIP archives at (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "A ZIP archive is closed and a new one started when it would grow past this size (1 to 100, default 50). Archives are built in memory, so they never exceed 100 MB.",
            "default": 50
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Images taken from each page after the filters below (1 to 1,000).",
            "default": 100
          },
          "maxImages": {
            "title": "Max images in the run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Hard cap on images saved (or listed) in the whole run (1 to 100,000). The run stops when it is reached.",
            "default": 1000
          },
          "maxFileMb": {
            "title": "Max size of one image (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Larger images are skipped and not charged (1 to 50, default 20). Images are read into memory, so the run lowers its parallel downloads when this is high and the run has little memory.",
            "default": 20
          },
          "maxTotalMb": {
            "title": "Max total download (MB)",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stops starting new downloads once this many megabytes have been received (10 to 5,000, default 500). Apify bills data transfer, so this is also a cost guard.",
            "default": 500
          },
          "formats": {
            "title": "Image formats to keep",
            "type": "array",
            "description": "Only these formats are kept. The format is read from the file's bytes, not from its name. ICO (favicons) is off by default.",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "jpeg",
                "png",
                "webp",
                "gif",
                "svg",
                "avif",
                "bmp",
                "ico",
                "tiff",
                "heic"
              ],
              "enumTitles": [
                "JPG",
                "JPEG",
                "PNG",
                "WebP",
                "GIF",
                "SVG",
                "AVIF",
                "BMP",
                "ICO (icons)",
                "TIFF",
                "HEIC"
              ]
            },
            "default": [
              "jpg",
              "jpeg",
              "png",
              "webp",
              "gif",
              "svg",
              "avif",
              "bmp"
            ]
          },
          "minWidth": {
            "title": "Minimum width (pixels)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images narrower than this. Download mode reads the real size from the file; list mode needs 'Read dimensions'. 0 means no limit.",
            "default": 0
          },
          "minHeight": {
            "title": "Minimum height (pixels)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this (same rules as the width). 0 means no limit.",
            "default": 0
          },
          "minFileKb": {
            "title": "Minimum file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip tiny files such as tracking pixels and spacers. 0 means no limit; 2 is a good start.",
            "default": 0
          },
          "sameDomainOnly": {
            "title": "Only images on the page's own site",
            "type": "boolean",
            "description": "Keep only images hosted on the page's own domain or its subdomains. Many sites serve images from a CDN, so this is off by default.",
            "default": false
          },
          "includeImageUrlPatterns": {
            "title": "Only these image URLs",
            "type": "array",
            "description": "Optional. Keep only image URLs that match at least one pattern: a glob (* inside one path segment, ** across segments, for example **/uploads/**), a plain text the URL must contain, or a regular expression written as re:\\.(jpg|png)$.",
            "items": {
              "type": "string"
            }
          },
          "excludeImageUrlPatterns": {
            "title": "Skip these image URLs",
            "type": "array",
            "description": "Image URLs that match any pattern are skipped (same pattern types as above), for example **/sprite*.png or /thumbnails/.",
            "items": {
              "type": "string"
            }
          },
          "srcsetPolicy": {
            "title": "Responsive images (srcset)",
            "enum": [
              "largest",
              "all"
            ],
            "type": "string",
            "description": "largest: one image per srcset or picture, the one with the largest width. all: every size listed.",
            "default": "largest"
          },
          "includeBackgroundImages": {
            "title": "CSS background images",
            "type": "boolean",
            "description": "Also take images from inline style attributes and the page's own <style> blocks. Linked stylesheet files are not read.",
            "default": true
          },
          "includeMetaImages": {
            "title": "Social share images",
            "type": "boolean",
            "description": "Also take og:image, twitter:image and link rel=image_src.",
            "default": true
          },
          "includeIcons": {
            "title": "Favicons and touch icons",
            "type": "boolean",
            "description": "Also take the page's icon links. Needs the ICO format ticked for .ico files.",
            "default": false
          },
          "crawlDepth": {
            "title": "Follow links (depth)",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "0: only the pages you gave. 1 to 3: also read same-site pages linked from them, that many clicks deep. robots.txt is obeyed and requests stay polite.",
            "default": 0
          },
          "maxPages": {
            "title": "Max pages per start URL",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "When following links: the most pages read for each start URL, the start page included (1 to 1,000).",
            "default": 10
          },
          "stayInStartFolder": {
            "title": "Stay in the start folder",
            "type": "boolean",
            "description": "When following links, only visit pages under the folder of the start URL (https://example.com/blog/ covers /blog/).",
            "default": false
          },
          "includeUrlPatterns": {
            "title": "Only follow these pages",
            "type": "array",
            "description": "Optional. When following links, visit only pages that match a pattern (glob, plain text or re: regular expression).",
            "items": {
              "type": "string"
            }
          },
          "excludeUrlPatterns": {
            "title": "Do not follow these pages",
            "type": "array",
            "description": "When following links, skip pages that match any pattern, for example **/login** or /cart.",
            "items": {
              "type": "string"
            }
          },
          "fetchDimensions": {
            "title": "Read dimensions (list mode)",
            "type": "boolean",
            "description": "List mode only: read the first 64 KB of each image to get width, height, real format and size. Adds one request per image. Rows for images that fail are free.",
            "default": false
          },
          "uniqueImageUrls": {
            "title": "List each image URL once (list mode)",
            "type": "boolean",
            "description": "List mode normally returns one row per page and image (so a logo on 500 pages gives 500 rows, which is what an alt text audit needs). Turn this on to list each image URL once for the whole run.",
            "default": false
          },
          "preferModernFormats": {
            "title": "Ask for WebP and AVIF",
            "type": "boolean",
            "description": "Send an Accept header that lets image CDNs answer with WebP or AVIF. Off by default so you get the original format.",
            "default": false
          },
          "requestsPerSecondPerHost": {
            "title": "Requests per second per host",
            "minimum": 0.1,
            "maximum": 2,
            "type": "number",
            "description": "Pause between requests to one host (0.1 to 2; 2 means one every 500 ms, which is the fastest this actor goes). At most 2 requests run at once per host. A Crawl-delay in robots.txt always wins.",
            "default": 2
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Downloads in progress at once across all hosts (1 to 16). Per host there are never more than 2.",
            "default": 8
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "5 to 120.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}