{
  "openapi": "3.0.1",
  "info": {
    "title": "TikTok Video Frame Extractor - Video to JPG, PNG & WebP",
    "description": "Turn TikTok videos into still images: frames every N seconds, evenly spaced, at scene changes, keyframes or exact times. Works with links and whole profiles.",
    "version": "1.0",
    "x-build-id": "eLTo4ddSbbLIEZE3g"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/seemuapps~tiktok-video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-seemuapps-tiktok-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/seemuapps~tiktok-video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-seemuapps-tiktok-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/seemuapps~tiktok-video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-seemuapps-tiktok-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": "TikTok video links",
            "type": "array",
            "description": "TikTok video URLs (tiktok.com/@user/video/...), short links (vm.tiktok.com) or video IDs, one per line (up to 500 per run). Photo slideshow links return their original photos.",
            "items": {
              "type": "string"
            }
          },
          "profiles": {
            "title": "TikTok profiles",
            "type": "array",
            "description": "TikTok usernames (with or without @) or profile links. The latest videos from each profile are processed, up to 'Videos per profile'.",
            "items": {
              "type": "string"
            }
          },
          "maxVideosPerProfile": {
            "title": "Videos per profile",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "How many of the latest posts to take from each profile (1-500).",
            "default": 10
          },
          "includePinned": {
            "title": "Include pinned posts",
            "type": "boolean",
            "description": "Also take the posts a creator pinned to the top of their profile. Off by default because pinned posts are often old, not the latest.",
            "default": false
          },
          "mode": {
            "title": "Extraction mode",
            "enum": [
              "count",
              "interval",
              "scenes",
              "keyframes",
              "timestamps"
            ],
            "type": "string",
            "description": "How frames are chosen. Count: N frames spread evenly across the video. Interval: one frame every N seconds. Scenes: one frame at each shot change. Keyframes: the video's own keyframes (I-frames). Timestamps: the exact times you list. Scenes mode is billed per minute of video scanned.",
            "default": "count"
          },
          "frameCount": {
            "title": "Number of frames (count mode)",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Count mode: how many frames to take per video. Each comes from the middle of an equal slice of the video, which avoids black first and last frames.",
            "default": 8
          },
          "intervalSeconds": {
            "title": "Interval in seconds (interval mode)",
            "minimum": 0.1,
            "type": "number",
            "description": "Interval mode: seconds between frames, starting at the start time. 0.5 gives two frames per second.",
            "default": 2
          },
          "sceneThreshold": {
            "title": "Scene sensitivity threshold (scenes mode)",
            "minimum": 0.01,
            "maximum": 0.99,
            "type": "number",
            "description": "Scenes mode: how different two consecutive frames must be to count as a new shot, from 0.01 to 0.99. Lower finds more scenes (0.2 catches soft cuts), higher finds only hard cuts (0.5).",
            "default": 0.3
          },
          "timestamps": {
            "title": "Timestamps (timestamps mode)",
            "type": "array",
            "description": "Timestamps mode: the times to capture in every video. Seconds (3 or 3.5), clock format (0:12, 00:00:12.250) or 12s all work. Times past the end of a video are skipped.",
            "items": {
              "type": "string"
            }
          },
          "startTime": {
            "title": "Start time",
            "type": "string",
            "description": "Optional. Ignore everything before this time, e.g. 2, 0:02 or 2s. Applies to every mode except timestamps."
          },
          "endTime": {
            "title": "End time",
            "type": "string",
            "description": "Optional. Ignore everything after this time, e.g. 30, 0:30 or 30s. Leave empty to run to the end of each video."
          },
          "maxFramesPerVideo": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Upper limit on frames per video in every mode. In scenes mode the strongest scene changes are kept; in keyframes mode the keyframes are sampled evenly.",
            "default": 50
          },
          "outputFormat": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File format of the saved frames. JPG is small and universal, PNG is lossless, WebP is small with high quality. Slideshow photos are always saved in their original format.",
            "default": "jpg"
          },
          "maxWidth": {
            "title": "Max frame width (px)",
            "minimum": 0,
            "maximum": 1280,
            "type": "integer",
            "description": "Frames are scaled down to at most this width, keeping the aspect ratio, and never scaled up. 0 keeps the best quality frames are cut from: TikTok's standard H.264 video, up to 720 px on the short side (720x1280 for portrait videos).",
            "default": 0
          },
          "includeSlideshows": {
            "title": "Include photo slideshows",
            "type": "boolean",
            "description": "Photo slideshow posts have no video to cut frames from, so their original full-size photos are saved instead (billed per photo). Turn off to skip slideshows free of charge.",
            "default": true
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image per video with all its frames (up to 100) side by side, each stamped with its timestamp. Its link is in the video summary row. Included in the price.",
            "default": false
          },
          "contactSheetColumns": {
            "title": "Contact sheet columns",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Number of frames per row on the contact sheet.",
            "default": 4
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}