{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Frames and Scene Changes",
    "description": "Extract still frames from video files: evenly spaced, every N seconds, at exact times, at scene changes or every keyframe. JPEG, PNG or WebP with timestamps, a contact sheet and video metadata. Ready for AI vision and thumbnails.",
    "version": "0.1",
    "x-build-id": "RAkgmCjPG5hxvys6E"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/maliksaid~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-maliksaid-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/maliksaid~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-maliksaid-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/maliksaid~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-maliksaid-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 file URLs",
            "type": "array",
            "description": "Direct links to video files, one per line: MP4, MOV, WebM, MKV, AVI and most other formats ffmpeg reads. Pages on YouTube, TikTok, Instagram and similar platforms are refused, because their terms forbid downloading. The Actor reads robots.txt on each host. Leave empty, with no key-value store, to process a built-in sample video.",
            "items": {
              "type": "string"
            }
          },
          "keyValueStoreId": {
            "title": "Key-value store with video files",
            "type": "string",
            "description": "Optional. Pick one of your key-value stores that holds uploaded video files. The Actor only reads this store. Frames go to the run's own key-value store."
          },
          "keyValueStoreKeys": {
            "title": "Record keys",
            "type": "array",
            "description": "Optional. Process only these records of the store. Leave empty to process every record.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps",
              "scenes",
              "keyframes"
            ],
            "type": "string",
            "description": "Evenly spaced and interval frames read only the parts of the video they need. Scene changes and keyframes read the whole video and also charge per scanned minute.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For 'evenly spaced': how many frames per video.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Seconds between frames",
            "minimum": 0.1,
            "type": "number",
            "description": "For 'every N seconds': the gap between frames, starting at 0.",
            "default": 10
          },
          "timestamps": {
            "title": "Times",
            "type": "array",
            "description": "For 'exact times': seconds (75.5) or hh:mm:ss (00:01:15.5), one per line. Times past the end of a video are skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Optional. Use only the part of each video from this time: seconds (75.5) or hh:mm:ss (00:01:15.5). Empty means from the start. Scene and keyframe scans then charge only the minutes inside the window."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Optional. Use only the part of each video up to this time. Empty means to the end."
          },
          "skipBlankFrames": {
            "title": "Skip black and blank frames",
            "type": "boolean",
            "description": "Step past black, white or one-colour frames, up to 1.5 seconds forward. A slot with only blank frames is skipped. Skipped frames are free. Exact times are never moved.",
            "default": true
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "For 'scene changes': 0.01 to 1. Lower finds more scene changes. 0.3 suits most videos. Changes are detected between keyframes, which keeps scans fast.",
            "default": 0.3
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "A cap on frames from one video in any mode.",
            "default": 50
          },
          "maxWidth": {
            "title": "Maximum frame width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down, keeping proportions. 0 keeps the original size. 1280 suits AI vision models and previews.",
            "default": 1280
          },
          "outputFormat": {
            "title": "Image format",
            "enum": [
              "jpeg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the frame images.",
            "default": "jpeg"
          },
          "quality": {
            "title": "Quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Quality for JPEG and WebP, from 1 to 100.",
            "default": 85
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image per video with all its frames, 4 across. Free of charge.",
            "default": false
          },
          "maxVideoMinutes": {
            "title": "Maximum video length for scans (minutes)",
            "minimum": 1,
            "maximum": 600,
            "type": "integer",
            "description": "Scene and keyframe scans skip videos longer than this. A 10-minute 360p video took about 9 minutes to scan at 512 MB, so long scans need a longer run timeout. Other modes have no length limit.",
            "default": 30
          },
          "maxItems": {
            "title": "Maximum frames per run",
            "minimum": 0,
            "type": "integer",
            "description": "Stop after saving this many frames in total. Set 0 for no limit.",
            "default": 200
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}