{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Thumbnails, Keyframes, Scene Changes",
    "description": "Extract still frames from your video files (MP4, MOV, WebM, MKV): exact timestamps, every N seconds, N evenly spaced thumbnails, keyframes or scene changes, as JPEG, PNG or WebP with timecodes. Direct file links only, no YouTube or social media pages. Broken links and non-video files are free.",
    "version": "0.1",
    "x-build-id": "dXLXKIuxCFb4u8LMG"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/greenrun~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-greenrun-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/greenrun~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-greenrun-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/greenrun~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-greenrun-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 or https links to video files (MP4, MOV, WebM, MKV, AVI, MPEG-TS, 3GP, OGV and other formats ffmpeg reads), one per line. Pages of YouTube, TikTok, Instagram and other video platforms are not files: they are returned free with the reason. Each video becomes one row with the list of its frames.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Video URLs from a dataset (optional)",
            "type": "string",
            "description": "Also take the video links found in this dataset, for example the output of another Actor. Pick the field below. Up to 5,000 items are read, and only as many as the run has paid for at that point (about 2,000 at 2 GB of memory); split larger datasets."
          },
          "datasetField": {
            "title": "Dataset field with the links",
            "type": "string",
            "description": "Field of each dataset item that holds the video link. Dot paths and lists work: url, videoUrl, media.video, videos.url.",
            "default": "url"
          },
          "keyValueStoreId": {
            "title": "Videos from a key-value store (optional)",
            "type": "string",
            "description": "Read video files stored as records of this key-value store (for example files you uploaded through the Apify API). Choosing the store here gives the Actor read access."
          },
          "keyValueStoreKeys": {
            "title": "Record keys in that store",
            "type": "array",
            "description": "Keys of the video records to read. Leave empty to read every record whose key ends with a video extension (.mp4, .mov, .webm ...).",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "count",
              "interval",
              "timestamps",
              "keyframes",
              "scenes"
            ],
            "type": "string",
            "description": "count: N frames spread evenly over the video (or the range below). interval: one frame every N seconds. timestamps: the exact moments you list. keyframes: the encoder's keyframes, the cheapest to decode. scenes: one frame per scene change.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames (count)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "For mode count: how many frames spread evenly over the video (or the range below). Each frame is the centre of its part of the video, or a keyframe close to it (within a quarter of the part, at most 5 s), which is much faster to decode; requestedTime in the output shows the centre.",
            "default": 10
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval)",
            "minimum": 0.04,
            "maximum": 86400,
            "type": "number",
            "description": "For mode interval: one frame every this many seconds, from the start time. Decimals work, e.g. 0.5 for two frames per second.",
            "default": 10
          },
          "timestamps": {
            "title": "Timestamps (timestamps)",
            "type": "array",
            "description": "For mode timestamps: moments in seconds (12.5) or as HH:MM:SS.mmm (00:01:02.500), one per line. You get the first frame shown at or after each moment.",
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Only frames from this moment on, e.g. 30 or 00:00:30. Empty: the start of the video."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Only frames up to this moment, e.g. 90 or 00:01:30. Empty: the end of the video."
          },
          "sceneThreshold": {
            "title": "Scene change sensitivity (scenes)",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "For mode scenes: how different two frames must be to count as a new scene (ffmpeg scene score, 0 to 1). Lower finds more scenes; 0.3 suits most videos.",
            "default": 0.3
          },
          "accurateScenes": {
            "title": "Accurate scene detection (scenes)",
            "type": "boolean",
            "description": "Off: scenes are found among the keyframes, fast and charged per frame only. On: every frame is compared, which finds every cut but decodes the whole video, charged per scanned minute.",
            "default": false
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of frames from one video in any mode.",
            "default": 100
          },
          "skipBlankFrames": {
            "title": "Skip blank frames",
            "type": "boolean",
            "description": "Leave out frames that are one flat colour (black, white, a fade). They were decoded like the others, so each still counts as one frame. If every frame is blank, they are returned anyway.",
            "default": false
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "Format of the frame images.",
            "default": "jpg"
          },
          "imageQuality": {
            "title": "Image quality",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "JPEG and WebP quality from 1 to 100. PNG is lossless and ignores it.",
            "default": 85
          },
          "maxWidth": {
            "title": "Max image width (px)",
            "minimum": 0,
            "maximum": 7680,
            "type": "integer",
            "description": "Wider frames are scaled down to this width, keeping the aspect ratio. 0 keeps the original size.",
            "default": 1280
          },
          "contactSheet": {
            "title": "Also make a contact sheet",
            "type": "boolean",
            "description": "One JPEG grid per video with all frames (up to 100) and their timecodes, for a quick look or one image for an AI model. Free.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Frames per row of the contact sheet.",
            "default": 5
          },
          "maxScanMinutes": {
            "title": "Max scanned minutes per video",
            "minimum": 0,
            "maximum": 600,
            "type": "integer",
            "description": "Most minutes of video one video may decode in full (accurate scene detection, or videos with very few keyframes). A video that needs more is skipped for free with the reason. 0: never pay for scanned minutes.",
            "default": 60
          },
          "maxVideoSizeMb": {
            "title": "Max video size (MB)",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Larger files are skipped for free. A run gets twice its memory as disk, so files above about 3 GB need more memory.",
            "default": 1000
          },
          "maxConcurrency": {
            "title": "Parallel videos",
            "minimum": 1,
            "maximum": 8,
            "type": "integer",
            "description": "Videos downloaded at the same time. Decoding uses one CPU core per 4 GB of memory, so a download overlaps with the decoding of another video.",
            "default": 2
          },
          "timeoutSecs": {
            "title": "Timeout per video (seconds)",
            "minimum": 60,
            "maximum": 7200,
            "type": "integer",
            "description": "Download and extraction of one video that take longer fail for free.",
            "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}