{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Frames, Thumbnails & Scene Changes",
    "description": "Extract frames from video links: every N seconds, evenly spaced, at given times or at scene changes. JPEG, PNG or WebP with exact timestamps, from MP4, WebM, MOV, MKV or HLS. $1.50 per 1,000 frames; unreadable videos are free.",
    "version": "0.1",
    "x-build-id": "SC3AkK5QTpbEPbBhv"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/subtleasianmerch~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-subtleasianmerch-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/subtleasianmerch~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-subtleasianmerch-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/subtleasianmerch~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-subtleasianmerch-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 file links",
            "type": "array",
            "description": "Direct links to video files, one per line: MP4, WebM, MOV, MKV, M4V, AVI, MPEG-TS, or an HLS playlist (.m3u8). The link must open the file itself, e.g. https://example.com/video.mp4 (a signed S3 or Google Cloud Storage link, a Dropbox link ending in ?dl=1, or a file in an Apify key-value store). Links to YouTube, TikTok, Instagram, Facebook, X, Vimeo and other video platforms are refused: their terms cover the videos they host.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "interval",
              "count",
              "timestamps",
              "scenes"
            ],
            "type": "string",
            "description": "Every N seconds; a number of evenly spaced frames (the middle of each equal part, good for thumbnails and previews); at the times you list; or at scene changes (the first frame of the video and of each new shot, found with ffmpeg's scene detection).",
            "default": "interval"
          },
          "intervalSecs": {
            "title": "Every N seconds: interval",
            "minimum": 0.05,
            "maximum": 86400,
            "type": "number",
            "description": "For \"Every N seconds\": a frame at 0 s, N s, 2N s… (or from your start time). 0.5 gives two frames a second; 60 one a minute.",
            "default": 10
          },
          "frameCount": {
            "title": "N evenly spaced frames: how many",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "For \"N evenly spaced frames\": the video (or the part between your start and end times) is split into this many equal parts, and the middle frame of each is taken.",
            "default": 10
          },
          "timestamps": {
            "title": "At given times: times",
            "type": "array",
            "description": "For \"At given times\": one time per line, in seconds (90 or 90.5) or as hh:mm:ss (1:30, 00:01:30.500). Each video gives the first frame at or after each time. Times after the end of a video are listed as not found, free.",
            "items": {
              "type": "string"
            }
          },
          "sceneThreshold": {
            "title": "At scene changes: sensitivity",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "For \"At scene changes\": how different a frame must be from the one before to count as a new scene, from 0.01 to 1 (ffmpeg's scene score). 0.3 finds hard cuts; 0.1–0.2 also finds softer changes; 0.5 or more only very sharp ones. Fades and dissolves are often not found.",
            "default": 0.3
          },
          "minSceneGapSecs": {
            "title": "At scene changes: shortest scene",
            "minimum": 0,
            "maximum": 3600,
            "type": "number",
            "description": "For \"At scene changes\": a new scene is taken only this long after the last one, so flashes and fast cuts don't give bursts of frames. 0 takes every change.",
            "default": 0.5
          },
          "startTime": {
            "title": "Start at",
            "type": "string",
            "description": "Optional. Take frames only from this time on, in seconds or hh:mm:ss, e.g. 1:30. Used by every mode except \"At given times\"."
          },
          "endTime": {
            "title": "End at",
            "type": "string",
            "description": "Optional. Take frames only up to this time, e.g. 10:00. Leave empty for the end of the video."
          },
          "maxFramesPerVideo": {
            "title": "Most frames per video",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "No video gives more frames than this; the rest aren't taken and cost nothing. In \"At scene changes\" the scan stops here.",
            "default": 100
          },
          "maxFramesPerRun": {
            "title": "Most frames per run",
            "minimum": 1,
            "maximum": 1000000,
            "type": "integer",
            "description": "Optional. The run stops after this many frames in all. The run also stops cleanly at your maximum cost per run."
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "JPEG is small and works everywhere; PNG is lossless (larger files); WebP is smaller than JPEG at the same quality.",
            "default": "jpeg"
          },
          "imageWidth": {
            "title": "Image width",
            "minimum": 16,
            "maximum": 7680,
            "type": "integer",
            "description": "Optional. Scale frames down to this width in pixels, keeping their shape, e.g. 640 for previews. Frames are never scaled up. Empty keeps the video's own size."
          },
          "imageQuality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "For JPEG and WebP, from 1 to 100. Higher is sharper and larger; 85 suits most uses. PNG is always lossless.",
            "default": 85
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}