# Video Frame Extractor: Keyframes + On-Screen Text for AI (`fraserlabs/video-frame-extractor`) Actor

Extract keyframes from Instagram, TikTok, Facebook or any video link: scene changes, every N seconds or N evenly spaced, each with timestamp and the text on it, plus a free contact sheet. Image links ready for vision AI. $2 per 1,000 frames.

- **URL**: https://apify.com/fraserlabs/video-frame-extractor.md
- **Developed by:** [FraserLabs](https://apify.com/fraserlabs) (community)
- **Categories:** AI, Videos, Social media
- **Stats:** 1 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.00 / 1,000 frames

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Video Frame Extractor: Keyframes + On-Screen Text for AI

Paste video links, get back **the key frames as image links**, each with its **timestamp** and the **text visible on it**, plus a **contact sheet** of the whole video. Ready for GPT-4o, Claude, Gemini or any vision pipeline.

**$2 per 1,000 frames** ($0.002 per frame). The contact sheet is free. Works with **Instagram Reels, TikTok and Facebook links** as well as direct video files. No login, no cookies.

### What you can use it for

- **Feed video to vision models.** Send 10-20 keyframes instead of a whole video: cheaper, faster and within context limits.
- **Ad and content research.** See every scene of a competitor's Reel or TikTok at a glance, with the on-screen text already extracted.
- **Thumbnails and storyboards.** Pick cover images, build storyboards, or check how a video is cut.
- **Dataset building.** Collect labelled frames (timestamp + visible text) from many videos.

### Why this Actor

| | This Actor | Typical frame extractor |
|---|---|---|
| Instagram, TikTok and Facebook links | **Yes**, paste the post link | Direct file links only |
| Scene-change keyframes | Yes (adaptive: few frames for a talking head, more for fast edits) | Yes |
| Every N seconds / N evenly spaced | Yes | Yes |
| **Text visible on each frame** | **Yes** (`on_screen_text`) | No |
| Contact sheet with timestamps | Yes, free | Sometimes |
| Price | **$2 / 1,000 frames** | $2-6 / 1,000 frames, some add a per-run fee |

### Sample output

From a public National Geographic TikTok (scene mode, 32 s, shortened):

```json
{
  "url": "https://www.tiktok.com/@natgeo/video/7695025994326969614",
  "platform": "tiktok",
  "duration_s": 32.28,
  "mode": "scenes",
  "frame_count": 15,
  "frames": [
    { "index": 1, "time_s": 2.5, "width": 576, "height": 1024,
      "on_screen_text": "QUEENS Grandmother orcas use decades of experience to feed their families.",
      "url": "https://api.apify.com/v2/key-value-stores/<run-store>/records/frame-7695025994326969614-001.jpg" },
    { "index": 3, "time_s": 5.0, "width": 576, "height": 1024,
      "on_screen_text": "QUEEN Orcas are among the very few animals known to experience menopaus",
      "url": "https://api.apify.com/v2/key-value-stores/<run-store>/records/frame-7695025994326969614-003.jpg" }
  ],
  "contact_sheet_url": "https://api.apify.com/v2/key-value-stores/<run-store>/records/sheet-7695025994326969614.jpg",
  "status": "ok"
}
```

Image links open without an Apify token, so you can pass them straight to a vision model. They stay available as long as the run's storage is kept (see your Apify data retention).

#### Output fields

| Field | Meaning |
|---|---|
| `frames[].url` | JPEG link of the frame. |
| `frames[].time_s` | Position in the video, seconds. |
| `frames[].on_screen_text` | Text visible on the frame (titles, captions, slides). Empty when there is none or the option is off. |
| `frames[].width`, `height` | Frame size in pixels. |
| `frame_count` | Number of frames extracted (and charged). |
| `contact_sheet_url` | One grid image with every frame and its timestamp (free). |
| `platform`, `id`, `creator`, `title`, `duration_s` | Source metadata when available. |
| `status` | `ok`, or `error` with an `error` message. Failed videos are **not charged**. |

### How to use it

1. Paste one or more public video links into **Video URLs**: Instagram Reels, TikTok videos, Facebook Reels/videos, direct files (`.mp4`, `.mov`, `.webm` ...) or pages with an embedded video.
2. Choose **Which frames**: scene changes (default), every N seconds, or N evenly spaced frames. Set **Max frames per video** (default 20).
3. Click **Start**, then use the image links from the results, or download everything as JSON, CSV or Excel.

Input example:

```json
{
  "urls": ["https://www.tiktok.com/@natgeo/video/7695025994326969614"],
  "mode": "scenes",
  "maxFrames": 20,
  "includeOnScreenText": true
}
```

A typical short video takes 3 to 15 seconds. Videos are processed one after another within a run.

### Pricing

- **$0.002 per extracted frame** ($2 per 1,000). A 30-second Reel in scene mode typically gives 6 to 18 frames ($0.012-0.036).
- **Max frames per video** caps the cost of every video. The contact sheet is free.
- Videos that fail (private, deleted, login-only, unavailable) are **not charged**. Videos longer than 60 minutes are skipped and not charged.
- Set **Maximum cost per run** in the run options to cap your spend.

### Settings

| Setting | Default | What it does |
|---|---|---|
| Video URLs | (required) | Public video links, one per line. |
| Which frames | scenes | `scenes`, `interval` or `count`. |
| Max frames per video | 20 | Upper limit per video, all modes. |
| Seconds between frames | 5 | For `interval` mode. |
| Number of frames | 10 | For `count` mode. |
| Frame size | 720 | Short side in pixels (never upscaled). |
| Read text on each frame | on | Adds `on_screen_text` per frame. |
| Contact sheet | on | One grid image per video (free). |

### Limitations

- **Public videos only.** Private accounts, deleted posts and anything that needs a login return `status: "error"` and are not charged.
- **TikTok** frames come from TikTok's public embed copy, which carries TikTok's moving watermark (the watermark text is removed from `on_screen_text`).
- **Facebook** frames are often 360 px wide: for most Reels, Facebook only offers higher resolutions in a codec this Actor does not decode yet.
- **YouTube** is not supported. Videos are limited to 60 minutes.
- Need transcripts too? Use the sister Actors: [Instagram](https://apify.com/fraserlabs/instagram-reels-transcript), [TikTok](https://apify.com/fraserlabs/tiktok-transcript), [Facebook](https://apify.com/fraserlabs/facebook-reels-transcript) or [any audio/video link](https://apify.com/fraserlabs/audio-video-transcript).

### FAQ

**Do I need an account or cookies on Instagram, TikTok or Facebook?** No. The Actor reads only what any logged-out visitor can see.

**Is this legal?** The Actor processes publicly available videos and collects no personal data beyond the public post's creator name. You are responsible for how you use the output under the platform's terms and the laws that apply to you (e.g. copyright, GDPR).

**Something wrong with a result?** Open an issue on the Actor's Issues tab with the video URL. Reliability fixes ship within 24 hours.

# Actor input Schema

## `urls` (type: `array`):

Public video links, one per line: direct files (.mp4, .mov, .webm ...), Instagram Reels, TikTok videos, Facebook Reels/videos, or pages with an embedded video. No login needed. You pay per extracted frame.

## `mode` (type: `string`):

scenes = one frame at each visual change (shot cuts, new text cards); interval = one frame every N seconds; count = N frames evenly spaced.

## `maxFrames` (type: `integer`):

Upper limit per video (all modes). In scene mode the biggest changes are kept.

## `intervalSeconds` (type: `number`):

Used when 'Which frames' is 'Every N seconds'.

## `frameCount` (type: `integer`):

Used when 'Which frames' is 'N evenly spaced frames'.

## `width` (type: `integer`):

Frames are scaled so the shorter side is at most this many pixels (never upscaled).

## `includeOnScreenText` (type: `boolean`):

Adds the text visible on each frame (titles, captions, slides) as on_screen_text.

## `contactSheet` (type: `boolean`):

One extra image per video with all frames in a grid and their timestamps (free).

## `proxyConfiguration` (type: `object`):

Leave empty: the Actor uses Apify datacenter proxy and switches to residential automatically only when a site blocks a request.

## Actor input object example

```json
{
  "urls": [
    "https://www.tiktok.com/@natgeo/video/7695025994326969614"
  ],
  "mode": "scenes",
  "maxFrames": 20,
  "intervalSeconds": 5,
  "frameCount": 10,
  "width": 720,
  "includeOnScreenText": true,
  "contactSheet": true
}
```

# Actor output Schema

## `results` (type: `string`):

One item per video: frame image links with timestamps and on-screen text, plus a contact sheet.

## `images` (type: `string`):

All frame JPEGs and contact sheets of this run.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://www.tiktok.com/@natgeo/video/7695025994326969614"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("fraserlabs/video-frame-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": ["https://www.tiktok.com/@natgeo/video/7695025994326969614"] }

# Run the Actor and wait for it to finish
run = client.actor("fraserlabs/video-frame-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.tiktok.com/@natgeo/video/7695025994326969614"
  ]
}' |
apify call fraserlabs/video-frame-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,fraserlabs/video-frame-extractor"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/0DxrYGpn1VjpwnwOP/builds/eBtNVcZcomZxaR5dr/openapi.json
