{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader - URLs, Pages, Datasets to Files",
    "description": "Bulk image downloader: image URLs, web pages or an Apify dataset in; image files saved to a key-value store out, with public file URL, width, height, format, bytes and SHA-256. Resize, JPEG / PNG / WebP / AVIF, size filters, dedupe. $0.50 per 1,000 images.",
    "version": "1.0",
    "x-build-id": "7fD1bgczj4Ms29cin"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rel8ble~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rel8ble-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/rel8ble~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-rel8ble-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/rel8ble~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-rel8ble-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": {
          "imageUrls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to image files, one per line (up to 100,000). Duplicates are removed. Google Drive and Dropbox share links are turned into direct downloads. A link that returns a web page is reported as not_image and not charged.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web pages to take images from",
            "type": "array",
            "description": "Web page URLs. Every image on the page is downloaded: <img> src / lazy-load attributes / largest srcset candidate, <picture> sources, og:image and twitter:image, JSON-LD image / logo, links to image files and inline background images. The page URL is sent as Referer (gets past most hotlink protection). Pages are fetched over plain HTTP: images added later by JavaScript are not seen.",
            "items": {
              "type": "string"
            }
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Cap per web page (in page order: meta images first, then <img> tags).",
            "default": 100
          },
          "includeIcons": {
            "title": "Include favicons / touch icons",
            "type": "boolean",
            "description": "Also download <link rel=\"icon\"> and apple-touch-icon images from pages.",
            "default": false
          },
          "datasetId": {
            "title": "Apify dataset ID (images from another scraper)",
            "type": "string",
            "description": "ID or name of an Apify dataset, e.g. the output of a product, real-estate or social scraper. Image URLs are read from the fields below, or auto-detected (any URL that looks like an image or sits in a field named image / photo / thumbnail / logo / cover)."
          },
          "datasetFields": {
            "title": "Dataset fields with image URLs",
            "type": "array",
            "description": "Paths to the image fields, JavaScript style: \"image\", \"images\", \"details[0].images\", \"media.*.url\". A field may hold a string, an array of strings or objects with url / src. Empty = auto-detect.",
            "items": {
              "type": "string"
            }
          },
          "datasetLimit": {
            "title": "Max dataset items",
            "minimum": 0,
            "type": "integer",
            "description": "Read at most this many items from the dataset. 0 = all.",
            "default": 0
          },
          "outputFormat": {
            "title": "Save as",
            "enum": [
              "original",
              "jpeg",
              "png",
              "webp",
              "avif"
            ],
            "type": "string",
            "description": "original keeps the downloaded bytes unchanged (fastest). The others convert every image (EXIF orientation applied, metadata stripped; transparency becomes white for JPEG; animated GIF / WebP stay animated when saved as WebP).",
            "default": "original"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 16384,
            "type": "integer",
            "description": "Shrink images wider than this, keeping the aspect ratio (never enlarges). 0 = no limit.",
            "default": 0
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 0,
            "maximum": 16384,
            "type": "integer",
            "description": "Shrink images taller than this, keeping the aspect ratio. 0 = no limit.",
            "default": 0
          },
          "quality": {
            "title": "Quality (JPEG / WebP / AVIF)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Encoder quality when converting or resizing.",
            "default": 82
          },
          "minWidth": {
            "title": "Min width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images narrower than this (icons, tracking pixels, thumbnails). Skipped images are free.",
            "default": 0
          },
          "minHeight": {
            "title": "Min height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this. Free.",
            "default": 0
          },
          "minFileSizeKb": {
            "title": "Min file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip files smaller than this. Free.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Files above this are not downloaded (status too_large, free).",
            "default": 25
          },
          "allowedTypes": {
            "title": "Only these types",
            "type": "array",
            "description": "Keep only these source types, e.g. jpeg, png, webp. Detected from the file bytes, not the URL. Empty = all (jpeg, png, gif, webp, avif, heif, bmp, tiff, ico, svg).",
            "items": {
              "type": "string"
            }
          },
          "dedupeByContent": {
            "title": "Remove duplicate images",
            "type": "boolean",
            "description": "Identical files (same SHA-256) found under different URLs are stored and charged once; the extra URLs are skipped free.",
            "default": true
          },
          "fileNaming": {
            "title": "File names",
            "enum": [
              "hash",
              "original",
              "content",
              "index"
            ],
            "type": "string",
            "description": "How the key-value store keys are built. The extension follows the saved format.",
            "default": "hash"
          },
          "keyPrefix": {
            "title": "Key prefix",
            "type": "string",
            "description": "Optional prefix for every file key, e.g. \"catalog-2026\"."
          },
          "keyValueStoreName": {
            "title": "Key-value store name",
            "type": "string",
            "description": "Save into this named key-value store (kept until you delete it, shared across runs) instead of the run's default store (deleted after the data retention period). With a named store, URLs downloaded in earlier runs are skipped free, so scheduled runs fetch only new images."
          },
          "skipAlreadyDownloaded": {
            "title": "Skip URLs already in the named store",
            "type": "boolean",
            "description": "Only with a key-value store name: keeps a DOWNLOADED_URLS record and skips URLs saved before (free).",
            "default": true
          },
          "includeFailedRows": {
            "title": "List failed URLs",
            "type": "boolean",
            "description": "Add a free row for every URL that failed (HTTP error, not an image, too large).",
            "default": true
          },
          "includeSkippedRows": {
            "title": "List skipped images",
            "type": "boolean",
            "description": "Add a free row for images skipped as duplicates, too small, wrong type or already downloaded.",
            "default": false
          },
          "maxResults": {
            "title": "Max images saved (charged)",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many saved images. 0 = no limit.",
            "default": 0
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "Lower it for a single small site; raise it for many hosts.",
            "default": 10
          },
          "maxRequestRetries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 8,
            "type": "integer",
            "description": "Retries on timeouts, 429 and 5xx.",
            "default": 2
          },
          "requestTimeoutSecs": {
            "title": "Timeout per request (s)",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Per download.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Off by default (image CDNs rarely block). Turn on the Apify proxy for sites that answer 403 / 429.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}