{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: frames, thumbnails and scene changes",
    "description": "Pulls still frames from video files you link or upload: every N seconds, at the timestamps you list, N evenly spaced frames, or at each scene change. Adds a best thumbnail and a contact sheet, and returns a download link and timestamp for every frame.",
    "version": "0.1",
    "x-build-id": "c1oFd1TwUlGO2O7Md"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/examsens.ai~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-examsens.ai-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/examsens.ai~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-examsens.ai-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/examsens.ai~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-examsens.ai-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": "Direct links to video files in WebM, MKV or Ogg, with AV1, VP8, VP9 or Theora video. Other files get an error item naming their format. Pages of video sites are not supported.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "inputStore": {
            "title": "Files in a key value store",
            "type": "string",
            "description": "To use video files from your computer, upload them to one of your key value stores, then pick that store here. Every record whose key ends in .webm, .mkv, .ogv or .ogg is processed, or only the keys you list below."
          },
          "inputKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Only process these records from the store above, one key per line. Empty processes every record with a known file extension.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps",
              "scenes",
              "thumbnail"
            ],
            "type": "string",
            "description": "Evenly spaced: N frames, one from the middle of each of N equal parts of the video. Every N seconds: one frame at the start time, then one every N seconds. At timestamps: the exact times you list. Scene changes: the first frame plus every frame where the picture changes sharply. Thumbnail only: one best thumbnail per video.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames (evenly spaced)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "How many frames the evenly spaced mode takes from each video.",
            "default": 6
          },
          "intervalSeconds": {
            "title": "Seconds between frames (every N seconds)",
            "minimum": 0.04,
            "type": "number",
            "description": "Gap between frames in the every N seconds mode. Decimals work, such as 0.5.",
            "default": 10
          },
          "startSeconds": {
            "title": "Start time (every N seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Where the every N seconds mode takes its first frame, in seconds.",
            "default": 0
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "Times to take frames at, one per line: seconds such as 12.5, or a timecode such as 00:01:30 or 1:30.",
            "items": {
              "type": "string"
            }
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "enum": [
              "0.1",
              "0.2",
              "0.3",
              "0.4",
              "0.5"
            ],
            "type": "string",
            "description": "The ffmpeg scene score, from 0 to 1, a frame needs to count as a new scene. Lower finds more and subtler changes.",
            "default": "0.3"
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit for every mode, so a long video cannot produce thousands of frames. The thumbnail is not counted.",
            "default": 50
          },
          "addThumbnail": {
            "title": "Add a best thumbnail",
            "type": "boolean",
            "description": "Also save one thumbnail per video. The ffmpeg thumbnail filter picks the most typical frame of the 150 frames that start 10% into the video, so black openings and fades are skipped.",
            "default": true
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image per video with every saved frame and its timecode. Free.",
            "default": true
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Frames per row on the contact sheet.",
            "default": 4
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "webp",
              "png"
            ],
            "type": "string",
            "description": "JPEG opens everywhere. WebP is smaller. PNG is lossless.",
            "default": "jpeg"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100 for JPEG and WebP. PNG ignores it.",
            "default": 85
          },
          "maxWidth": {
            "title": "Maximum width (px)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Frames wider than this are scaled down with the aspect ratio kept. 0 keeps the full video width. Frames are never enlarged.",
            "default": 1280
          },
          "maxHeight": {
            "title": "Maximum height (px)",
            "minimum": 0,
            "maximum": 8000,
            "type": "integer",
            "description": "Frames taller than this are scaled down with the aspect ratio kept. 0 means no height limit.",
            "default": 0
          },
          "maxVideoSizeMb": {
            "title": "Maximum video size (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Larger videos are skipped with an error item and are not charged.",
            "default": 500
          },
          "timeoutSecondsPerVideo": {
            "title": "Time limit per ffmpeg step (seconds)",
            "minimum": 30,
            "maximum": 7200,
            "type": "integer",
            "description": "Stops one ffmpeg step that runs longer than this, such as scene detection on a very long video, and reports an error for that video.",
            "default": 900
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}