{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Resizer & Converter: Bulk WebP/AVIF Compressor",
    "description": "Resize, compress and convert images in bulk to WebP, AVIF, JPEG or PNG. Several sizes per image (srcset, thumbnails), max file size in KB, EXIF/GPS removal, duplicate finder and ZIP. Takes image links, web pages or another Actor's dataset. $1 per 1,000 images, no start fee.",
    "version": "0.1",
    "x-build-id": "7YFG04oJLyN6CcG9N"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/open-data-tools~image-resizer-webp-converter/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-open-data-tools-image-resizer-webp-converter",
        "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/open-data-tools~image-resizer-webp-converter/runs": {
      "post": {
        "operationId": "runs-sync-open-data-tools-image-resizer-webp-converter",
        "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/open-data-tools~image-resizer-webp-converter/run-sync": {
      "post": {
        "operationId": "run-sync-open-data-tools-image-resizer-webp-converter",
        "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": "One image link per line (JPEG, PNG, WebP, AVIF, GIF, TIFF or SVG, up to 40 MB each). Duplicates are removed.",
            "items": {
              "type": "string"
            }
          },
          "pageUrls": {
            "title": "Web pages to take images from",
            "type": "array",
            "description": "Optional. Every image on these pages is processed: img src, srcset (largest), lazy-load data-src, picture sources and og:image. Alt text is kept in the results.",
            "items": {
              "type": "string"
            }
          },
          "sameSiteImagesOnly": {
            "title": "Only images hosted on the same site as the page",
            "type": "boolean",
            "description": "Skips images served from other domains (ads, trackers, third-party CDNs) when reading web pages.",
            "default": false
          },
          "datasetId": {
            "title": "Dataset ID with image URLs",
            "type": "string",
            "description": "Optional. Pipe in the results of another Actor (for example a product or Instagram scraper). Give the dataset ID and the field that holds the image link."
          },
          "datasetUrlField": {
            "title": "Field with the image URL",
            "type": "string",
            "description": "Field name in each dataset item. Dots reach nested fields (images.0.url). A field holding a list of links processes every link.",
            "default": "imageUrl"
          },
          "format": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "original"
            ],
            "type": "string",
            "description": "WebP is supported by every current browser and is usually 25-35% smaller than JPEG at the same quality.",
            "default": "webp"
          },
          "sizes": {
            "title": "Sizes",
            "type": "array",
            "description": "One per line. 1280 = 1280 px wide, x600 = 600 px tall, 800x800 = fit to that box (see Fit). Several lines make several files per image, for responsive srcset or thumbnails. Leave empty to keep the original size.",
            "items": {
              "type": "string"
            }
          },
          "fit": {
            "title": "Fit (when both width and height are set)",
            "enum": [
              "inside",
              "cover",
              "contain",
              "fill"
            ],
            "type": "string",
            "description": "How an image is fitted into a WIDTHxHEIGHT box. Cover is what most stores use for square product thumbnails.",
            "default": "inside"
          },
          "quality": {
            "title": "Quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For WebP, AVIF and JPEG. 75-85 looks the same as the original for most photos. For PNG, below 100 turns on palette compression (like TinyPNG).",
            "default": 80
          },
          "targetSizeKb": {
            "title": "Maximum file size (KB)",
            "minimum": 1,
            "type": "integer",
            "description": "Optional. Lowers quality step by step until each file fits (WebP, AVIF and JPEG). Files that cannot fit even at quality 10 are flagged with targetMissed."
          },
          "allowEnlarge": {
            "title": "Allow enlarging small images",
            "type": "boolean",
            "description": "Off: an image smaller than the requested size keeps its size. On: it is scaled up.",
            "default": false
          },
          "keepMetadata": {
            "title": "Keep EXIF metadata",
            "type": "boolean",
            "description": "Off (recommended): EXIF, GPS location and camera data are removed. Images are always rotated upright and the colour profile is always kept.",
            "default": false
          },
          "background": {
            "title": "Background colour",
            "type": "string",
            "description": "Used to fill transparency when converting to JPEG and for padding with Fit = Contain. Any CSS colour, e.g. #ffffff or transparent.",
            "default": "#ffffff"
          },
          "zip": {
            "title": "Also save all files as one ZIP",
            "type": "boolean",
            "description": "Adds images.zip (up to 300 MB) to the key-value store and its link to the run summary.",
            "default": false
          },
          "findDuplicates": {
            "title": "Flag duplicate images",
            "type": "boolean",
            "description": "Compares a perceptual hash of every image and fills duplicateOf with the first look-alike, even across different sizes or formats.",
            "default": true
          },
          "duplicateThreshold": {
            "title": "Duplicate sensitivity (0-20)",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum number of differing hash bits. 0 = identical only, 5 = same picture re-saved or resized, 10+ = also similar shots.",
            "default": 5
          },
          "minSourceKb": {
            "title": "Skip source images smaller than (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Useful with web pages, to skip icons and tracking pixels. Skipped images are not charged.",
            "default": 0
          },
          "maxImages": {
            "title": "Maximum number of source images",
            "minimum": 1,
            "type": "integer",
            "description": "Optional cap on how many source images are processed in this run."
          },
          "maxConcurrency": {
            "title": "Parallel downloads",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Images processed at the same time. Raise the run memory with it for large photos.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}