{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor for Scene Changes and Thumbnails",
    "description": "Turn video links into still images: one per scene change, every N seconds, a set number of frames or exact timestamps. JPG, PNG or WebP with a contact sheet per video. MP4, MOV, WebM, MKV and more, from S3, Dropbox or Drive links. $2 per 1,000 frames.",
    "version": "0.1",
    "x-build-id": "VOW68MfCsnXuuPfuA"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cleanscrape~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cleanscrape-video-frame-extractor",
        "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/cleanscrape~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-cleanscrape-video-frame-extractor",
        "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/cleanscrape~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-cleanscrape-video-frame-extractor",
        "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": [
          "videos"
        ],
        "properties": {
          "videos": {
            "title": "Video links",
            "type": "array",
            "description": "One direct link to a video file per line (MP4, MOV, WebM, MKV, AVI, …), for example from your own storage, a CDN, S3 or Google Cloud Storage. Signed links work. Pages that only play a video (YouTube, TikTok, Instagram, Vimeo pages) are not supported: use a link that downloads the file itself. Up to 200 videos per run.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "overview",
              "scenes",
              "interval",
              "count",
              "timestamps"
            ],
            "type": "string",
            "description": "Overview finds scene changes from the video's keyframes, which is fast at any length, and fills quiet stretches with evenly placed frames. Precise scene changes looks at every frame to catch every cut, including quick ones; it costs extra per minute of video scanned.",
            "default": "overview"
          },
          "maxFrames": {
            "title": "Frames per video (maximum)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "The most frames to save from each video. Each saved frame is charged; near-identical frames that are left out are not.",
            "default": 20
          },
          "intervalSeconds": {
            "title": "Every N seconds",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "For \"Every N seconds\": time between frames. Up to \"Frames per video\" frames are saved, from the start.",
            "default": 10
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "For \"Exact timestamps\": one per line, as seconds (83 or 83.5) or as 1:23, 01:23.5 or 1:02:03. The same times are used for every video.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start at (optional)",
            "type": "string",
            "description": "Use only the part of each video after this time, for example 0:30 to skip an intro."
          },
          "endTime": {
            "title": "End at (optional)",
            "type": "string",
            "description": "Use only the part before this time, for example 10:00. Empty means the end of the video."
          },
          "sceneSensitivity": {
            "title": "Scene change sensitivity",
            "enum": [
              "low",
              "medium",
              "high"
            ],
            "type": "string",
            "description": "How different two moments must look to count as a new scene.",
            "default": "medium"
          },
          "skipDuplicates": {
            "title": "Leave out near-identical frames",
            "type": "boolean",
            "description": "Frames that look the same as one already saved from the same video are left out and not charged. Not used for a set number of frames or exact timestamps: those give exactly what you asked for.",
            "default": true
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File type of the saved frames.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Largest image width",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Larger frames are scaled down to this width, keeping their shape; smaller ones are not enlarged. 0 keeps the video's full size.",
            "default": 1280
          },
          "quality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For JPG and WebP: 100 is the best quality and the largest files.",
            "default": 85
          },
          "contactSheet": {
            "title": "Contact sheet per video",
            "type": "boolean",
            "description": "Also save one grid image per video showing up to 60 of its frames with their times. Free.",
            "default": true
          },
          "maxFileSizeMb": {
            "title": "Largest video file",
            "minimum": 1,
            "maximum": 4096,
            "type": "integer",
            "description": "Larger files are not downloaded and not charged. For files over 2 GB, raise the run's memory under Run options.",
            "default": 2048
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}