{
  "openapi": "3.0.1",
  "info": {
    "title": "Image Converter & Compressor – HEIC, AVIF, WebP, JPG, PNG",
    "description": "Convert and compress images in bulk: HEIC to JPG (iPhone), AVIF, WebP, JPEG, PNG, GIF, TIFF, SVG in; WebP, AVIF, JPEG, PNG, GIF or TIFF out. Resize, strip EXIF/GPS, compress to a target size in KB, keep animations, ZIP. From URLs, a dataset or uploaded files. Failed images are free.",
    "version": "0.1",
    "x-build-id": "fzGidcpjdocdByvba"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/oldjard~image-converter-compressor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-oldjard-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/oldjard~image-converter-compressor/runs": {
      "post": {
        "operationId": "runs-sync-oldjard-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/oldjard~image-converter-compressor/run-sync": {
      "post": {
        "operationId": "run-sync-oldjard-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 URLs",
            "type": "array",
            "description": "Direct links to image files: JPEG, PNG, WebP, AVIF, HEIC/HEIF (iPhone photos), GIF, TIFF, BMP or SVG. Google Drive and Dropbox share links are turned into direct downloads.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Dataset with image URLs",
            "type": "string",
            "description": "ID or name of an Apify dataset, e.g. the output of a scraper. Image URLs are read from the field below."
          },
          "datasetField": {
            "title": "Field that holds the image URLs",
            "type": "string",
            "description": "A field with one URL, a list of URLs, or a list of objects with url/src. Dot paths work (e.g. \"product.images\"). Default: url.",
            "default": "url"
          },
          "keyValueStoreId": {
            "title": "Key-value store with image files",
            "type": "string",
            "description": "ID or name of an Apify key-value store that holds image files (upload them in the Console). Every record except INPUT/OUTPUT is converted, unless you list keys below."
          },
          "keyValueStoreKeys": {
            "title": "Only these keys",
            "type": "array",
            "description": "Record keys to convert from the store above. Leave empty for all.",
            "items": {
              "type": "string"
            }
          },
          "format": {
            "title": "Output format",
            "enum": [
              "webp",
              "avif",
              "jpeg",
              "png",
              "gif",
              "tiff",
              "original"
            ],
            "type": "string",
            "description": "WebP: small and supported everywhere. AVIF: about half the size of WebP for photos. JPEG: works with everything. PNG: lossless or palette-compressed. \"Same as input\" keeps each file's format (HEIC becomes JPEG, SVG and BMP become PNG).",
            "default": "webp"
          },
          "quality": {
            "title": "Quality (1-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Lower is smaller. Blank = 80 for JPEG/WebP, 50 for AVIF (they look about the same). For PNG it sets the palette quality."
          },
          "lossless": {
            "title": "Lossless",
            "type": "boolean",
            "description": "Keep every pixel exact (WebP, AVIF, PNG, TIFF). Bigger files. Off: PNG is palette-compressed like TinyPNG.",
            "default": false
          },
          "targetSizeKb": {
            "title": "Compress to under (KB)",
            "minimum": 0,
            "type": "integer",
            "description": "Find the highest quality that fits under this size, and shrink the image if even low quality is too big. 0 = off. Works for JPEG, WebP, AVIF, PNG and GIF.",
            "default": 0
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Resize to at most this width. 0 = keep. Aspect ratio is kept unless you pick another fit.",
            "default": 0
          },
          "maxHeight": {
            "title": "Max height (px)",
            "minimum": 0,
            "type": "integer",
            "description": "Resize to at most this height. 0 = keep.",
            "default": 0
          },
          "fit": {
            "title": "Fit",
            "enum": [
              "inside",
              "cover",
              "contain",
              "fill"
            ],
            "type": "string",
            "description": "inside: fit within the box, no cropping. cover: fill the box exactly, cropping the edges (thumbnails). contain: fit within the box and pad with the background colour. fill: stretch.",
            "default": "inside"
          },
          "enlarge": {
            "title": "Enlarge smaller images",
            "type": "boolean",
            "description": "Off: images smaller than the box keep their size.",
            "default": false
          },
          "background": {
            "title": "Background colour",
            "type": "string",
            "description": "Hex colour for transparent areas when the output has no transparency (JPEG), and for padding with fit = contain.",
            "default": "#ffffff"
          },
          "stripMetadata": {
            "title": "Strip metadata (EXIF, GPS)",
            "type": "boolean",
            "description": "Remove EXIF, GPS location and XMP for smaller, private files. Photos are rotated upright first either way.",
            "default": true
          },
          "keepAnimation": {
            "title": "Keep animation",
            "type": "boolean",
            "description": "Animated GIF/WebP stay animated when the output is WebP or GIF. Other outputs take the first frame.",
            "default": true
          },
          "createZip": {
            "title": "Also make a ZIP of all files",
            "type": "boolean",
            "description": "One images.zip with every converted file, linked in the run's OUTPUT.",
            "default": false
          },
          "maxImages": {
            "title": "Max images",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after this many images. 0 = no limit (your run's max cost still applies).",
            "default": 0
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Skip (free) any file larger than this. Up to 200.",
            "default": 100
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}