{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor - Keyframes, Scenes, Thumbnails",
    "description": "Cut still frames from video links or another Actor's dataset: evenly spaced, every N seconds, scene changes, key frames, exact times or the best thumbnails. Sharpness, size and a contact sheet per video. Pay per frame.",
    "version": "0.1",
    "x-build-id": "16hgY8DHXMl88sgjd"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pshivam~video-frame-extractor-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pshivam-video-frame-extractor-scraper",
        "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/pshivam~video-frame-extractor-scraper/runs": {
      "post": {
        "operationId": "runs-sync-pshivam-video-frame-extractor-scraper",
        "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/pshivam~video-frame-extractor-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-pshivam-video-frame-extractor-scraper",
        "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": "Direct links to video files (mp4, mov, webm, mkv, avi, ts ...). Add them one by one, paste a list (one per line) or load a text file. Page links of video sites (YouTube, TikTok pages) are not video files and fail for free.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "datasetId": {
            "title": "Or a dataset of another Actor",
            "type": "string",
            "description": "The id of an Apify dataset (from another Actor's run). Every video address in its rows is cut: fields such as videoUrl, downloadAddr, playUrl or mediaUrl are found on their own."
          },
          "urlFields": {
            "title": "Dataset fields with the videos",
            "type": "array",
            "description": "Only for a dataset: the fields that hold video addresses (videoUrl, videoMeta.downloadAddr). Empty: find them on their own.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps",
              "keyframes",
              "scenes",
              "best"
            ],
            "type": "string",
            "description": "Evenly spaced: the middle of N equal parts. Every N seconds. Exact times: your list. Key frames: the frames the video is built on (fast). Scene changes: a frame at each cut. Best: the sharpest, best lit frames, spread over the video.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For 'Evenly spaced' and 'Best': how many frames per video.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Seconds between frames",
            "minimum": 0.04,
            "type": "number",
            "description": "For 'Every N seconds': 10 gives a frame at 0 s, 10 s, 20 s ...",
            "default": 10
          },
          "timestamps": {
            "title": "Exact times",
            "type": "array",
            "description": "For 'At exact times': seconds (12.5), clock times (01:30 or 00:01:30.5) or percentages of the video (50%). A time past the end is skipped.",
            "items": {
              "type": "string"
            }
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "For 'At every scene change': lower finds more changes (0.1 = small changes), higher only hard cuts (0.5). The first frame is always included.",
            "default": 0.3
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "More moments than this are thinned out evenly (scene changes keep the strongest).",
            "default": 50
          },
          "startTime": {
            "title": "Start at",
            "type": "string",
            "description": "Only cut from this time on: seconds or a clock time such as 00:30. Empty: the start."
          },
          "endTime": {
            "title": "Stop at",
            "type": "string",
            "description": "Only cut up to this time. Empty: the end."
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "The format of the saved frames.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Maximum width (pixels)",
            "minimum": 0,
            "maximum": 8192,
            "type": "integer",
            "description": "Frames wider than this are scaled down (never up). 0 keeps the original size.",
            "default": 1280
          },
          "imageQuality": {
            "title": "JPEG/WebP quality",
            "minimum": 30,
            "maximum": 100,
            "type": "integer",
            "description": "30 to 100. Higher is sharper and larger.",
            "default": 85
          },
          "skipBlankFrames": {
            "title": "Skip blank frames",
            "type": "boolean",
            "description": "Drop black, white and single-colour frames (not charged). In 'Evenly spaced' a blank frame is first replaced by a nearby one.",
            "default": true
          },
          "dropDuplicates": {
            "title": "Drop repeated frames",
            "type": "boolean",
            "description": "Drop frames that look like an earlier frame of the same video (not charged). Off: they are kept and marked in 'similarTo'.",
            "default": false
          },
          "contactSheet": {
            "title": "Make a contact sheet",
            "type": "boolean",
            "description": "One picture per video with all its frames as small tiles and their times. Free.",
            "default": true
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Tiles per row on the contact sheet.",
            "default": 4
          },
          "maxVideoSizeMb": {
            "title": "Maximum video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger videos are refused before they are downloaded and are not charged.",
            "default": 500
          },
          "maxRetries": {
            "title": "Download retries",
            "minimum": 0,
            "maximum": 10,
            "type": "integer",
            "description": "Retries after a timeout, a dropped connection, HTTP 429 or a server error. A broken download continues where it stopped when the server allows.",
            "default": 3
          },
          "timeoutSeconds": {
            "title": "Download timeout (seconds)",
            "minimum": 5,
            "maximum": 600,
            "type": "integer",
            "description": "How long to wait for the server's next bytes.",
            "default": 60
          },
          "processingTimeoutSeconds": {
            "title": "Processing timeout (seconds)",
            "minimum": 10,
            "maximum": 3600,
            "type": "integer",
            "description": "The longest a single video may take to cut. 'Scene changes' reads the whole video, so long videos need more.",
            "default": 300
          },
          "maxPerHost": {
            "title": "Downloads per site",
            "minimum": 1,
            "maximum": 20,
            "type": "integer",
            "description": "Videos downloaded at the same time from one site.",
            "default": 4
          },
          "headers": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Headers sent with every download, e.g. {\"Authorization\": \"Bearer ...\"} for videos you are allowed to download."
          },
          "keyValueStoreName": {
            "title": "Key-value store name",
            "type": "string",
            "description": "Save frames into this named key-value store instead of the run's own one. Named stores do not expire."
          },
          "onlyNew": {
            "title": "Only new videos",
            "type": "boolean",
            "description": "Skip videos that earlier runs of this same input already returned, so you never pay twice. The first run works as usual and remembers what it returned, in your key-value store 'video-frame-extractor-scraper-only-new'.",
            "default": false
          },
          "maxItems": {
            "title": "Maximum frames",
            "minimum": 1,
            "type": "integer",
            "description": "Stop after this many frames in total. You are charged per frame; failed videos, blank frames and contact sheets are free.",
            "default": 100
          },
          "maxConcurrency": {
            "title": "Videos at the same time",
            "minimum": 1,
            "maximum": 16,
            "type": "integer",
            "description": "Videos processed in parallel. More memory allows more.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}