{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Video URL to JPG, PNG & WebP Frames",
    "description": "Extract frames from video file URLs with ffmpeg. Pick every N seconds, N evenly spaced frames, scene changes or exact timestamps. Get JPG, PNG or WebP images with public links, timestamps and sizes, ready for AI vision, thumbnails and video analysis.",
    "version": "1.0",
    "x-build-id": "UmzZyagqKezyzzuAw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/atesen-software~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-atesen-software-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/atesen-software~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-atesen-software-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/atesen-software~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-atesen-software-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",
            "minItems": 1,
            "type": "array",
            "description": "Direct links to video files (.mp4, .mov, .webm, .mkv, .avi, .flv, .ts), one per line, up to 200 per run. The link must open the file itself and be public. Page links from YouTube, Vimeo, TikTok, Instagram and similar sites are not supported.",
            "default": [
              "https://www.w3schools.com/html/mov_bbb.mp4",
              "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4"
            ],
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Frame selection",
            "enum": [
              "interval",
              "count",
              "scenes",
              "timestamps"
            ],
            "type": "string",
            "description": "Interval: one frame every N seconds. Count: N frames spread evenly (each taken from the middle of an equal slice). Scenes: the opening frame plus one frame at every scene change. Timestamps: frames at the exact times you list.",
            "default": "interval"
          },
          "intervalSeconds": {
            "title": "Interval (seconds)",
            "minimum": 0.1,
            "maximum": 86400,
            "type": "number",
            "description": "Interval mode: seconds between frames, starting at the start time. Use 1 for one frame per second.",
            "default": 5
          },
          "frameCount": {
            "title": "Frame count",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Count mode: how many frames to take per video, spread evenly between the start and end time.",
            "default": 8
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity",
            "enum": [
              "0.15",
              "0.2",
              "0.3",
              "0.4",
              "0.5",
              "0.7"
            ],
            "type": "string",
            "description": "Scenes mode: how different two neighbouring pictures must be to count as a cut. Lower finds more, subtler changes (0.2 catches soft cuts), higher finds only hard cuts (0.5).",
            "default": "0.3"
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "Timestamps mode: the moments to capture, one per line. Seconds (90 or 12.5) or clock time (1:30, 01:02:03.5). Times after the end of the video are skipped and cost nothing.",
            "items": {
              "type": "string"
            }
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "JPG is the smallest and works everywhere. PNG is lossless and much larger. WebP is small with high quality.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Maximum width (pixels)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Frames wider than this are scaled down with the aspect ratio kept. Frames are never scaled up. 1280 is plenty for AI vision models. Use 0 to keep the original size.",
            "default": 1280
          },
          "quality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "1 to 100. Applies to JPG and WebP. PNG is always lossless.",
            "default": 85
          },
          "startSec": {
            "title": "Start (seconds)",
            "minimum": 0,
            "type": "number",
            "description": "Ignore everything before this point. Applies to interval, count and scenes modes.",
            "default": 0
          },
          "endSec": {
            "title": "End (seconds)",
            "minimum": 0.1,
            "type": "number",
            "description": "Ignore everything after this point. Leave empty to run to the end of the video."
          },
          "maxFramesPerVideo": {
            "title": "Maximum frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Safety cap per video, 1 to 1000. When a mode would produce more, interval and timestamps stop at the cap, and scenes keeps the strongest cuts.",
            "default": 100
          },
          "maxVideoSizeMb": {
            "title": "Maximum video file size (MB)",
            "minimum": 1,
            "maximum": 1024,
            "type": "integer",
            "description": "Videos larger than this are skipped for free (1 to 1024 MB). The Actor downloads each video once, so large files take longer.",
            "default": 200
          },
          "downloadTimeoutSecs": {
            "title": "Download time limit (seconds)",
            "minimum": 10,
            "maximum": 1800,
            "type": "integer",
            "description": "A video that is not fully downloaded within this time is skipped for free.",
            "default": 600
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}