{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor - Screenshots, Scenes, Contact Sheet",
    "description": "Extract frames from video URLs (mp4, webm, mov, mkv, m3u8) with FFmpeg: every N seconds, N evenly spaced, scene changes or exact timestamps. JPG/PNG/WebP, public links, optional contact sheet. Pay per video and frame.",
    "version": "0.0",
    "x-build-id": "UhqlDPLG0w8KqB02r"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/tiger19935~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-tiger19935-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/tiger19935~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-tiger19935-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/tiger19935~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-tiger19935-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",
        "properties": {
          "videoUrls": {
            "title": "Video URLs",
            "type": "array",
            "description": "One direct video link per row: .mp4, .webm, .mov, .mkv or an HLS playlist (.m3u8, VOD). YouTube/Vimeo page links are NOT direct video files and will fail. The server must allow range requests for fast seeking (most do).",
            "items": {
              "type": "string"
            }
          },
          "videoFiles": {
            "title": "Videos from key-value stores (optional)",
            "type": "array",
            "description": "Videos already stored in an Apify key-value store of your account, one per row as 'storeId/recordKey' (or just 'recordKey' for this run's default store). Read through the Apify API with the run's token.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Extraction mode",
            "enum": [
              "interval",
              "count",
              "scenes",
              "timestamps"
            ],
            "type": "string",
            "description": "interval = one frame every N seconds. count = N evenly spaced frames (centered in equal slices). scenes = frames at detected scene changes (needs a full pass over the video, slower). timestamps = frames at exact times you list.",
            "default": "count"
          },
          "intervalSeconds": {
            "title": "Interval (seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "Mode 'interval': seconds between frames (starting at 0). Example: 10 on a 60 s video gives 6 frames. At most 'Max frames per video' frames are produced.",
            "default": 10
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Mode 'count': how many evenly spaced frames to take (1-300). Frames are centered in equal slices, so the first frame is not a black intro frame.",
            "default": 8
          },
          "sceneThreshold": {
            "title": "Scene sensitivity (0.1 - 0.9)",
            "type": "string",
            "description": "Mode 'scenes': FFmpeg scene score threshold as a decimal number between 0.1 and 0.9. Lower = more frames (also soft cuts), higher = only hard cuts. 0.3 is a good start. Analysis runs at 5 frames per second on a 320 px wide copy, so times are accurate to about 0.2 s.",
            "default": "0.3"
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "Mode 'timestamps': one time per row, as seconds (83.5), MM:SS (01:23), HH:MM:SS or HH:MM:SS.mmm (00:01:23.500). Times beyond the end of the video are skipped with a warning.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 300,
            "type": "integer",
            "description": "Hard limit of frames taken from one video (1-300). Protects your budget: each frame is one 'frame' event.",
            "default": 20
          },
          "format": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "jpg = small files (default), png = lossless and large, webp = small with good quality.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max width (pixels)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down keeping the aspect ratio (never upscaled). 0 = keep the original size. Range 16-7680.",
            "default": 1280
          },
          "quality": {
            "title": "JPG / WebP quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1-100, used for JPG and WebP only. 85 is a good balance of size and quality.",
            "default": 85
          },
          "makeContactSheet": {
            "title": "Create a contact sheet",
            "type": "boolean",
            "description": "Also create one JPG image that tiles all frames of a video in a grid (link in the video row as 'contactSheetUrl'). Included in the price, no extra event.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of columns of the contact sheet grid (1-12). Each tile is 320 px wide.",
            "default": 5
          },
          "maxDurationMinutes": {
            "title": "Max video length (minutes)",
            "minimum": 1,
            "maximum": 1440,
            "type": "integer",
            "description": "Videos longer than this are rejected without charge. Default 120 (2 hours), maximum 1440. Scene analysis of long videos can take many minutes.",
            "default": 120
          },
          "maxVideoSizeMb": {
            "title": "Max video file size (MB)",
            "minimum": 1,
            "maximum": 50000,
            "type": "integer",
            "description": "Videos whose HTTP size (HEAD / Content-Length, when the server reports it) is above this are rejected without charge. Default 2048 MB. Seek-based modes read only a small part of the file; 'scenes' mode reads all of it.",
            "default": 2048
          },
          "includeFailed": {
            "title": "Include failed videos in the dataset",
            "type": "boolean",
            "description": "If on, videos that could not be processed get a free row with status 'failed' and an error message. They are never charged. Reasons are always listed in the OUTPUT record.",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}