Extract frames from YouTube videos, to the millisecond
Get JPEG frames from any YouTube video: at exact timestamps, one every N seconds, N evenly spaced, or one per chapter, at 360p to 1080p. Put a video's frames on one labelled contact sheet, ideal for an AI vision model. Only the seconds around each frame are downloaded.
What you get
Four ways to choose frames
Exact timestamps, every N seconds, N evenly spaced, or one per chapter.
Millisecond precision
The first frame at or after the time you give, decoded exactly.
Fast on long videos
Downloads only the few seconds that hold each frame.
Contact sheets
All of a video's frames on one labelled grid image.
Chapter titles
Chapter mode adds each chapter's title, start and end.
Failed frames are free
A frame past the end or from a private video is reported, not charged.
Who it is for
AI vision and agents
Send a contact sheet to a vision model instead of a video.
Thumbnails and previews
Grab the exact moment you want, at up to 1080p.
Computer vision datasets
Sample frames evenly across many videos.
Articles and course notes
One image per chapter for summaries and docs.
How to use it
- Open the Actor on Apify and sign in.
- Paste video links (up to 500) and choose what to capture.
- Pick a resolution, and tick contact sheet if you want one grid per video.
- Click Start; each frame comes back with an imageUrl.
Call it from code
curl -X POST "https://api.apify.com/v2/acts/ttechx~youtube-video-frame-extractor/run-sync-get-dataset-items" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"videos": ["https://www.youtube.com/watch?v=Ap8jTCMK3c4"], "mode": "evenly", "frameCount": 16, "resolution": "720", "contactSheet": true}'from apify_client import ApifyClient # pip install apify-client
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("ttechx/youtube-video-frame-extractor").call(run_input={
"videos": [
"https://www.youtube.com/watch?v=Ap8jTCMK3c4"
],
"mode": "evenly",
"frameCount": 16,
"resolution": "720",
"contactSheet": True
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)Get your token in Apify Console > Settings > API & Integrations. In n8n, Make or Zapier, use the Apify app and pick this Actor.
- Open the API on RapidAPI and subscribe to a plan (there is a free plan to try it).
- GET /video/frame for one frame, POST /video/frame for several, POST /video/sheet for a contact sheet.
- Download each JPEG from its link.
| Endpoint | Required | Returns |
|---|---|---|
GET /video/frame | id, timeStamp | One frame at a timestamp |
POST /video/frame | id + timeStamps or mode | Several frames of one video |
POST /video/sheet | id + timeStamps or mode | A contact sheet: up to 100 frames on one labelled JPEG |
Call it from code
curl --request GET \
--url 'https://youtube-video-frame-extractor.p.rapidapi.com/video/frame?id=Ap8jTCMK3c4&timeStamp=00:00:56.300&resolution=1080' \
--header 'x-rapidapi-host: youtube-video-frame-extractor.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY'import requests
HOST = "youtube-video-frame-extractor.p.rapidapi.com"
HEADERS = {"x-rapidapi-key": "YOUR_RAPIDAPI_KEY", "x-rapidapi-host": HOST}
# 16 evenly spaced frames on one contact sheet
sheet = requests.post(f"https://{HOST}/video/sheet", headers=HEADERS, json={
"id": "Ap8jTCMK3c4", "mode": "evenly", "frameCount": 16, "columns": 4,
}).json()
print(sheet["link"])Input
| Field | Type | What it does | |
|---|---|---|---|
videos | array of strings | Required | Video URLs or 11-character ids, up to 500. |
mode | timestamps | interval | evenly | chapters | How to choose frames. Default timestamps. | |
timestamps | array of strings | Timestamps mode: HH:MM:SS or HH:MM:SS.mmm, up to 1,000 per run. | |
intervalSeconds | number, 0.1+ | Interval mode: seconds between frames. | |
frameCount | integer, 1-1,000 | Evenly mode: frames per video. | |
position | start | middle | Chapters mode: where in each chapter. | |
startTime, endTime | HH:MM:SS[.mmm] | Optional range for interval, evenly and chapters modes. | |
resolution | 360 | 480 | 720 | 1080 | Frame height. Default 720. | |
contactSheet, sheetColumns, sheetTileWidth | boolean, 1-10, 120-640 | One labelled grid per video, and its layout. |
{
"videos": [
"https://www.youtube.com/watch?v=Ap8jTCMK3c4"
],
"mode": "evenly",
"frameCount": 16,
"resolution": "720",
"contactSheet": true
}| Parameter | Type | What it does |
|---|---|---|
id | string | YouTube video id (11 characters) |
timeStamp / timeStamps | HH:MM:SS[.mmm] | One time (GET), or up to 128 (100 on a sheet) |
mode | timestamps | interval | evenly | chapters | How to choose frames (POST) |
intervalSeconds, frameCount, position | number, integer, start | middle | Settings of the interval, evenly and chapters modes |
startTime, endTime | HH:MM:SS[.mmm] | Optional range |
offset, limit | integer | Paging for the interval, evenly and chapters modes |
resolution | 360 | 480 | 720 | 1080 | Default 720 (360 on a sheet) |
columns, tileWidth, labels | sheet | Grid layout of a contact sheet |
Output
One row per video and frame:
| Field | What it is |
|---|---|
imageUrl, imageKey | Link to the JPEG and its key in the run's storage |
timestamp | The time of the frame |
resolution | The size you got, by the shorter side |
status, error | OK, or fail with the reason |
chapterTitle, chapterStart, chapterEnd | Chapters mode only |
videoId, videoUrl | The video |
Contact sheets are saved as <videoId>_sheet.jpg in the run's key-value store.
{
"videoId": "Ap8jTCMK3c4",
"videoUrl": "https://www.youtube.com/watch?v=Ap8jTCMK3c4",
"timestamp": "00:01:10.500",
"resolution": "720p",
"status": "OK",
"imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/Ap8jTCMK3c4_00-01-10.500_720p.jpg",
"imageKey": "Ap8jTCMK3c4_00-01-10.500_720p.jpg",
"error": null
}POST /video/frame with two timestamps:
| Field | What it is |
|---|---|
status | OK (all frames), partial (some) or fail (none) |
summary | requested, succeeded and failed counts |
results[].link | The JPEG link, keyed by resolution |
results[].timeStamp, status, msg | Each frame's time, status and error message |
GET /video/frame answers {"link": {"1080p": "https://...jpg"}, "status": "OK", "msg": ""}.
{
"status": "OK",
"msg": "",
"id": "Ap8jTCMK3c4",
"resolution": "720p",
"summary": {
"requested": 2,
"succeeded": 2,
"failed": 0
},
"results": [
{
"timeStamp": "00:00:50",
"link": {
"720p": "https://...jpg"
},
"status": "OK",
"msg": ""
},
{
"timeStamp": "00:01:10.500",
"link": {
"720p": "https://...jpg"
},
"status": "OK",
"msg": ""
}
]
}Use it with AI agents
Through Apify the Actor is one tool, ttechx/youtube-video-frame-extractor. Through RapidAPI you get 3 tools: getFrame, getFrames and getSheet. Pick your assistant:
Through Apify
Run this, then type /mcp in Claude Code and sign in to Apify.
claude mcp add --transport http ttech-frame "https://mcp.apify.com/?tools=ttechx/youtube-video-frame-extractor"No browser sign-in? Add --header "Authorization: Bearer YOUR_APIFY_TOKEN".
Through RapidAPI
claude mcp add --transport http ttech-frame https://mcp.rapidapi.com \
--header "x-api-host: youtube-video-frame-extractor.p.rapidapi.com" \
--header "x-api-key: YOUR_RAPIDAPI_KEY"Through Apify
- Open Settings > Connectors in claude.ai or Claude Desktop.
- Choose Add custom connector, name it, and paste this URL:
https://mcp.apify.com/?tools=ttechx/youtube-video-frame-extractor- Connect and sign in with your Apify account.
Through RapidAPI
Claude Desktop: add to claude_desktop_config.json (Settings > Developer > Edit Config; needs Node.js), then restart.
{
"mcpServers": {
"ttech-frame": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.rapidapi.com",
"--header",
"x-api-host:youtube-video-frame-extractor.p.rapidapi.com",
"--header",
"x-api-key:YOUR_RAPIDAPI_KEY"
]
}
}
}Through Apify
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project), then sign in when Cursor asks.
{
"mcpServers": {
"ttech-frame": {
"url": "https://mcp.apify.com/?tools=ttechx/youtube-video-frame-extractor"
}
}
}Through RapidAPI
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"ttech-frame": {
"url": "https://mcp.rapidapi.com",
"headers": {
"x-api-host": "youtube-video-frame-extractor.p.rapidapi.com",
"x-api-key": "YOUR_RAPIDAPI_KEY"
}
}
}
}Through Apify
Add to ~/.codex/config.toml and set APIFY_TOKEN in your environment.
[mcp_servers.ttech_frame]
url = "https://mcp.apify.com/?tools=ttechx/youtube-video-frame-extractor"
bearer_token_env_var = "APIFY_TOKEN"Through RapidAPI
Add to ~/.codex/config.toml and set RAPIDAPI_KEY in your environment.
[mcp_servers.ttech_frame]
url = "https://mcp.rapidapi.com"
http_headers = { "x-api-host" = "youtube-video-frame-extractor.p.rapidapi.com" }
env_http_headers = { "x-api-key" = "RAPIDAPI_KEY" }Through Apify
- In ChatGPT on the web, open Plugins, select + and Add custom MCP server (available on plans that allow custom MCP servers).
- Paste this URL and choose OAuth:
https://mcp.apify.com/?tools=ttechx/youtube-video-frame-extractor- Sign in with your Apify account and review the tools.
Through RapidAPI
RapidAPI's MCP server needs two request headers (x-api-host and x-api-key). If your ChatGPT plan's custom MCP screen has no place for them, copy the brief below into ChatGPT and let it write the code for you.
Through Apify
Add to .vscode/mcp.json, then start the server and sign in.
{
"servers": {
"ttech-frame": {
"type": "http",
"url": "https://mcp.apify.com/?tools=ttechx/youtube-video-frame-extractor"
}
}
}Through RapidAPI
Add to .vscode/mcp.json:
{
"servers": {
"ttech-frame": {
"type": "http",
"url": "https://mcp.rapidapi.com",
"headers": {
"x-api-host": "youtube-video-frame-extractor.p.rapidapi.com",
"x-api-key": "YOUR_RAPIDAPI_KEY"
}
}
}
}Brief for any LLM
Endpoints, inputs, outputs, examples and MCP setup in one Markdown text. Paste it into ChatGPT, Claude or Gemini and ask for the code you need. Also at /youtube-frame-extractor.md.
Good to know
- Live streams that are still live are not supported. Private, deleted, region-locked and age-restricted videos fail with an error.
- At most 1,000 frames per video in the interval, evenly and chapters modes.
- Videos without chapters fail in chapters mode, free.
FAQ
Which frame do I get?
The first frame at or after the timestamp, so at most one frame later (up to 33 ms at 30 fps).
What is a contact sheet good for?
A whole video at a glance, or one image to send to an AI vision model instead of many.
Apify or RapidAPI?
Apify for many videos per run and stored files; RapidAPI for direct requests from your own code.