{
  "openapi": "3.0.1",
  "info": {
    "title": "Batch Image Downloader — URLs & Pages to KV",
    "description": "Download image URL lists or extract img/og:image from pages into KV store with metadata (contentType, bytes, sha256, dims). Default under 1 GB; failed/empty free. For RAG/archives — not spam scraping.",
    "version": "0.1",
    "x-build-id": "r0dUQBT1vaK1IVHxt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/ingenious_quip_bxq~batch-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-ingenious_quip_bxq-batch-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/ingenious_quip_bxq~batch-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-ingenious_quip_bxq-batch-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/ingenious_quip_bxq~batch-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-ingenious_quip_bxq-batch-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 image URLs to download. Accepts strings, {\"url\": \"...\"}, or requestListSources-style entries. Deduplicated, order preserved.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "pageUrls": {
            "title": "Page URLs (extract images)",
            "type": "array",
            "description": "HTML pages to fetch. Extracts img[src]/srcset], picture source, link[rel=image_src], meta og:image / twitter:image. Relative URLs resolved against the page.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after downloading this many unique image URLs (0 = no limit). Caps cost.",
            "default": 500
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 0,
            "maximum": 5000,
            "type": "integer",
            "description": "When extracting from pageUrls, keep at most this many image candidates per page (0 = no per-page cap).",
            "default": 100
          },
          "maxBytesPerImage": {
            "title": "Max bytes per image",
            "minimum": 1024,
            "maximum": 104857600,
            "type": "integer",
            "description": "Skip (free) downloads larger than this many bytes. Default 15 MB.",
            "default": 15728640
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 30,
            "type": "integer",
            "description": "Parallel downloads. Keep moderate to stay polite and within 512 MB.",
            "default": 6
          },
          "requestTimeoutSecs": {
            "title": "Request timeout (seconds)",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout per HTTP request (page fetch or image download).",
            "default": 30
          },
          "maxRetries": {
            "title": "Max retries",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "Retries for transient network / 5xx failures.",
            "default": 2
          },
          "minDelayMsPerHost": {
            "title": "Min delay per host (ms)",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Minimum milliseconds between starting downloads to the same host. 0 = no extra delay.",
            "default": 50
          },
          "userAgent": {
            "title": "User-Agent",
            "type": "string",
            "description": "HTTP User-Agent for page and image requests.",
            "default": "Mozilla/5.0 (compatible; BatchImageDownloader/0.1; +https://apify.com)"
          },
          "convertFormat": {
            "title": "Convert format (optional)",
            "enum": [
              "",
              "webp",
              "jpeg",
              "png"
            ],
            "type": "string",
            "description": "If set, re-encode successful downloads with Pillow and store the converted bytes (extra image-converted charge). Leave empty to store originals only.",
            "default": ""
          },
          "convertQuality": {
            "title": "Convert quality",
            "minimum": 1,
            "maximum": 95,
            "type": "integer",
            "description": "Quality 1–95 for WebP/JPEG conversion (ignored for PNG).",
            "default": 85
          },
          "skipDuplicatesByHash": {
            "title": "Skip duplicate content (sha256)",
            "type": "boolean",
            "description": "If on, identical bytes after the first success are recorded as status=duplicate (free) and not re-stored.",
            "default": true
          },
          "kvKeyPrefix": {
            "title": "KV key prefix",
            "type": "string",
            "description": "Prefix for stored file keys, e.g. img- → img-<sha256>.<ext>. Only a-zA-Z0-9!-_.'() allowed (no slashes).",
            "default": "img-"
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional Apify Proxy. Off by default — use only when targets require it."
          },
          "chargeFailedImages": {
            "title": "Charge failed images",
            "type": "boolean",
            "description": "When off (default), only successful KV stores are charged. Failed/4xx/empty/non-image/duplicate rows are saved free. When on, every attempted image URL is charged once.",
            "default": 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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}