{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader & Converter: WebP, Resize, ZIP",
    "description": "Bulk image downloader from $0.90 per 1,000 images ($1.50 on the Free plan, less on paid plans), no fee by file size. Download and convert in one run: WebP, JPEG or PNG, max width and height, quality. From URLs, an Apify dataset, CSV, Excel or Google Sheet; files named by your column, plus a ZIP.",
    "version": "0.1",
    "x-build-id": "qxiriSVKN6LYbB3Z9"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tamatama~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tamatama-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/tamatama~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-tamatama-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/tamatama~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-tamatama-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": {
          "urls": {
            "title": "Image URLs",
            "type": "array",
            "description": "Direct links to image files, e.g. https://example.com/img/shoe-123.jpg (JPEG, PNG, WebP, GIF, BMP, TIFF, AVIF; SVG and HEIC only with Convert to = Original). You can also link a text file that lists image URLs. For a spreadsheet or a dataset of links, use the bulk fields below (and remove these example links). Web pages are not crawled: give the image links themselves.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "format": {
            "title": "Convert to",
            "enum": [
              "webp",
              "jpeg",
              "png",
              "original"
            ],
            "type": "string",
            "description": "WebP is the smallest for photos on the web. Original keeps the downloaded bytes unchanged (no resizing).",
            "default": "webp"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Shrink wider images to this width, keeping the aspect ratio. Smaller images are never enlarged. 0 = keep the size.",
            "default": 0
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Shrink taller images to this height, keeping the aspect ratio. 0 = no limit.",
            "default": 0
          },
          "quality": {
            "title": "Quality (WebP and JPEG)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. 80 is a good balance of size and quality for photos.",
            "default": 80
          },
          "zip": {
            "title": "ZIP file",
            "enum": [
              "single",
              "none"
            ],
            "type": "string",
            "description": "Also pack all images into one ZIP file (split into 250 MB parts for very large runs). The link is in the run's OUTPUT record and status message. Each image is saved on its own in any case.",
            "default": "single"
          },
          "datasetId": {
            "title": "Apify dataset with image links",
            "type": "string",
            "description": "Download the images linked in an Apify dataset, e.g. the output of a product scraper run. One image per item, up to 10,000 items; the item's own fields come back in sourceRow. In an integration that starts this Actor after another Actor's run, set it to {{resource.defaultDatasetId}}."
          },
          "fileUrl": {
            "title": "Spreadsheet URL (CSV, Excel, JSON or Google Sheet)",
            "type": "string",
            "description": "A public link to a CSV, Excel (.xlsx, first sheet), JSON or JSON Lines file with one image link per row, up to 50 MB and 10,000 rows, e.g. https://example.com/products.csv. A plain list of links without a header row works too. A Google Sheets link works when the sheet is shared as \"Anyone with the link\" (the first tab, or the tab in the link)."
          },
          "urlField": {
            "title": "URL column",
            "type": "string",
            "description": "The column (or dataset field) that holds the image link, e.g. imageUrl or images.0. Leave empty to use the column that most looks like image links."
          },
          "fileNameField": {
            "title": "File name column",
            "type": "string",
            "description": "Name each file after this column, e.g. sku or productId (letters, digits and -_.'() are kept; the extension is added). Leave empty to use the name in the link."
          },
          "maxFiles": {
            "title": "Max images",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Stop after this many images (duplicates are not counted).",
            "default": 1000
          },
          "maxFileMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger downloads are skipped and reported (not charged).",
            "default": 50
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}