{
  "openapi": "3.0.1",
  "info": {
    "title": "Download Images from URLs: Bulk Image & File Downloader",
    "description": "Download images from URLs in bulk: an image downloader API for lists of direct image or file links and for images found on web pages. Dedupe by content hash, convert to JPG, PNG or WebP, resize, filter by size and get public links plus one ZIP.",
    "version": "0.1",
    "x-build-id": "3c2zesyj9x8s3Aztv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/data-done-right~image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-data-done-right-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/data-done-right~image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-data-done-right-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/data-done-right~image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-data-done-right-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 or file URLs",
            "type": "array",
            "description": "Direct links to the images (or files) to download, one per line. Example: https://example.com/photo.jpg. Use only files you have the right to download and reuse.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Or web pages to extract images from",
            "type": "array",
            "description": "Web pages whose images you want: the Actor reads <img src/srcset>, og:image and image_src links and downloads those images. Example: https://example.com/gallery. The page's robots.txt is respected; login-walled social sites are not supported.",
            "items": {
              "type": "string"
            }
          },
          "maxFiles": {
            "title": "Max files",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Most URLs processed in this run (listed and extracted from pages together). URLs beyond this are not fetched and not charged.",
            "default": 100
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 0.1,
            "maximum": 100,
            "type": "number",
            "description": "Files larger than this are skipped, checked from the headers and again while downloading. 1 MB = 1,000,000 bytes.",
            "default": 25
          },
          "minWidth": {
            "title": "Min width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images narrower than this. 0 = no filter. Example: 200 drops icons and tracking pixels.",
            "default": 0
          },
          "minHeight": {
            "title": "Min height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this. 0 = no filter.",
            "default": 0
          },
          "allowedTypes": {
            "title": "Image types to keep",
            "type": "array",
            "description": "The type is detected from the file's bytes, not its name. Other types are skipped. Ignored when 'Any file type' is on.",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "png",
                "webp",
                "gif",
                "avif",
                "svg",
                "bmp",
                "tiff"
              ],
              "enumTitles": [
                "JPG",
                "PNG",
                "WebP",
                "GIF",
                "AVIF",
                "SVG",
                "BMP",
                "TIFF"
              ]
            },
            "default": [
              "jpg",
              "png",
              "webp",
              "gif",
              "avif",
              "svg",
              "bmp",
              "tiff"
            ]
          },
          "anyFile": {
            "title": "Any file type (not only images)",
            "type": "boolean",
            "description": "Also download PDFs, ZIPs, CSVs and other files. Web pages (HTML) are never saved: use pageUrls to extract images from a page.",
            "default": false
          },
          "convertTo": {
            "title": "Convert images to",
            "enum": [
              "original",
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Keep the original files, or convert JPG, PNG, WebP, GIF, AVIF, BMP and TIFF images with Pillow. Transparency is flattened onto white for JPG. SVG files are kept as they are. Animations keep only the first frame.",
            "default": "original"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 20000,
            "type": "integer",
            "description": "Shrink images wider than this, keeping the aspect ratio (never upscales). 0 = original size. Images that are resized are re-encoded.",
            "default": 0
          },
          "quality": {
            "title": "JPG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100, used when images are converted or resized to JPG or WebP.",
            "default": 85
          },
          "dedupe": {
            "title": "Skip duplicate files",
            "type": "boolean",
            "description": "Files with identical content (SHA-256) are delivered once; later copies get status duplicate and are not charged.",
            "default": true
          },
          "zip": {
            "title": "Also make one ZIP",
            "type": "boolean",
            "description": "Also save all delivered files in one images.zip in the key-value store, with a public link in the SUMMARY record. The ZIP itself is free.",
            "default": false
          },
          "zipMaxMb": {
            "title": "Max ZIP size (MB)",
            "minimum": 1,
            "maximum": 300,
            "type": "number",
            "description": "Files that would push the ZIP over this size are still saved and listed, but left out of the ZIP.",
            "default": 100
          },
          "outputStoreName": {
            "title": "Save files in a named store",
            "type": "string",
            "description": "Optional key-value store name. Named stores are kept until you delete them, while a run's own store expires after your plan's retention period."
          },
          "concurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "How many files are downloaded at the same time.",
            "default": 5
          },
          "perHostDelayMs": {
            "title": "Delay per host (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum time between two requests to the same website, so a big list does not hammer one server. At most 3 run at once per host.",
            "default": 250
          },
          "timeoutSecs": {
            "title": "Timeout per file (seconds)",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "Time allowed for each download attempt, counted from when it gets its turn at its host (see the per-host delay). Failed requests are retried up to 3 times with backoff.",
            "default": 60
          },
          "maxPages": {
            "title": "Max pages",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many pageUrls pages are read. Further pages get a skipped row.",
            "default": 20
          },
          "allSrcsetSizes": {
            "title": "All srcset sizes",
            "type": "boolean",
            "description": "By default only the largest image of each srcset is taken. Turn on to download every size listed.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy",
            "type": "object",
            "description": "Optional. Send downloads through Apify Proxy or your own proxies. Usually not needed. Each retry uses a new session (new IP).",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}