{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Scraper — Real Dimension & File Size Filter",
    "description": "Crawl a website (or list of URLs) and collect every image, filtered by the REAL decoded pixel width/height and file size — not just the declared HTML attribute. Detects true format via magic bytes and dedupes by content hash. Optional full download to the key-value store.",
    "version": "0.1",
    "x-build-id": "lkrPYWeG5CdlcmZZR"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/codeclouds~bulk-image-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-codeclouds-bulk-image-scraper",
        "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/codeclouds~bulk-image-scraper/runs": {
      "post": {
        "operationId": "runs-sync-codeclouds-bulk-image-scraper",
        "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/codeclouds~bulk-image-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-codeclouds-bulk-image-scraper",
        "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": [
          "startUrls"
        ],
        "properties": {
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "One or more web pages to scan for images. Example: https://example.com/gallery",
            "default": [
              "https://example.com"
            ],
            "items": {
              "type": "string"
            }
          },
          "maxCrawlDepth": {
            "title": "Max crawl depth",
            "minimum": 0,
            "maximum": 5,
            "type": "integer",
            "description": "How many link-hops to follow from each start URL. 0 = only scan the start URL itself, no link-following. Example: 1",
            "default": 1
          },
          "sameHostOnly": {
            "title": "Same host only",
            "type": "boolean",
            "description": "Only follow links that stay on the same hostname as the start URL. Turn off to allow crawling across subdomains/hosts.",
            "default": true
          },
          "imageExtensions": {
            "title": "Image extensions to include",
            "type": "array",
            "description": "Only collect images whose URL ends with one of these extensions. Example: jpg, png, webp",
            "items": {
              "type": "string",
              "enum": [
                "jpg",
                "jpeg",
                "png",
                "gif",
                "webp",
                "svg",
                "avif",
                "bmp",
                "ico"
              ]
            },
            "default": [
              "jpg",
              "jpeg",
              "png",
              "gif",
              "webp",
              "svg",
              "avif",
              "bmp",
              "ico"
            ]
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images narrower than this, based on the REAL decoded pixel width (not the HTML width attribute). Leave empty for no minimum. Example: 400"
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images shorter than this, based on the REAL decoded pixel height. Leave empty for no minimum. Example: 300"
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images wider than this, based on the REAL decoded pixel width. Leave empty for no maximum. Example: 4000"
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images taller than this, based on the REAL decoded pixel height. Leave empty for no maximum. Example: 4000"
          },
          "minFileSizeKb": {
            "title": "Minimum file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images smaller than this file size in kilobytes. Leave empty for no minimum. Example: 10"
          },
          "maxFileSizeKb": {
            "title": "Maximum file size (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Skip images larger than this file size in kilobytes. Leave empty for no maximum. Example: 5000"
          },
          "includeBackgroundImages": {
            "title": "Include CSS background images",
            "type": "boolean",
            "description": "Also collect images referenced via a CSS \"background-image: url(...)\" inline style, not just <img>/<picture> tags.",
            "default": false
          },
          "includeSrcset": {
            "title": "Include srcset variants",
            "type": "boolean",
            "description": "Also collect every image URL listed in an <img>/<source> \"srcset\" attribute (responsive images), not just the main \"src\".",
            "default": true
          },
          "downloadFiles": {
            "title": "Download full image files",
            "type": "boolean",
            "description": "Download the complete image bytes into the run's key-value store (not only metadata). Increases run time/cost. When off, only metadata is collected and file size/dimensions are read from response headers where possible.",
            "default": false
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop collecting candidate images on a single page after this many are found (safety cap for very large galleries). Example: 200",
            "default": 200
          },
          "maxTotalImages": {
            "title": "Max total images",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Stop the whole run after this many images have been returned across all pages combined. Example: 1000",
            "default": 1000
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}