{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor - Keyframes, Scenes, Thumbnails for AI",
    "description": "Extract frames from any video file or YouTube, TikTok and Instagram link: scene-change keyframes, frames at exact timestamps, thumbnails or one every N seconds, plus a contact sheet. Image links ready for AI vision. $2 per 1,000 frames.",
    "version": "1.6",
    "x-build-id": "sMs15bV7PQdk1Jhxc"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/kantolabs~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-kantolabs-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/kantolabs~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-kantolabs-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/kantolabs~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-kantolabs-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": [
          "videoUrls"
        ],
        "properties": {
          "videoUrls": {
            "title": "Video URLs (files or YouTube / TikTok / Instagram links)",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, WEBM, MKV, M3U8...) from your storage, S3/R2/GCS, CDNs or Dropbox ?dl=1, OR public single-video links: YouTube videos and Shorts, TikTok, Instagram reels/posts, Facebook and X videos (read logged out). One per line. Private, age-restricted, removed or blocked videos return a free error row. Use this actor whenever you or an AI agent need to see what is inside a video as images.",
            "default": [
              "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4",
              "https://media.w3.org/2010/05/sintel/trailer.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "auto",
              "scenes",
              "count",
              "interval",
              "timestamps",
              "keyframes",
              "bestThumbnails"
            ],
            "type": "string",
            "description": "Which frames. `auto` (default): first frame + strongest scene changes, topped up evenly. `scenes`: only real cuts (ads, trailers). `count`: N evenly spaced frames, e.g. 8-20 for a vision LLM. `interval`: one every N seconds (lectures, screen recordings). `timestamps`: exact moments you list. `keyframes`: the video's real I-frames (encoder keyframes). `bestThumbnails`: the best-looking few.",
            "default": "auto"
          },
          "timestamps": {
            "title": "Timestamps (timestamps mode)",
            "type": "array",
            "description": "Used by `timestamps` mode: the exact moments to grab, one frame each, in seconds (90, 90.5) or HH:MM:SS(.ms) (00:01:30.500, 1:30). Use it when you already know the moments (a highlight, a timecode from a transcript). Filling this list with mode left on `auto` switches to `timestamps`. Times past the video end are listed in timestampsSkipped, free. Blank frames are kept (exact moments).",
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time (optional)",
            "type": "string",
            "description": "Only take frames from this point on, in every mode: seconds (90) or HH:MM:SS(.ms) (00:01:30). Use it to skip an intro or to work on one part of a long video. Empty = from the start."
          },
          "endTime": {
            "title": "End time (optional)",
            "type": "string",
            "description": "Only take frames up to this point, in every mode: seconds or HH:MM:SS(.ms). Must be after the start time. Empty = to the end. A time past the end of the video means the end."
          },
          "frameCount": {
            "title": "Frames per video (auto / count)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "How many frames `auto` and `count` modes return per video (1-200). 8-20 is enough for an AI vision model to understand a video; 1 in `count` mode returns the middle frame. Each frame is charged once.",
            "default": 12
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval)",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Used by `interval` mode: seconds between frames (1 = one image per second). Frames start at 0:00 and stop at the video end or at \"Max frames per video\". Example: a 10-minute video at 10 s = 60 frames (raise the max to 60).",
            "default": 10
          },
          "thumbnailCount": {
            "title": "Thumbnails per video (bestThumbnails)",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Used by `bestThumbnails` mode: how many of the best frames to return per video, best first. Each returned thumbnail is one charged frame; the candidates that were scored and dropped are free.",
            "default": 3
          },
          "thumbnailCrops": {
            "title": "Thumbnail crops (bestThumbnails)",
            "type": "array",
            "description": "Used by `bestThumbnails` mode: extra free crops of each thumbnail, centred on the faces (or the main subject). 16:9 = YouTube, 9:16 = Shorts/Reels/TikTok, 1:1 = square posts, 4:5 = Instagram portrait. A crop that matches the video's own shape is not repeated. Empty list = no crops.",
            "items": {
              "type": "string",
              "enum": [
                "16:9",
                "9:16",
                "1:1",
                "4:5"
              ],
              "enumTitles": [
                "16:9 landscape",
                "9:16 vertical",
                "1:1 square",
                "4:5 portrait"
              ]
            },
            "default": [
              "16:9",
              "9:16",
              "1:1"
            ]
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "enum": [
              "0.15",
              "0.2",
              "0.3",
              "0.4",
              "0.5"
            ],
            "type": "string",
            "description": "Minimum ffmpeg scene score (0-1) that counts as a cut. Lower finds more, subtler changes.",
            "default": "0.3"
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video (scenes / interval / keyframes)",
            "minimum": 1,
            "maximum": 200,
            "type": "integer",
            "description": "Upper limit for `scenes`, `interval` and `keyframes` modes (1-200, default 50), so a long video cannot produce thousands of frames. Raise it when you want every interval frame or every keyframe; above the limit, keyframes are picked evenly across the video.",
            "default": 50
          },
          "skipBlankFrames": {
            "title": "Skip black / blank frames",
            "type": "boolean",
            "description": "When a chosen frame is black (fade-to-black at a cut, a black intro) or one flat colour, step forward up to 2 seconds to the first frame with content; if there is none, drop it. Dropped frames are not charged. In `keyframes` mode a blank keyframe is dropped (free), never moved; `timestamps` mode always keeps the exact moments. Turn off to keep frames exactly at the planned times.",
            "default": true
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the saved frames.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max frame width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down (aspect ratio kept). 0 keeps the original resolution. 1280 is plenty for AI vision models.",
            "default": 1280
          },
          "imageQuality": {
            "title": "JPEG/WEBP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "Compression quality for JPEG and WEBP frames.",
            "default": 85
          },
          "contactSheet": {
            "title": "Create a contact sheet",
            "type": "boolean",
            "description": "Also save one grid image with all frames and their timecodes (free).",
            "default": true
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Thumbnails per row on the contact sheet.",
            "default": 4
          },
          "includeSummaryRow": {
            "title": "One row per frame + a summary row per video",
            "type": "boolean",
            "description": "Off (default): one dataset row per video with a `frames` list. On: each video gives one `summary` row (all video fields, `frameUrls`, no frames list) followed by one `frame` row per image (`recordType`: summary / frame), and every failure or notice is one free `notice` row. Easier to map in n8n, Make, Zapier or a spreadsheet. Same frames, same price.",
            "default": false
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger videos are skipped (free).",
            "default": 500
          },
          "downloadTimeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Give up on a video that does not download within this time.",
            "default": 300
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}