{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: YouTube, TikTok & MP4 to Images",
    "description": "Extract frames from YouTube, TikTok, Instagram, Facebook, X and MP4 videos as JPG, PNG or WebP images: evenly spaced, every N seconds, at scene changes, keyframes or exact timestamps, plus contact sheets.",
    "version": "1.0",
    "x-build-id": "weYu3kxjuzteO7Eyt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/parsebird~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-parsebird-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/parsebird~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-parsebird-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/parsebird~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-parsebird-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": "Add links to the videos to extract frames from: YouTube videos and Shorts, TikTok, Instagram reels and posts, Facebook videos and reels, X posts, other sites supported by yt-dlp, and direct video files (MP4, WebM, MOV, M3U8). Up to 100 links per run.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Extraction mode",
            "enum": [
              "count",
              "interval",
              "scenes",
              "keyframes",
              "timestamps"
            ],
            "type": "string",
            "description": "Choose how frames are picked. <b>Count</b>: N frames spread evenly across the video. <b>Interval</b>: one frame every N seconds. <b>Scenes</b>: one frame at each shot change. <b>Keyframes</b>: the video's own keyframes (I-frames). <b>Timestamps</b>: the exact times you list.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames (count mode)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Count mode: how many frames to take. Each one comes from the middle of an equal slice of the video, which avoids black lead-in and fade-out frames.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Interval in seconds (interval mode)",
            "minimum": 0.1,
            "type": "number",
            "description": "Interval mode: seconds between frames, starting at the start time. 0.5 gives two frames per second.",
            "default": 5
          },
          "sceneThreshold": {
            "title": "Scene sensitivity (scenes mode)",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "Scenes mode: how different two consecutive frames must be to count as a new shot, from 0.01 to 0.99. Lower finds more scenes (0.2 catches soft cuts), higher finds only hard cuts (0.5).",
            "default": 0.3
          },
          "timestamps": {
            "title": "Timestamps (timestamps mode)",
            "type": "array",
            "description": "Timestamps mode: the times to capture. Seconds (90 or 90.5), clock format (1:30, 00:01:30.250) or 1m30s all work. Times past the end of a video are ignored.",
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Optional. Ignore everything before this time, e.g. 30, 0:30 or 1m. Applies to every mode except timestamps."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Optional. Ignore everything after this time, e.g. 300, 5:00 or 5m. Leave empty to run to the end. Applies to every mode except timestamps."
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit on frames per video in every mode. In scenes mode the strongest scene changes are kept, in keyframes mode the keyframes are sampled evenly, and in interval mode the first frames are kept.",
            "default": 100
          },
          "outputFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File format of the saved frames. JPG is smallest and universal, PNG is lossless, WebP is small with high quality.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max frame width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Scale frames down to at most this width, keeping the aspect ratio; frames are never scaled up. The smallest source quality that reaches this width is downloaded, which keeps runs fast. 0 = original resolution (best quality available).",
            "default": 1280
          },
          "contactSheet": {
            "title": "Save a contact sheet",
            "type": "boolean",
            "description": "Also save one grid image per video with its frames (up to 100) side by side, each stamped with its timestamp. The link is in the video summary row.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of frames per row on the contact sheet.",
            "default": 5
          },
          "proxyMode": {
            "title": "Proxy mode",
            "enum": [
              "auto",
              "none",
              "datacenter",
              "residential"
            ],
            "type": "string",
            "description": "<b>Auto</b> (default) tries a direct connection first, then the Apify datacenter proxy, then a residential proxy, moving on only when the site blocks the faster route. Video data fetched through the residential proxy is billed per MB; the other routes cost nothing extra. Pick a single route only if you need to force one.",
            "default": "auto"
          },
          "maxDownloadMbPerVideo": {
            "title": "Max download per video (MB)",
            "minimum": 0,
            "type": "integer",
            "description": "Safety limit on video data fetched per video. Seeking to a frame usually needs well under 1 MB; scenes and keyframes modes read the whole video at its lowest quality. A video that goes over is skipped free of charge. 0 = no limit.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}