{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Keyframes & Thumbnails",
    "description": "Extract frames from video files, uploads and video podcast feeds: a set number, one every N seconds, scene changes, keyframes or listed times, plus a contact sheet. Skips blank and repeated frames. JPG, PNG or WebP with links. Pay per frame stored.",
    "version": "0.1",
    "x-build-id": "F9Chp6eNu2hME4IMq"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/enisbodlli~video-keyframe-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-enisbodlli-video-keyframe-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/enisbodlli~video-keyframe-extractor/runs": {
      "post": {
        "operationId": "runs-sync-enisbodlli-video-keyframe-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/enisbodlli~video-keyframe-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-enisbodlli-video-keyframe-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",
        "properties": {
          "videoUrls": {
            "title": "Video links",
            "type": "array",
            "description": "One link per line. Works with direct video files (MP4, MOV, WEBM, MKV, AVI, FLV, MPEG-TS and more), web pages that embed a video file, and video podcast RSS or Atom feeds. YouTube, TikTok, Vimeo and other platform pages are not supported: use a direct link to a file you may use.",
            "items": {
              "type": "string"
            }
          },
          "videoFiles": {
            "title": "Upload video files",
            "type": "array",
            "description": "Video files from your computer, stored in an Apify key-value store, or links to records in one. Up to about 600 MB each at the default 512 MB of memory, 1.2 GB at 1 GB; more memory allows larger files."
          },
          "maxVideosPerFeed": {
            "title": "Videos per feed",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For a feed link: how many of its newest entries with a video file are processed. Single video links ignore this.",
            "default": 3
          },
          "mode": {
            "title": "How frames are chosen",
            "enum": [
              "count",
              "interval",
              "scenes",
              "keyframes",
              "timestamps"
            ],
            "type": "string",
            "description": "count: a fixed number of frames spread evenly over the video. interval: one frame every few seconds. scenes: a frame at each cut or scene change. keyframes: the video's own keyframes, the fastest way through a long video. timestamps: frames at the times you list.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For mode count: how many frames each video gives, spread evenly over the chosen time range.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Seconds between frames",
            "minimum": 0.1,
            "maximum": 86400,
            "type": "number",
            "description": "For mode interval: one frame every this many seconds. 0.5 gives two frames per second; 60 gives one a minute.",
            "default": 10
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "For mode scenes: how different a frame must be from the one before it to count as a new scene, from 0.01 to 0.99. Lower finds more scenes; 0.3 suits most videos, 0.15 to 0.2 suits slides and screen recordings.",
            "default": 0.3
          },
          "timestamps": {
            "title": "Times",
            "type": "array",
            "description": "For mode timestamps: one time per line, as seconds (90), a clock time (1:30 or 01:02:03.5), or a share of the video (50%).",
            "items": {
              "type": "string"
            }
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "For modes interval, scenes and keyframes: at most this many frames from each video, counted from the start of the chosen range.",
            "default": 100
          },
          "startTime": {
            "title": "Start at",
            "type": "string",
            "description": "Skip the part of each video before this time, as seconds (90) or a clock time (1:30). Leave empty to start at the beginning."
          },
          "endTime": {
            "title": "End at",
            "type": "string",
            "description": "Stop at this time in each video, as seconds or a clock time. Leave empty to go to the end."
          },
          "skipBlankFrames": {
            "title": "Skip blank frames",
            "type": "boolean",
            "description": "Leave out frames that are one flat colour, such as black frames between scenes and fades. Skipped frames are not charged.",
            "default": true
          },
          "skipDuplicateFrames": {
            "title": "Skip repeated frames",
            "type": "boolean",
            "description": "Leave out a frame that looks the same as the last frame kept, such as a slide that stays on screen. Skipped frames are not charged.",
            "default": true
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "jpg is small and suits most uses; png is lossless; webp is smaller than jpg at the same quality.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Maximum width in pixels",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down, keeping their shape; narrower frames keep their size. 0 keeps every frame at the video's own size.",
            "default": 1280
          },
          "imageQuality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For jpg and webp, from 1 to 100. Higher looks better and makes larger files. png ignores it.",
            "default": 85
          },
          "contactSheet": {
            "title": "Make a contact sheet",
            "type": "boolean",
            "description": "Add one image per video with its frames in a grid, each labelled with its time. It is stored and charged as one more image. Needs at least two frames; sheets show up to 100 frames, spread evenly.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "How many frames sit side by side on a contact sheet.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}