{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Thumbnails, Scene Keyframes & GIF",
    "description": "Extract frames from video files every N seconds, N evenly spaced or at scene changes, as JPEG, PNG or WebP, plus contact sheet, video metadata, audio track (M4A, MP3, Opus) and GIF clip. Direct video URLs or uploads, not YouTube links. $0.005 per video + $0.003 per frame.",
    "version": "0.1",
    "x-build-id": "9lKxfWbPTEElwBbbp"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/cprussin~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-cprussin-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/cprussin~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-cprussin-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/cprussin~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-cprussin-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": {
          "urls": {
            "title": "Video URLs",
            "type": "array",
            "description": "Direct links to video files (MP4, MOV, MKV, WEBM, AVI, MPEG-TS and anything else FFmpeg reads), one per line. Apify key-value store record URLs are read with your token. YouTube, TikTok, Instagram and other social or video-platform links, web pages and streaming playlists (.m3u8) are refused with a free error.",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs",
            "type": "array",
            "description": "Optional alternative to Video URLs, in Apify's request-list format (e.g. a file with one URL per line, or the output of another actor). Combined with Video URLs.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "keyValueStoreRecords": {
            "title": "Key-value store records",
            "type": "array",
            "description": "Videos uploaded to an Apify key-value store, as <code>storeId/recordKey</code> or <code>username~store-name/recordKey</code>, one per line. Use this for your own videos without hosting them anywhere.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Frames",
            "enum": [
              "interval",
              "scene",
              "none"
            ],
            "type": "string",
            "description": "Interval: frames every N seconds, or N evenly spaced frames. Scene changes: one frame at the start of each detected scene (costs $0.01 per started video minute for the analysis; 2x for 1440p, 4x for 4K). Metadata only: no frames, just video info and the optional GIF and audio.",
            "default": "interval"
          },
          "intervalSeconds": {
            "title": "Every N seconds",
            "minimum": 1,
            "maximum": 3600,
            "type": "integer",
            "description": "Interval mode: one frame every this many seconds, starting at 0:00. Ignored when Number of frames is set.",
            "default": 10
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 0,
            "maximum": 1000,
            "type": "integer",
            "description": "Interval mode: this many frames, evenly spaced over the whole video (e.g. 12 thumbnails). 0 to use Every N seconds instead.",
            "default": 0
          },
          "sceneThreshold": {
            "title": "Scene sensitivity threshold (%)",
            "minimum": 1,
            "maximum": 99,
            "type": "integer",
            "description": "Scene mode: how different a frame must be from the previous one to start a new scene, 1-99. Lower finds more (subtle) cuts; 30 suits most edited videos, 40-50 only hard cuts.",
            "default": 30
          },
          "minSceneSeconds": {
            "title": "Minimum scene length (seconds)",
            "minimum": 0,
            "maximum": 600,
            "type": "integer",
            "description": "Scene mode: cuts closer than this to the previous one are ignored (flashes, fast montages). 0 keeps every cut.",
            "default": 1
          },
          "maxFrames": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Caps cost per video ($0.003 per frame). Interval mode spreads this many frames over the video when more would be needed; scene mode keeps the strongest cuts.",
            "default": 50
          },
          "frameFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "JPEG: small, universal. PNG: lossless, large. WebP: smallest at the same quality.",
            "default": "jpg"
          },
          "frameQuality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG and WebP quality, 1-100 (ignored for PNG).",
            "default": 85
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down (aspect ratio kept, never upscaled). 0 keeps the original size.",
            "default": 1280
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image of all frames (320 px tiles, up to 20 rows), billed as one frame.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Tiles per row of the contact sheet.",
            "default": 4
          },
          "gifClip": {
            "title": "GIF clip",
            "type": "boolean",
            "description": "Also save a short animated GIF from the video ($0.005 for the default 5 s, 480 px, 10 fps clip; longer, wider or smoother clips and videos above 1080p cost proportionally more).",
            "default": false
          },
          "gifStartSeconds": {
            "title": "GIF start (seconds)",
            "minimum": 0,
            "maximum": 10800,
            "type": "integer",
            "description": "Where the GIF clip starts.",
            "default": 0
          },
          "gifDurationSeconds": {
            "title": "GIF length (seconds)",
            "minimum": 1,
            "maximum": 15,
            "type": "integer",
            "description": "Length of the GIF clip, at most 15 s.",
            "default": 5
          },
          "gifWidth": {
            "title": "GIF width (px)",
            "minimum": 64,
            "maximum": 1080,
            "type": "integer",
            "description": "GIF width (never upscaled). GIFs get large fast: 320-480 is typical.",
            "default": 480
          },
          "gifFps": {
            "title": "GIF frames per second",
            "minimum": 1,
            "maximum": 25,
            "type": "integer",
            "description": "Frames per second of the GIF clip.",
            "default": 10
          },
          "audioFormat": {
            "title": "Extract audio track",
            "enum": [
              "none",
              "m4a",
              "mp3",
              "opus"
            ],
            "type": "string",
            "description": "Also save the video's audio track: M4A (AAC 128 kbps), MP3 (VBR ~190 kbps) or Opus (96 kbps). A track already in that codec (e.g. AAC in an MP4, for M4A) is copied without re-encoding for $0.005; others are re-encoded for $0.002 per started video minute. Videos without audio get a warning and no charge.",
            "default": "none"
          },
          "maxDurationMinutes": {
            "title": "Max video length (minutes)",
            "minimum": 1,
            "maximum": 180,
            "type": "integer",
            "description": "Longer videos are skipped with an error (free). At most 180.",
            "default": 60
          },
          "maxFileSizeMb": {
            "title": "Max file size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger downloads are skipped with an error (free).",
            "default": 1000
          },
          "timeoutSecs": {
            "title": "Download timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "Max time to download one video.",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}