{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Converter, Compressor & Resizer — WebP, AVIF, HEIC",
    "description": "Bulk image converter and compressor: JPG, PNG, WebP, AVIF, GIF, SVG and iPhone HEIC to WebP, AVIF, JPEG or PNG. Quality, lossless, max file size in KB, resize, EXIF auto-rotate, strip metadata. Links, Google Drive, Dropbox or datasets in, ZIP out. Export to JSON, CSV or Excel, or via API.",
    "version": "1.0",
    "x-build-id": "X5r3kQhNmwe4yBd5V"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/steadyscrape~image-converter-compressor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-steadyscrape-image-converter-compressor",
        "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/steadyscrape~image-converter-compressor/runs": {
      "post": {
        "operationId": "runs-sync-steadyscrape-image-converter-compressor",
        "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/steadyscrape~image-converter-compressor/run-sync": {
      "post": {
        "operationId": "run-sync-steadyscrape-image-converter-compressor",
        "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 links",
            "type": "array",
            "description": "Links to your own images: JPG, PNG, WebP, AVIF, GIF (animated too), TIFF, SVG or iPhone HEIC/HEIF, up to 100 MB each. Google Drive and Dropbox share links (shared with anyone with the link) and signed links of Apify key-value records work as they are. A link to a web page instead of an image, and links to Instagram, Facebook, X, Pinterest and other social platforms, are free rows that say why.",
            "items": {
              "type": "string"
            }
          },
          "uploadedImages": {
            "title": "Or upload images",
            "type": "array",
            "description": "Images from your computer or phone (HEIC photos included), converted the same way as the links above.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStore": {
            "title": "Or convert the images of a key-value store",
            "type": "string",
            "description": "Pick a key-value store whose records are images (another Actor's screenshots or downloads). Picking it here is what lets this run read it."
          },
          "recordKeys": {
            "title": "Records of that store",
            "type": "array",
            "description": "The keys of the records to convert. Leave empty to convert every record of the store (its INPUT, OUTPUT, SUMMARY and .json/.txt/.html records are left out).",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Or take the image links from a dataset",
            "type": "string",
            "description": "Pick the dataset of another run: Bulk Image Downloader's output, a product or listing scraper with image links. Only the dataset you pick here can be read."
          },
          "datasetFields": {
            "title": "Dataset fields with the image links",
            "type": "array",
            "description": "The fields that hold the image links, as dotted paths (images.url takes the url of every element of images). Leave empty to take every link in a field named like image, photo, picture, gallery, cover or banner, or ending in .jpg, .png, .webp, .heic and the like (thumbnails and icons left out). From Bulk Image Downloader's rows only the stored copy (fileUrl) is taken.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Convert to",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "original"
            ],
            "type": "string",
            "description": "WebP: about 30 % smaller than JPEG at the same look, shown by every browser. AVIF: smaller still (about half of JPEG), slower to make. JPEG: opens anywhere, also on old software. PNG: lossless, for screenshots, logos and transparency. Keep the format: compress each image in its own format (a HEIC becomes a JPEG, an SVG a PNG).",
            "default": "webp"
          },
          "quality": {
            "title": "Quality (1–100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Lower is smaller and blurrier. Leave empty for each format's default: WebP 80, AVIF 50 (looks like JPEG 80), JPEG 80. For PNG, a quality turns it into a palette image of up to 256 colours, much smaller (like TinyPNG); empty keeps PNG lossless."
          },
          "lossless": {
            "title": "Lossless (WebP and AVIF)",
            "type": "boolean",
            "description": "Every pixel kept exactly: best for screenshots, logos and graphics, larger for photos. JPEG has no lossless mode; PNG is always lossless unless a quality is given.",
            "default": false
          },
          "maxFileSizeKb": {
            "title": "Most kilobytes per image",
            "minimum": 5,
            "type": "integer",
            "description": "A target size for upload forms and page-speed budgets: the quality is lowered (not below 30) until the image fits, then the image is made smaller. Each row says the quality and size it took (targetMet). Leave empty for no target."
          },
          "longestSide": {
            "title": "Longest side (pixels)",
            "minimum": 1,
            "maximum": 16383,
            "type": "integer",
            "description": "Resize so that neither side is longer than this, keeping the proportions: 1920 for full-screen web images, 1200 for blog and product images, 400 for thumbnails. Use this or width/height below, not both."
          },
          "width": {
            "title": "Width (pixels)",
            "minimum": 1,
            "maximum": 16383,
            "type": "integer",
            "description": "Alone, the height follows the proportions. With a height, the fit below decides."
          },
          "height": {
            "title": "Height (pixels)",
            "minimum": 1,
            "maximum": 16383,
            "type": "integer",
            "description": "Alone, the width follows the proportions."
          },
          "fit": {
            "title": "Fit to width and height",
            "enum": [
              "inside",
              "cover",
              "contain",
              "fill"
            ],
            "type": "string",
            "description": "Inside: the whole picture within the box, proportions kept. Cover: fills the box exactly and crops what overflows (square thumbnails). Contain: the whole picture in the exact box, padded with the background (transparent where the format allows). Fill: stretched to the box.",
            "default": "inside"
          },
          "enlarge": {
            "title": "Enlarge smaller images",
            "type": "boolean",
            "description": "Off: an image smaller than the size asked for keeps its size, since enlarging adds no detail. SVGs are always drawn at the size asked for.",
            "default": false
          },
          "background": {
            "title": "Background colour",
            "pattern": "^$|^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
            "type": "string",
            "description": "As #rrggbb. Fills transparency when converting to JPEG (white when empty) and the padding of Contain (transparent when empty, for WebP, AVIF and PNG)."
          },
          "autoRotate": {
            "title": "Auto-rotate from EXIF",
            "type": "boolean",
            "description": "Turn phone and camera photos upright from their EXIF orientation, so they show the right way everywhere, also after the metadata is stripped.",
            "default": true
          },
          "metadata": {
            "title": "Metadata",
            "enum": [
              "strip",
              "colorProfile",
              "all"
            ],
            "type": "string",
            "description": "Strip: no EXIF (camera, GPS location, date), no colour profile; colours are converted to sRGB first, so they look the same. Keep colour profile: drop EXIF and GPS, keep the ICC profile (wide-gamut iPhone photos keep their colours). Keep all: EXIF, GPS, XMP and the profile, also from HEIC.",
            "default": "strip"
          },
          "maxImages": {
            "title": "Most images in a run",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Links past this number are left (counted in the run's SUMMARY).",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Downloads at once",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Images downloaded and stored at the same time; conversions themselves run one after another, so a large photo always has the run's memory to itself.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}