{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor - Thumbnails & Scene Frames to JPG",
    "description": "Extract still frames and thumbnails from direct MP4, WebM, MOV or HLS (.m3u8) video links: evenly spaced, every N seconds, exact timestamps or scene changes. JPG/PNG images with links, timecodes, brightness and perceptual hash.",
    "version": "0.1",
    "x-build-id": "77QV2pdDsMCVdhc1C"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/fabrikit~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-fabrikit-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/fabrikit~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-fabrikit-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/fabrikit~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-fabrikit-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",
            "type": "array",
            "description": "Direct links to video files or HLS (.m3u8) playlists, e.g. from your storage bucket, CDN or CMS. The link must return the video itself, not a web page with a player. Video platform pages (YouTube, TikTok, Instagram, Vimeo, Twitch...) are refused.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps",
              "scenes"
            ],
            "type": "string",
            "description": "count: a fixed number of frames spread evenly over the video. interval: one frame every N seconds. timestamps: frames at the exact times you list. scenes: a frame each time the picture changes (cuts), billed also per minute scanned.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames (count mode)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many evenly spaced frames to take from each video. Each frame is taken from the middle of its part of the video, so the black first and last frames are avoided.",
            "default": 8
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval mode)",
            "minimum": 0.2,
            "maximum": 86400,
            "type": "number",
            "description": "One frame every N seconds, starting at the start of the window. Values below 3 seconds are decoded in a single pass (frames within a couple of video frames of the exact grid).",
            "default": 10
          },
          "timestamps": {
            "title": "Timestamps (timestamps mode)",
            "type": "array",
            "description": "Exact times to capture, as seconds (\"95.5\") or HH:MM:SS(.mmm) / MM:SS (\"00:01:35.500\"). Times after the end of a video are skipped.",
            "items": {
              "type": "string"
            }
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity (scenes mode)",
            "minimum": 0.05,
            "maximum": 0.95,
            "type": "number",
            "description": "How different two consecutive frames must be to count as a new scene, from 0.05 (very sensitive, many frames) to 0.95. 0.3 catches hard cuts; try 0.15-0.2 for slow fades or slides.",
            "default": 0.3
          },
          "minSceneGapSeconds": {
            "title": "Minimum seconds between scene frames",
            "minimum": 0,
            "maximum": 600,
            "type": "number",
            "description": "Ignore new scenes that start less than this many seconds after the previous captured one (avoids bursts on flashes and fast edits).",
            "default": 1
          },
          "maxScanMinutes": {
            "title": "Max minutes scanned per video (scenes mode)",
            "minimum": 1,
            "maximum": 240,
            "type": "integer",
            "description": "Scene detection decodes every frame, so it is limited to the first N minutes of the window to keep runs fast and the scan cost predictable.",
            "default": 30
          },
          "startSeconds": {
            "title": "Start at (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Only take frames after this point of each video. 0 = from the beginning.",
            "default": 0
          },
          "endSeconds": {
            "title": "End at (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Only take frames before this point of each video. 0 = until the end.",
            "default": 0
          },
          "exactTimestamps": {
            "title": "Exact frame positions",
            "type": "boolean",
            "description": "count and interval modes normally use the nearest keyframe inside each slot (fast and cheap); the real timestamp is always reported. Turn on to decode the exact frame at every planned time. timestamps mode is always exact.",
            "default": false
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit of frames saved from one video, in every mode.",
            "default": 100
          },
          "maxItems": {
            "title": "Max frames in total",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "The run stops after saving this many frames across all videos (each frame is one dataset item and one charge).",
            "default": 200
          },
          "skipBlankFrames": {
            "title": "Skip blank frames",
            "type": "boolean",
            "description": "Black, white or single-colour frames (fades, title gaps) are replaced by a frame a little later in the same slot, or dropped without charge. Not applied in timestamps mode, where such frames are kept and flagged with blank = true.",
            "default": true
          },
          "skipDuplicateFrames": {
            "title": "Skip near-duplicate frames",
            "type": "boolean",
            "description": "Drop frames that look almost the same as a frame already saved from the same video (perceptual hash), e.g. a static slide over several intervals. Dropped frames are not charged.",
            "default": false
          },
          "duplicateDistance": {
            "title": "Duplicate tolerance",
            "minimum": 0,
            "maximum": 20,
            "type": "integer",
            "description": "Maximum perceptual-hash difference (0-20 bits out of 64) for two frames to count as duplicates. Higher drops more.",
            "default": 6
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png"
            ],
            "type": "string",
            "description": "JPG is small and fine for previews and AI vision; PNG is lossless and larger.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max image width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down keeping the aspect ratio; smaller videos are never upscaled. 0 keeps the original size. For HLS playlists the smallest stream at least this wide is used.",
            "default": 1280
          },
          "jpegQuality": {
            "title": "JPG quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100. Higher means better images and bigger files.",
            "default": 85
          },
          "contactSheet": {
            "title": "Contact sheet per video",
            "type": "boolean",
            "description": "Also save one JPG grid with the thumbnails of up to 64 frames of each video (free); its link is in contactSheetUrl.",
            "default": true
          },
          "includeImageBase64": {
            "title": "Include images as base64 in the dataset",
            "type": "boolean",
            "description": "Add an imageBase64 data URL to every record, handy for AI agents and scripts that cannot fetch links. Keep maxWidth small (e.g. 512) when you turn this on.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Videos are fetched directly. Only if a host refuses the request (401, 403, 429) is it retried through this proxy (Apify datacenter by default). Residential proxy is never used.",
            "default": {
              "useApifyProxy": true
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}