{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader: Page URLs, Image List or Dataset to ZIP",
    "description": "Download images from web pages (page URLs), an image URL list or another Apify dataset. Optional ZIP bundles, resize, convert to JPG/PNG/WebP, minimum size filter, dedupe. Respects robots.txt and rate limits.",
    "version": "0.1",
    "x-build-id": "IuTGLnP9ePZGW1jfW"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/appley_rhodolite~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-appley_rhodolite-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/appley_rhodolite~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-appley_rhodolite-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/appley_rhodolite~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-appley_rhodolite-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": {
          "pageUrls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Web pages to scrape for images, one per line. The Actor fetches each page with plain HTTP (no JavaScript rendering) and downloads the images it finds: <img src> and data-src, srcset (largest), <picture><source>, og:image / twitter:image and inline CSS background-image. Relative links are resolved, duplicates removed.",
            "items": {
              "type": "string"
            }
          },
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to image files (one per line). Can be combined with page URLs and the dataset fields.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Apify dataset ID (optional)",
            "type": "string",
            "description": "Take the image URLs from another Apify dataset, for example the output of a scraper you ran before. Needs 'URL field' too."
          },
          "urlField": {
            "title": "URL field in the dataset",
            "type": "string",
            "description": "Name of the field that holds the image URL or an array of URLs. Nested arrays and dotted paths (media.images) work; objects with a url / src key are accepted."
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Page URLs mode: keep at most this many images from each page (document order). 0 = no limit.",
            "default": 100
          },
          "sameDomainOnly": {
            "title": "Same site only",
            "type": "boolean",
            "description": "Page URLs mode: only download images hosted on the same site as the page (images.example.com counts as example.com).",
            "default": false
          },
          "minWidth": {
            "title": "Min width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images narrower than this. Checked after download, the skip reason is recorded (too_small_dimensions) and the image is free. 0 = off.",
            "default": 0
          },
          "minHeight": {
            "title": "Min height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this. Checked after download, the skip reason is recorded (too_small_dimensions) and the image is free. 0 = off.",
            "default": 0
          },
          "includeCssBackgrounds": {
            "title": "Include CSS background images",
            "type": "boolean",
            "description": "Page URLs mode: also pick up url(...) from inline style=\"background-image: ...\" attributes.",
            "default": true
          },
          "zipOutput": {
            "title": "Bundle into ZIP files",
            "type": "boolean",
            "description": "Store the images inside ZIP files (key images-001.zip, ...) instead of one record per image. A new ZIP starts at about the size below.",
            "default": false
          },
          "zipSplitMB": {
            "title": "ZIP split size (MB)",
            "minimum": 10,
            "maximum": 400,
            "type": "integer",
            "description": "Start a new ZIP file after about this many MB of images.",
            "default": 100
          },
          "convertTo": {
            "title": "Convert format",
            "enum": [
              "original",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Re-encode every image to this format. 'original' keeps the file bytes untouched.",
            "default": "original"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Shrink images wider than this, keeping aspect ratio. 0 = no limit. Never enlarges.",
            "default": 0
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Shrink images taller than this, keeping aspect ratio. 0 = no limit. Never enlarges.",
            "default": 0
          },
          "fileNamePattern": {
            "title": "File name pattern",
            "enum": [
              "index",
              "original",
              "hash"
            ],
            "type": "string",
            "description": "index = 00001.jpg (position in your list), original = name taken from the URL, hash = first 16 characters of the SHA-256.",
            "default": "index"
          },
          "skipDuplicates": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "Skip repeated URLs and images with identical content (SHA-256). Skipped duplicates are free.",
            "default": true
          },
          "minBytes": {
            "title": "Minimum file size (bytes)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip files smaller than this, e.g. 1x1 tracking pixels.",
            "default": 0
          },
          "maxFileSizeMB": {
            "title": "Max size per file (MB)",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Files larger than this are skipped (reason too_large).",
            "default": 20
          },
          "maxTotalSizeMB": {
            "title": "Max total size per run (MB)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "The run stops cleanly once this much data has been saved.",
            "default": 5000
          },
          "maxItems": {
            "title": "Max URLs to process",
            "minimum": 0,
            "type": "integer",
            "description": "Process only the first N URLs. 0 = all.",
            "default": 0
          },
          "timeoutSecs": {
            "title": "Timeout per request (seconds)",
            "minimum": 3,
            "maximum": 120,
            "type": "integer",
            "description": "Give up on a request that stalls for this long. Failed requests are retried up to 3 times.",
            "default": 30
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Parallel downloads (all hosts together). Keep it low to be polite.",
            "default": 5
          },
          "perHostRequestsPerSecond": {
            "title": "Max requests per second per host",
            "minimum": 0.1,
            "maximum": 20,
            "type": "number",
            "description": "Rate limit for each website. 429 and Retry-After responses are honored automatically.",
            "default": 2
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "Fetch robots.txt once per host and skip URLs it disallows for this bot. Turn off only for hosts you own or that explicitly allow automated downloads.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}