{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader - Download All Images from URLs & Pages",
    "description": "Download all images from web pages or a list of image URLs in bulk. Extracts img, srcset (largest), og:image and linked images, filters by size and format, removes SHA-1 duplicates, converts/resizes to JPG/PNG/WebP and bundles a ZIP. Public download links for every file.",
    "version": "0.1",
    "x-build-id": "kY24oD949O5zKCvXQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/gazidev~image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-gazidev-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/gazidev~image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-gazidev-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/gazidev~image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-gazidev-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": "URLs (web pages and/or direct image links)",
            "type": "array",
            "description": "Web pages to extract all images from, and/or direct image URLs (.jpg, .png, .webp, ...). The type is detected automatically: HTML pages are scanned for images, image URLs are downloaded directly.",
            "default": [
              "https://en.wikipedia.org/wiki/List_of_national_parks_of_the_United_States"
            ],
            "items": {
              "type": "string"
            }
          },
          "bulkText": {
            "title": "Bulk list (paste URLs)",
            "type": "string",
            "description": "Paste many URLs at once: one per line, or comma/space separated (e.g. a column copied from a spreadsheet)."
          },
          "sourceDatasetId": {
            "title": "Take URLs from another dataset (ID)",
            "type": "string",
            "description": "Chain with another Actor: ID of an Apify dataset (e.g. from a product or Instagram scraper). Image/page URLs are read from the fields below."
          },
          "sourceDatasetField": {
            "title": "Dataset field(s) with URLs",
            "type": "string",
            "description": "Comma-separated field names holding URLs (string or array of strings).",
            "default": "imageUrl,url"
          },
          "maxImages": {
            "title": "Max images to save",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many images in total (0 = no limit). Handy for cheap test runs.",
            "default": 0
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 0,
            "type": "integer",
            "description": "Only take the first N image URLs found on each page (0 = all).",
            "default": 0
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images narrower than this, e.g. icons, spacers and tracking pixels. 0 = no limit.",
            "default": 100
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this. 0 = no limit.",
            "default": 100
          },
          "formats": {
            "title": "Formats to keep",
            "type": "array",
            "description": "Only save these formats (detected from the file content, not the extension). Empty = all.",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "png",
                "gif",
                "webp",
                "avif",
                "svg",
                "bmp",
                "tiff",
                "ico",
                "heic"
              ],
              "enumTitles": [
                "JPEG",
                "PNG",
                "GIF",
                "WebP",
                "AVIF",
                "SVG",
                "BMP",
                "TIFF",
                "ICO",
                "HEIC"
              ]
            },
            "default": []
          },
          "minFileSizeKb": {
            "title": "Minimum file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip files smaller than this. 0 = no limit.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Maximum file size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Downloads are streamed and aborted as soon as they exceed this size.",
            "default": 25
          },
          "dedupe": {
            "title": "Remove duplicates (SHA-1)",
            "type": "boolean",
            "description": "Skip images whose content is byte-identical to an image already saved in this run (same file under different URLs). Duplicates are not charged.",
            "default": true
          },
          "sameDomainImagesOnly": {
            "title": "Only images hosted on the page's domain",
            "type": "boolean",
            "description": "Ignore images served from other domains (ads, trackers, third-party widgets). Subdomains and CDNs on other domains are excluded too.",
            "default": false
          },
          "preferLargestSrcset": {
            "title": "Take the largest version from srcset / <picture>",
            "type": "boolean",
            "description": "Responsive images list several sizes; download the biggest one instead of the small default `src`.",
            "default": true
          },
          "includeMetaImages": {
            "title": "Include og:image / twitter:image",
            "type": "boolean",
            "description": "Also download the social preview image(s) declared in the page's meta tags.",
            "default": true
          },
          "includeLinkedImages": {
            "title": "Include linked images (<a href=\"...jpg\">)",
            "type": "boolean",
            "description": "Also download images that are linked (e.g. full-size versions behind thumbnails).",
            "default": true
          },
          "includeCssBackgrounds": {
            "title": "Include CSS background images",
            "type": "boolean",
            "description": "Also extract `background-image: url(...)` from inline styles and <style> blocks.",
            "default": false
          },
          "convertTo": {
            "title": "Convert to format",
            "enum": [
              "original",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Convert every raster image to one format (e.g. WebP/AVIF -> JPG for compatibility). SVGs are kept as-is. Transparent areas become white in JPG.",
            "default": "original"
          },
          "resizeMaxWidth": {
            "title": "Resize: max width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Downscale larger images to fit this width, keeping the aspect ratio. 0 = no resizing.",
            "default": 0
          },
          "resizeMaxHeight": {
            "title": "Resize: max height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Downscale larger images to fit this height, keeping the aspect ratio. 0 = no resizing.",
            "default": 0
          },
          "quality": {
            "title": "JPEG/WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Quality used when converting or resizing (1-100).",
            "default": 85
          },
          "filenameTemplate": {
            "title": "File name template",
            "type": "string",
            "description": "Placeholders: {index} (00001...), {name} (original file name), {sha1}, {sha1_8}, {host} (image host), {page_host}, {width}, {height}, {format}. The extension is added automatically; unsupported characters become `_`.",
            "default": "{index}_{name}"
          },
          "createZip": {
            "title": "Create a ZIP of all images",
            "type": "boolean",
            "description": "Bundle all saved images into `images.zip` in the key-value store (one download link). Charged once per run.",
            "default": false
          },
          "includeSkipped": {
            "title": "Show skipped images in the dataset",
            "type": "boolean",
            "description": "Also add rows for images that were filtered out (too small, wrong format) or duplicates. They are never charged. Failed downloads are always listed.",
            "default": false
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Skip pages that the site's robots.txt disallows for crawlers.",
            "default": true
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many downloads run in parallel.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 180,
            "type": "integer",
            "description": "Per-request timeout.",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for timeouts, connection errors, 429 and 5xx responses (with backoff).",
            "default": 2
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "Custom User-Agent header. Leave empty for the default, which identifies this Actor (required by some sites such as Wikimedia)."
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional. Not needed for most sites.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}