{
  "openapi": "3.0.1",
  "info": {
    "title": "Website Image Extractor and Downloader",
    "description": "List every image on public web pages (img, srcset, Open Graph) with size and alt text, filter by size or format, and optionally download them with a ZIP. robots.txt respected for pages and images, no proxies. Blocked and failed pages are free.",
    "version": "0.2",
    "x-build-id": "HdQdH8mMGDhgP3uND"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/greenrun~website-image-downloader/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-greenrun-website-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/greenrun~website-image-downloader/runs": {
      "post": {
        "operationId": "runs-sync-greenrun-website-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/greenrun~website-image-downloader/run-sync": {
      "post": {
        "operationId": "run-sync-greenrun-website-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": "Web pages",
            "type": "array",
            "description": "Public web pages (http or https), one per line. Every image on each page becomes one row with its alt text, size and source.",
            "items": {
              "type": "string"
            }
          },
          "downloadImages": {
            "title": "Download the images",
            "type": "boolean",
            "description": "Also download every listed image into the run's key-value store, with the real size, format and SHA-256. Each stored image is at least one 'image' event (large images more, see Pricing); failed, filtered, too small and duplicate images are free. Off: only the list (one 'page' event per page).",
            "default": false
          },
          "zip": {
            "title": "Also create one ZIP",
            "type": "boolean",
            "description": "With downloading on: pack every stored image into images.zip with manifest.csv. The ZIP holds a second copy of every image, so its MB count twice (see Pricing).",
            "default": false
          },
          "minWidth": {
            "title": "Min width (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Skip images narrower than this. When listing, the width comes from the HTML (width attribute, srcset); images without a known width are kept. When downloading, the real width of the file decides.",
            "default": 0
          },
          "minHeight": {
            "title": "Min height (px)",
            "minimum": 0,
            "maximum": 100000,
            "type": "integer",
            "description": "Skip images lower than this, the same way as the width.",
            "default": 0
          },
          "formats": {
            "title": "Only these formats",
            "type": "array",
            "description": "Keep only these formats: jpeg, png, webp, gif, svg, avif, ico ... Empty: all images. When downloading, the format is checked from the file's bytes.",
            "items": {
              "type": "string"
            }
          },
          "maxImagesPerPage": {
            "title": "Max images per page",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Stop listing a page after this many images.",
            "default": 500
          },
          "includeMetaImages": {
            "title": "Open Graph and Twitter images",
            "type": "boolean",
            "description": "List og:image and twitter:image from the page head (the share preview images).",
            "default": true
          },
          "includeLinkedImages": {
            "title": "Links to image files",
            "type": "boolean",
            "description": "List links that point to image files, such as full-size photos behind gallery thumbnails.",
            "default": true
          },
          "includeCssBackgrounds": {
            "title": "Inline CSS backgrounds",
            "type": "boolean",
            "description": "List images from style=\"background-image: url(...)\" attributes. Images in separate CSS files are not read.",
            "default": true
          },
          "includeIcons": {
            "title": "Icons",
            "type": "boolean",
            "description": "List favicons and touch icons from link rel=icon tags.",
            "default": false
          },
          "includeInlineImages": {
            "title": "Inline data: images",
            "type": "boolean",
            "description": "List images embedded as data: URIs (shortened in the output, never downloaded).",
            "default": false
          },
          "largestFromSrcset": {
            "title": "Largest version from srcset",
            "type": "boolean",
            "description": "For responsive images, use the largest candidate of srcset and picture sources instead of the src fallback.",
            "default": true
          },
          "maxImageSizeMb": {
            "title": "Max image size (MB)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "When downloading, larger images are skipped for free. Each MB stored counts in the image's events (see Pricing).",
            "default": 20
          },
          "maxConcurrency": {
            "title": "Parallel pages",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "How many pages are read at the same time. Requests to one site are still spaced by its robots.txt Crawl-delay.",
            "default": 5
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}