{
  "openapi": "3.0.1",
  "info": {
    "title": "Video Frame Extractor: Extract Frames from Video, No Duplicates",
    "description": "Extract still frames from video file links (mp4, mov, webm, mkv). Scene changes, fixed intervals or exact timestamps. Near-duplicate and blurry frames are dropped before you pay.",
    "version": "0.1",
    "x-build-id": "buSwPltythDwHYSk7"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/northbell~video-frame-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-northbell-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/northbell~video-frame-extractor/runs": {
      "post": {
        "operationId": "runs-sync-northbell-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/northbell~video-frame-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-northbell-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 links",
            "type": "array",
            "description": "Direct links to video files, or leave empty and give a Dataset ID (mp4, mov, webm, mkv, m4v, avi), up to 2 GB each. Links to video sites (YouTube, TikTok, Instagram, Facebook, X, Vimeo, Twitch, Bilibili, Douyin) are not supported and come back as skipped, free.",
            "items": {
              "type": "string"
            }
          },
          "datasetId": {
            "title": "Dataset ID",
            "type": "string",
            "description": "Read video links from this Apify dataset (e.g. the dataset of a scraper run). Use {{resource.defaultDatasetId}} when you connect this Actor as an integration after another Actor."
          },
          "urlField": {
            "title": "Link field in the dataset",
            "type": "string",
            "description": "Name of the field that holds the link. If empty, each item is checked for videoUrl, video_url, url, link, downloadUrl, mediaUrl, src (in that order): the first with a link ending in a video extension is used, else the first with any http(s) link."
          },
          "maxVideos": {
            "title": "Max videos per run",
            "minimum": 1,
            "type": "integer",
            "description": "Cap on videos per run, counting the links above and the dataset together.",
            "default": 50
          },
          "mode": {
            "title": "How to pick frames",
            "enum": [
              "scenes",
              "interval",
              "times"
            ],
            "type": "string",
            "description": "Scene changes: a frame whenever the picture changes a lot (plus the first frame). Every N seconds: one frame per interval. Exact timestamps: the moments you list.",
            "default": "scenes"
          },
          "sceneThreshold": {
            "title": "Scene change threshold",
            "minimum": 0.01,
            "maximum": 1,
            "type": "number",
            "description": "Scenes mode only. 0 to 1; lower finds more changes. 0.3 suits most videos.",
            "default": 0.3
          },
          "everySeconds": {
            "title": "Every N seconds",
            "minimum": 0.5,
            "type": "number",
            "description": "Interval mode only.",
            "default": 10
          },
          "timestamps": {
            "title": "Timestamps",
            "type": "array",
            "description": "Times mode only. Seconds (12.5) or hh:mm:ss (00:01:30).",
            "items": {
              "type": "string"
            }
          },
          "dropDuplicates": {
            "title": "Drop near-duplicate frames",
            "type": "boolean",
            "description": "Drop a frame that looks almost the same as the last frame kept. Dropped frames are free.",
            "default": true
          },
          "duplicateDistance": {
            "title": "Duplicate distance",
            "minimum": 0,
            "maximum": 32,
            "type": "integer",
            "description": "A frame is a duplicate if its 64-bit picture hash differs from the last kept frame in this many bits or fewer. Higher drops more.",
            "default": 6
          },
          "dropBlurry": {
            "title": "Drop blurry frames",
            "type": "boolean",
            "description": "Drop frames whose sharpness score is below the minimum. Dropped frames are free.",
            "default": true
          },
          "minSharpness": {
            "title": "Minimum sharpness",
            "minimum": 0,
            "type": "number",
            "description": "Sharpness score (variance of the Laplacian on a 160 px wide grey copy). 0 turns the check off.",
            "default": 40
          },
          "maxFrames": {
            "title": "Max frames per video",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Frames kept and charged per video, at most.",
            "default": 50
          },
          "format": {
            "title": "Image format",
            "enum": [
              "jpg",
              "png",
              "webp"
            ],
            "type": "string",
            "description": "File type of the saved frames. JPG is smallest; PNG keeps every pixel; WebP is small and sharp.",
            "default": "jpg"
          },
          "width": {
            "title": "Resize to width (px)",
            "minimum": 64,
            "maximum": 7680,
            "type": "integer",
            "description": "Leave empty to keep the video's own size. The height follows."
          },
          "contactSheet": {
            "title": "Contact sheet",
            "type": "boolean",
            "description": "Also save one grid image of the kept frames per video. Charged as one frame.",
            "default": false
          },
          "onlyNewSinceLastRun": {
            "title": "Only videos not processed before",
            "type": "boolean",
            "description": "Skip video links you already processed in an earlier run of this Actor (remembered by link).",
            "default": false
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}