{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader & Converter — ZIP, WebP, Resize",
    "description": "Download images from image URLs or from web pages, convert to JPEG/PNG/WebP/AVIF, resize, skip duplicates and get one ZIP. Japanese/CJK file names stay readable. $2 per 1,000 images.",
    "version": "1.0",
    "x-build-id": "ebFHvK6LROGb7BK83"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/masahishop~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-masahishop-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/masahishop~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-masahishop-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/masahishop~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-masahishop-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 URLs or page URLs",
            "type": "array",
            "description": "Direct image URLs are downloaded as they are. For a web page URL, the images on that page are found and downloaded (only that page is read; links are not followed).",
            "items": {
              "type": "string"
            }
          },
          "maxImages": {
            "title": "Max images in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops after this many saved images (keeps the cost predictable).",
            "default": 1000
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "For page URLs: at most this many images are taken from one page.",
            "default": 200
          },
          "includeLinkedImages": {
            "title": "Include linked full-size images",
            "type": "boolean",
            "description": "Also take images that the page links to (e.g. a thumbnail that links to the large photo).",
            "default": true
          },
          "includeMetaImages": {
            "title": "Include og:image / twitter:image",
            "type": "boolean",
            "description": "The page's share image from its meta tags.",
            "default": true
          },
          "includeBackgrounds": {
            "title": "Include inline CSS background images",
            "type": "boolean",
            "description": "Images set with style=\"background-image: url(...)\".",
            "default": false
          },
          "includeIcons": {
            "title": "Include favicons",
            "type": "boolean",
            "description": "Favicon and apple-touch-icon.",
            "default": false
          },
          "minWidth": {
            "title": "Minimum width",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller images (icons, spacers, tracking pixels). Skipped images are not charged.",
            "default": 0
          },
          "minHeight": {
            "title": "Minimum height",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller images. Skipped images are not charged.",
            "default": 0
          },
          "minFileSizeKb": {
            "title": "Minimum file size",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller files. Skipped images are not charged.",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Maximum file size",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Larger files are not downloaded.",
            "default": 25
          },
          "dedupe": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "Identical files (same SHA-256) are saved once. Duplicates are not charged.",
            "default": true
          },
          "outputFormat": {
            "title": "Convert to",
            "enum": [
              "original",
              "jpeg",
              "png",
              "webp",
              "avif"
            ],
            "type": "string",
            "description": "Keep the original file, or convert every image to one format.",
            "default": "original"
          },
          "maxWidth": {
            "title": "Resize: max width",
            "minimum": 0,
            "type": "integer",
            "description": "Shrink larger images to fit (aspect ratio kept, never enlarged). 0 = no resizing.",
            "default": 0
          },
          "maxHeight": {
            "title": "Resize: max height",
            "minimum": 0,
            "type": "integer",
            "description": "0 = no resizing.",
            "default": 0
          },
          "quality": {
            "title": "Quality (JPEG / WebP / AVIF)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Used only when converting or resizing.",
            "default": 82
          },
          "createZip": {
            "title": "Create a ZIP archive",
            "type": "boolean",
            "description": "All saved images in one images.zip (original file names, including Japanese/Chinese/Korean names). Free.",
            "default": true
          },
          "zipMaxMb": {
            "title": "ZIP size limit",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Images beyond this size are still saved individually, just not added to the ZIP.",
            "default": 300
          },
          "respectRobotsTxt": {
            "title": "Respect robots.txt",
            "type": "boolean",
            "description": "URLs that the site disallows for automated access are skipped (not charged).",
            "default": true
          },
          "minDelayPerSiteMs": {
            "title": "Delay between requests to the same site",
            "minimum": 100,
            "maximum": 60000,
            "type": "integer",
            "description": "Spaces out requests to each host.",
            "default": 250
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 32,
            "type": "integer",
            "description": "Downloads at the same time (across different sites).",
            "default": 8
          },
          "timeoutSecs": {
            "title": "Timeout per request",
            "minimum": 5,
            "maximum": 300,
            "type": "integer",
            "description": "Maximum time for one download.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}