{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: MP4, TikTok, Instagram Reels to Images",
    "description": "Extract still frames from MP4, WebM and MOV links, TikTok videos and Instagram reels: every N seconds, N evenly spaced, at the times you list or at each scene change. One row per frame with its image link, timestamp, width and height. Max resolution, blank frame skip. No login.",
    "version": "0.1",
    "x-build-id": "dwT86x2uEf2HCclj0"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/themineworks~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-themineworks-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/themineworks~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-themineworks-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/themineworks~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-themineworks-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 links",
            "type": "array",
            "description": "One link per line: a direct link to a video file (.mp4, .webm, .mov, .mkv, .m4v), a TikTok video (https://www.tiktok.com/@user/video/123... or a vm.tiktok.com share link) or an Instagram reel or video post (https://www.instagram.com/reel/CODE/). Up to 200 videos per run. YouTube links are not supported yet.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Which frames",
            "enum": [
              "interval",
              "count",
              "timestamps",
              "scenes"
            ],
            "type": "string",
            "description": "interval: one frame every N seconds. count: N frames spread evenly over the video. timestamps: the exact times you list. scenes: one frame per scene change (the opening shot plus each cut).",
            "default": "interval"
          },
          "intervalSeconds": {
            "title": "Seconds between frames (interval)",
            "minimum": 0.1,
            "maximum": 3600,
            "type": "number",
            "description": "Interval mode: one frame every this many seconds, starting at the start time. 0.5 gives two frames a second. Example: 5.",
            "default": 5
          },
          "frameCount": {
            "title": "Number of frames (count)",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Count mode: how many frames to take. Each comes from the middle of an equal slice of the video, which avoids the black first and last frames. Example: 10.",
            "default": 10
          },
          "timestamps": {
            "title": "Times (timestamps)",
            "type": "array",
            "description": "Timestamps mode: the times to capture, one per line. Seconds (90 or 90.5), clock time (1:30 or 00:01:30.250) or 1m30s. Times past the end of a video are skipped and not charged.",
            "items": {
              "type": "string"
            }
          },
          "sceneThreshold": {
            "title": "Scene sensitivity (scenes)",
            "minimum": 0.05,
            "maximum": 0.95,
            "type": "number",
            "description": "Scenes mode: how different two frames in a row must be to count as a cut, 0.05 to 0.95. Lower finds more cuts (0.2 catches soft cuts), higher only hard cuts. Default 0.3.",
            "default": 0.3
          },
          "startTime": {
            "title": "Start time (optional)",
            "type": "string",
            "description": "Ignore everything before this time, for example 30, 0:30 or 1m. Applies to interval, count and scenes."
          },
          "endTime": {
            "title": "End time (optional)",
            "type": "string",
            "description": "Ignore everything after this time, for example 300, 5:00 or 5m. Leave empty to run to the end."
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Upper limit on frames for each video, 1 to 1,000. Interval and timestamps keep the first ones; scenes keeps the strongest cuts. You pay only for frames delivered.",
            "default": 50
          },
          "maxResolution": {
            "title": "Max resolution (longest side, px)",
            "minimum": 0,
            "maximum": 4096,
            "type": "integer",
            "description": "Frames are scaled down so their longest side is at most this many pixels, keeping the shape, never enlarged. 1280 gives 1280x720 from a landscape video and 720x1280 from a TikTok. 0 keeps the original size. For TikTok and Instagram the smallest copy of the video that reaches this size is downloaded.",
            "default": 1280
          },
          "imageFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "jpg is small and opens everywhere, png is lossless and larger, webp is small with high quality.",
            "default": "jpg"
          },
          "skipBlankFrames": {
            "title": "Step past blank frames",
            "type": "boolean",
            "description": "On: a frame that is one flat colour (black at a fade in or a cut, white, a single colour card) is replaced by the first frame with content up to 2 seconds later, never past the next frame; if there is none it is dropped and not charged. Title cards (text on black) are kept. Timestamps mode always keeps the exact times. Each moved frame says where it was planned in stepped_from_sec.",
            "default": true
          },
          "maxDownloadMbPerVideo": {
            "title": "Max download per video (MB)",
            "minimum": 1,
            "maximum": 4000,
            "type": "integer",
            "description": "Safety limit on video data read for one video. Interval, count and timestamps read only the parts of a large file they need (10 frames of a 300 MB film read about 24 MB); scenes mode reads the whole file. Default 500.",
            "default": 500
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}