YouTube screenshot API
Screenshot a YouTube video at an exact timestamp
Send a public YouTube URL and a start time. Frameskim returns the frame at that second as an image file, with its timestamp, taken from the video itself and not from a page with the player around it.
$0.615 for this run: $0.60 per video in HD plus $0.015 per frame ($0.135 with the standard quality, $0.12 per video). A run that fails is not charged.
NASA’s Perseverance descent video, the frame at 0:35 of recorded run f8TXd8IVEg1CiiKqZ (the picture is the same second from another recorded run of that video). Courtesy NASA/JPL-Caltech.
Input and output
{
"mode": "frames",
"url": "https://youtu.be/4czjS9h4Fpg",
"start": "0:35",
"maxFrames": 1,
"quality": "hd"
}start takes seconds, M:SS or H:MM:SS. maxFrames: 1 returns the frame at start and nothing else. The recorded run used quality: hd, which pays for a full-resolution attempt.
{
"videoId": "4czjS9h4Fpg", "t": 35.0, "ts": "0:00:35",
"imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/frame-000-35000.jpg",
"width": 854, "height": 480, "source": "media"
}Values shortened. imageUrl is a signed link that opens without a token. A last item summarizes the run.
More than one timestamp
Give a range and an interval to get a frame every N seconds, for example one every 10 seconds from 0:35 to 2:25. The segment mode adds the words spoken between each frame and the next, and the moments mode finds the second that answers a question in plain language. For the words of the whole video, see the YouTube transcript API.
{
"mode": "frames",
"url": "https://youtu.be/4czjS9h4Fpg",
"start": "0:35", "end": "2:25", "every": 10
}Pricing
$0.12 per video + $0.015 per frame
With quality: hd, as in the example above, the video costs $0.60 instead of $0.12.
Pay per event on Apify, no subscription, and never more than the spending limit you set for the run. A frame taken from YouTube’s storyboard instead of the video costs $0.002.
Limits
- One public video per run. Channels, playlists and searches are not accepted.
- Frames come from the video itself, up to 480p. If YouTube blocks the download, Frameskim falls back to low-resolution storyboard frames and says so in the run summary.
- A run that ends with an error says “Nothing was charged.”
Call it from your code
curl -X POST "https://api.apify.com/v2/acts/emttn~frameskim/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url": "https://youtu.be/4czjS9h4Fpg", "start": "0:35", "maxFrames": 1, "quality": "hd"}'It needs an Apify API token. The same actor is available to agents over MCP.