{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader & Google Images Scraper",
    "description": "Download images in bulk: search Google Images with every filter (size, color, license, date), or paste image URLs, or take the image fields of any dataset. Full-size files in a ZIP with metadata, no duplicates, resize and convert for AI datasets. Scheduled runs fetch only new images.",
    "version": "0.1",
    "x-build-id": "jZdz0MhacPiFPUmyQ"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/s_actors~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-s_actors-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/s_actors~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-s_actors-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/s_actors~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-s_actors-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": {
          "queries": {
            "title": "🔎 Google Images searches",
            "type": "array",
            "description": "What to search on Google Images, one per line (e.g. \"red fox\", \"modern kitchen interior\"). Each search gives up to ~250 images (Google's own limit); use more specific searches for more.",
            "items": {
              "type": "string"
            }
          },
          "maxImagesPerQuery": {
            "title": "🔢 Images per search",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "How many images to take from each search, in Google's order.",
            "default": 100
          },
          "imageUrls": {
            "title": "🔗 Image URLs",
            "type": "array",
            "description": "Direct links to image files to download in bulk, one per line.",
            "items": {
              "type": "string"
            }
          },
          "datasetIds": {
            "title": "🗂️ Datasets with image links",
            "type": "array",
            "description": "Datasets from runs of other Actors (Amazon, Shopify, Instagram, real estate...). Image links are found automatically in fields like image, images, thumbnail or photo."
          },
          "imageFields": {
            "title": "🏷️ Image fields in the dataset",
            "type": "array",
            "description": "Optional: exact fields that hold image links, dotted for nested ones (e.g. \"images\", \"product.mainImage\", \"photos.url\"). Empty = detect automatically.",
            "items": {
              "type": "string"
            }
          },
          "imageSize": {
            "title": "📏 Size",
            "enum": [
              "any",
              "large",
              "medium",
              "icon",
              "2mp",
              "4mp",
              "6mp",
              "8mp",
              "10mp",
              "12mp",
              "15mp",
              "20mp",
              "40mp",
              "70mp"
            ],
            "type": "string",
            "description": "Google Images size filter. \"Larger than N MP\" keeps only big originals (4 MP ≈ 2400×1600).",
            "default": "any"
          },
          "color": {
            "title": "🎨 Color",
            "enum": [
              "any",
              "color",
              "grayscale",
              "transparent",
              "red",
              "orange",
              "yellow",
              "green",
              "teal",
              "blue",
              "purple",
              "pink",
              "white",
              "gray",
              "black",
              "brown"
            ],
            "type": "string",
            "description": "Google Images color filter; \"Transparent background\" finds PNG cut-outs.",
            "default": "any"
          },
          "imageType": {
            "title": "🖼️ Type",
            "enum": [
              "any",
              "photo",
              "face",
              "clipart",
              "lineart",
              "animated"
            ],
            "type": "string",
            "description": "Google Images type filter.",
            "default": "any"
          },
          "license": {
            "title": "⚖️ Usage rights",
            "enum": [
              "any",
              "creative_commons",
              "commercial"
            ],
            "type": "string",
            "description": "Google's usage rights filter. Always check the license on the source page before reuse.",
            "default": "any"
          },
          "time": {
            "title": "📅 Time",
            "enum": [
              "any",
              "day",
              "week",
              "month",
              "year"
            ],
            "type": "string",
            "description": "When the image was found.",
            "default": "any"
          },
          "aspectRatio": {
            "title": "📐 Aspect ratio",
            "enum": [
              "any",
              "tall",
              "square",
              "wide",
              "panoramic"
            ],
            "type": "string",
            "description": "Shape of the image.",
            "default": "any"
          },
          "fileType": {
            "title": "📄 File type",
            "enum": [
              "any",
              "jpg",
              "png",
              "gif",
              "webp",
              "svg",
              "bmp",
              "ico"
            ],
            "type": "string",
            "description": "Search only this file type (Google's filetype: operator).",
            "default": "any"
          },
          "site": {
            "title": "🌐 Only from this site",
            "type": "string",
            "description": "Search images from one website only, e.g. \"wikimedia.org\" or \"unsplash.com\"."
          },
          "country": {
            "title": "🌍 Country",
            "type": "string",
            "description": "Two-letter country code of the Google results, e.g. us, gb, de, fr, jp.",
            "default": "us"
          },
          "language": {
            "title": "🗣️ Language",
            "type": "string",
            "description": "Two-letter language code, e.g. en, de, es, ja.",
            "default": "en"
          },
          "safeSearch": {
            "title": "🛡️ SafeSearch",
            "type": "boolean",
            "description": "Hide explicit results.",
            "default": false
          },
          "downloadImages": {
            "title": "⬇️ Download image files",
            "type": "boolean",
            "description": "On: download every image and save the files. Off: only the table of image links (cheaper, Google Images searches only).",
            "default": true
          },
          "minWidth": {
            "title": "↔️ Minimum width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip smaller images. For Google searches this is checked before downloading, so small images cost nothing."
          },
          "minHeight": {
            "title": "↕️ Minimum height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images lower than this."
          },
          "convertTo": {
            "title": "🔄 Convert to",
            "enum": [
              "original",
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Many sites serve WebP or AVIF; convert everything to one format for your tools or training pipeline.",
            "default": "original"
          },
          "maxDimension": {
            "title": "🗜️ Resize: longest side (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Shrink larger images so the longest side is at most this (e.g. 512 or 1024 for AI datasets). Empty = keep the original size."
          },
          "removeDuplicates": {
            "title": "🧬 Remove duplicates",
            "type": "boolean",
            "description": "Skip images that are the same picture as one already downloaded, even resized or recompressed (perceptual hash). Free.",
            "default": true
          },
          "thumbnailFallback": {
            "title": "🖼️ Thumbnail if the original is blocked",
            "type": "boolean",
            "description": "Some sites (Instagram, Facebook) block downloads: save Google's thumbnail instead. Marked in the \"downloadedFrom\" field.",
            "default": true
          },
          "createZip": {
            "title": "🗜️ ZIP archive",
            "type": "boolean",
            "description": "Pack the files into images.zip (in parts of ~200 MB) with a metadata.csv inside.",
            "default": true
          },
          "saveFiles": {
            "title": "💾 Save each file",
            "type": "boolean",
            "description": "Save every image to the key-value store with a direct link in the table (\"fileUrl\"), handy for pipelines and integrations.",
            "default": true
          },
          "maxImages": {
            "title": "🧮 Max images in total",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many images for the whole run. Empty = no limit."
          },
          "maxFileSizeMB": {
            "title": "📦 Max file size (MB)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Skip files larger than this.",
            "default": 25
          },
          "onlyNew": {
            "title": "🔔 Only new images",
            "type": "boolean",
            "description": "For scheduled runs. The first run downloads and remembers the images; later runs return only images that are new to these searches, URLs or datasets (and not duplicates of earlier ones). You pay only for the new ones.",
            "default": false
          },
          "monitorName": {
            "title": "🏷️ Monitor name",
            "type": "string",
            "description": "Separate monitors keep separate memory. Use a different name for each scheduled task.",
            "default": "default"
          },
          "maxConcurrency": {
            "title": "⚡ Parallel downloads",
            "minimum": 1,
            "maximum": 50,
            "type": "integer",
            "description": "How many files download at the same time.",
            "default": 16
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}