{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor - Extract Frames & Video Thumbnails",
    "description": "Extract frames from video and make video thumbnails: screenshot frames from a direct MP4 URL every N seconds, N evenly spaced, or at scene changes. JPG/PNG output, optional contact sheet, one dataset row per frame. $0.0008 per frame.",
    "version": "0.1",
    "x-build-id": "cbVqH3cdkpJiJLWC3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/pennydata~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-pennydata-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/pennydata~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-pennydata-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/pennydata~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-pennydata-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 http(s) links to video files (mp4, webm, mov, mkv ...). Pages such as YouTube or Vimeo are not supported; link the file itself.",
            "default": [
              "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode",
            "enum": [
              "interval",
              "count",
              "scene",
              "timestamps"
            ],
            "type": "string",
            "description": "interval: one frame every N seconds. count: N evenly spaced frames. scene: a frame at each scene change. timestamps: only the times in Timestamps (also used automatically when Timestamps is filled).",
            "default": "interval"
          },
          "intervalSeconds": {
            "title": "Interval (seconds)",
            "minimum": 0.1,
            "type": "number",
            "description": "Mode interval: seconds between frames.",
            "default": 10
          },
          "frameCount": {
            "title": "Frame count",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Mode count: number of evenly spaced frames per video.",
            "default": 8
          },
          "sceneThreshold": {
            "title": "Scene threshold",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "Mode scene: 0.3 is a good start. Lower finds more cuts, higher finds only hard cuts.",
            "default": 0.3
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "Exact times to grab, in seconds (1, 3.5) or mm:ss / hh:mm:ss. One frame per timestamp, per video. Times past the end of a video are skipped.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Interval and count modes: only use the part of the video after this time (seconds or hh:mm:ss). Default: from the start."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Interval and count modes: only use the part of the video before this time (seconds or hh:mm:ss). Default: to the end."
          },
          "format": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png"
            ],
            "type": "string",
            "description": "jpg is smaller; png is lossless.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max width (px)",
            "minimum": 64,
            "maximum": 3840,
            "type": "integer",
            "description": "Frames wider than this are scaled down, keeping the aspect ratio. Never scaled up.",
            "default": 1280
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit for any mode. Only extracted frames are charged.",
            "default": 100
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image per video with all its frames (free). Its URL is in the dataset row with type contact-sheet.",
            "default": false
          },
          "downloadZip": {
            "title": "Bundle frames as ZIP",
            "type": "boolean",
            "description": "Also save all extracted frames of the run as one frames.zip in the key-value store (free). Its URL is in the zipUrl field of every frame row and in the run output.",
            "default": false
          },
          "maxZipMb": {
            "title": "Max ZIP size (MB)",
            "minimum": 1,
            "maximum": 400,
            "type": "integer",
            "description": "Only with Bundle frames as ZIP: frames beyond this total size are left out of the ZIP (they stay in the dataset and store, and are still charged).",
            "default": 100
          },
          "maxCostUsd": {
            "title": "Max cost per run (USD)",
            "minimum": 0.001,
            "type": "number",
            "description": "Spending guard: the run stops once this many frames worth of cost are extracted. Leave empty for no cap."
          },
          "videoUrl": {
            "title": "Video URL (alias of video file URLs)",
            "type": "string",
            "description": "Same as Video file URLs, for one link; accepted so inputs saved for other video frame extractors run unchanged."
          },
          "url": {
            "title": "URL (alias of video file URLs)",
            "type": "string",
            "description": "Same as Video file URLs, for one link (alias)."
          },
          "urls": {
            "title": "URLs (alias of video file URLs)",
            "type": "array",
            "description": "Same as Video file URLs (alias).",
            "items": {
              "type": "string"
            }
          },
          "startUrls": {
            "title": "Start URLs (alias of video file URLs)",
            "type": "array",
            "description": "Same as Video file URLs (alias). Strings or {url} objects.",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}