{
  "openapi": "3.0.1",
  "info": {
    "title": "Bulk Image Downloader API: Save Page Images with Sizes",
    "description": "Download the images of any web pages, or direct image links, into a key-value store with width, height, format, size and a download link per file. Tracking pixels are skipped, robots.txt obeyed, pay only for images saved.",
    "version": "1.0",
    "x-build-id": "SP5boGcqXBugZ5cSD"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/rowcraft~bulk-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-rowcraft-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/rowcraft~bulk-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-rowcraft-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/rowcraft~bulk-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-rowcraft-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": {
          "urls": {
            "title": "Page URLs",
            "type": "array",
            "description": "Web pages to collect the images of, one address per line (https://example.com/product/1). The images shown on each page are found in its HTML: img tags, srcset, picture, and the og:image preview. Duplicates and invalid entries are skipped and never charged.",
            "items": {
              "type": "string"
            }
          },
          "imageUrls": {
            "title": "Direct image URLs (optional)",
            "type": "array",
            "description": "Links that point straight at an image file (https://example.com/photo.jpg), one per line. They go through the same checks and filters as the images found on pages, and are listed with the source `direct`.",
            "items": {
              "type": "string"
            }
          },
          "minWidth": {
            "title": "Minimum width (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Images narrower than this are not saved and not charged: tracking pixels, spacers and icons. 0 = no limit.",
            "default": 100
          },
          "minHeight": {
            "title": "Minimum height (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Images lower than this are not saved and not charged. 0 = no limit.",
            "default": 100
          },
          "formats": {
            "title": "Formats",
            "type": "array",
            "description": "Save only these image formats. Empty = every format. The format is read from the file itself; when a picture lists several versions in different formats, the versions that announce another format are not downloaded.",
            "items": {
              "type": "string",
              "enum": [
                "jpeg",
                "png",
                "gif",
                "webp",
                "avif",
                "svg",
                "bmp",
                "ico",
                "tiff"
              ],
              "enumTitles": [
                "JPEG",
                "PNG",
                "GIF",
                "WebP",
                "AVIF",
                "SVG",
                "BMP",
                "ICO",
                "TIFF"
              ]
            }
          },
          "maxImagesPerPage": {
            "title": "Maximum images per page",
            "minimum": 1,
            "maximum": 2000,
            "type": "integer",
            "description": "Stop reading a page after this many images were saved from it. The rest are listed as not read in COVERAGE.",
            "default": 100
          },
          "maxItems": {
            "title": "Maximum images saved",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many images are saved in the whole run. 0 = no limit.",
            "default": 500
          },
          "allSizes": {
            "title": "Save every listed size of a picture",
            "type": "boolean",
            "description": "Off (default): one file per picture, its largest listed version (the biggest srcset width), so a product photo is not saved three times at three sizes. On: every size and every format a picture lists is downloaded.",
            "default": false
          },
          "includeLinkedImages": {
            "title": "Also take links to image files",
            "type": "boolean",
            "description": "Add images that a page only links to (<a href=\"photo.jpg\">), such as the full-size versions behind gallery thumbnails. Only addresses that end in an image file extension are taken.",
            "default": false
          },
          "includeBackgroundImages": {
            "title": "Also take inline CSS backgrounds",
            "type": "boolean",
            "description": "Add images set with background-image in the style attribute of a tag. Backgrounds defined in separate stylesheets are not read.",
            "default": false
          },
          "dedupe": {
            "title": "Skip duplicates",
            "type": "boolean",
            "description": "On (default): an image address already handled, and a file with the same content (SHA-1) as one already saved in this run, is skipped and not charged. Off: every occurrence is saved.",
            "default": true
          },
          "maxImageSizeMb": {
            "title": "Largest file (MB)",
            "minimum": 0.05,
            "maximum": 30,
            "type": "number",
            "description": "Files bigger than this are not saved and not charged; a file that announces its size is not even downloaded. Maximum 30.",
            "default": 15
          },
          "includeAltText": {
            "title": "Deliver the alt text",
            "type": "boolean",
            "description": "On (default): the alt attribute of the image is in the `alt` column, with e-mail addresses, phone numbers and contact names next to a cue removed. Off: the column stays empty. Turn it off if the pages show photos of people with their names in the alt text.",
            "default": true
          },
          "onlyNew": {
            "title": "Only new rows since the last run",
            "type": "boolean",
            "description": "Remember the rows already delivered to you (in a key-value store in your Apify account) and deliver only rows that appeared since the last run with the same state key. The first run delivers everything that matches; later runs cost only the new rows. Ideal for schedules.",
            "default": false
          },
          "stateName": {
            "title": "State name",
            "type": "string",
            "description": "Name of the memory used by \"Only new rows\". Use a different name for each schedule or search (for example `stockholm-python`) so they do not share one memory.",
            "default": "default"
          },
          "notifyUrl": {
            "title": "Notify this URL when the run ends",
            "type": "string",
            "description": "A webhook address that receives one JSON POST with the number of new rows and links to the dataset: a Slack or Discord incoming webhook, a Make, n8n or Zapier catch hook, or your own endpoint. The message is also in the `text` (Slack) and `content` (Discord) fields."
          },
          "notifyWhenEmpty": {
            "title": "Notify also when there are no new rows",
            "type": "boolean",
            "description": "By default the notification is sent only when at least one row was delivered.",
            "default": false
          },
          "requestIntervalMs": {
            "title": "Delay between requests (ms)",
            "minimum": 250,
            "maximum": 10000,
            "type": "integer",
            "description": "Pause between two requests to the same host (a page and its image server are separate hosts). Default 1000 ms; minimum 250. A longer Crawl-delay in a site's robots.txt is applied instead, up to 10 s.",
            "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
                  },
                  "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}