{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader [USD 0.50/1K images]",
    "description": "Download images in bulk from image links or whole web pages (img, srcset, picture, lazy-load, og:image, JSON-LD, CSS backgrounds). Real format, pixel size and SHA-256 read from the bytes, icons and duplicates skipped, every file saved with a ready ZIP link.",
    "version": "1.0",
    "x-build-id": "PjdL9WEzbDe2NN9ju"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/usefulapi~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-usefulapi-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/usefulapi~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-usefulapi-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/usefulapi~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-usefulapi-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",
        "required": [
          "urls"
        ],
        "properties": {
          "urls": {
            "title": "Image links or page links",
            "type": "array",
            "description": "One link per line. A link to an image file is downloaded as it is. A link to a web page is read (robots.txt respected) and every image on it is found: img, srcset (largest size), picture, lazy-load attributes, og:image, twitter:image, JSON-LD, CSS backgrounds and, when asked, links to image files. Up to 20,000 links per run.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "How to treat the links",
            "enum": [
              "auto",
              "images",
              "pages"
            ],
            "type": "string",
            "description": "Auto is right for a mixed list. Choose images when your image links have no extension (no robots.txt is read for them); choose pages when your page links end in .jpg or .png.",
            "default": "auto"
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Images narrower than this are skipped (icons, tracking pixels, spacers). The size is read from the image's own bytes; the download stops as soon as the size is known. 0 keeps everything. SVG files without a stated size are kept.",
            "default": 50
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Images lower than this are skipped. 0 keeps everything.",
            "default": 50
          },
          "formats": {
            "title": "Formats to keep",
            "type": "array",
            "description": "Formats are read from the bytes, not from the link or the server's Content-Type. Leave empty for all except HEIC.",
            "items": {
              "type": "string",
              "enum": [
                "jpeg",
                "png",
                "webp",
                "gif",
                "avif",
                "svg",
                "bmp",
                "tiff",
                "ico",
                "heic"
              ],
              "enumTitles": [
                "JPEG",
                "PNG",
                "WebP",
                "GIF",
                "AVIF",
                "SVG",
                "BMP",
                "TIFF",
                "ICO",
                "HEIC"
              ]
            },
            "default": [
              "jpeg",
              "png",
              "webp",
              "gif",
              "avif",
              "svg",
              "bmp",
              "tiff",
              "ico"
            ]
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Stop taking images from one page after this many are saved. Up to 3 times this number (at most 500) of the page's images are checked.",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max image size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Larger images are skipped: checked from the Content-Length header before the download, and cut while downloading when the server does not say.",
            "default": 20
          },
          "storeFiles": {
            "title": "Save the image files",
            "type": "boolean",
            "description": "Off: metadata only (format, pixel size, bytes, SHA-256), nothing saved. Images are still downloaded to be measured.",
            "default": true
          },
          "dedupe": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "An image with the same bytes (SHA-256) as one already saved in this run is not saved again; its row points to the first copy.",
            "default": true
          },
          "allSrcsetSizes": {
            "title": "Every size in srcset",
            "type": "boolean",
            "description": "Off: one image per img or picture element, the largest candidate. On: every size listed in srcset and every picture source.",
            "default": false
          },
          "linkedImages": {
            "title": "Images linked from the page",
            "type": "boolean",
            "description": "Also take links that point to image files (<a href=\"photo.jpg\">), often the full-size version of a thumbnail. Off by default: on Wikipedia and many CMSs those links lead to HTML pages about the file, not to the file.",
            "default": false
          },
          "maxImages": {
            "title": "Max images per run",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many images are saved (leave empty for no limit)."
          },
          "retries": {
            "title": "Retries",
            "minimum": 0,
            "maximum": 3,
            "type": "integer",
            "description": "Extra tries for an image that got no answer, a server error, a 429, or came too slowly (waits 2 s, then 6 s, then 12 s). Not after the 120 s per-image time cap. Every retry's bytes count toward the megabyte event.",
            "default": 1
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Downloads at the same time across all sites. At most 2 at a time go to one host, with a short pause between them, whatever this number.",
            "default": 10
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}