YepAPI
YouTube API

YouTube Screenshot

Capture a screenshot of a YouTube video at a specific timestamp.

POST/v1/youtube/screenshot
$0.01/call

Usage

const res = await fetch('https://api.yepapi.com/v1/youtube/screenshot', {
  method: 'POST',
  headers: {
    'x-api-key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ id: 'dQw4w9WgXcQ', timestamp: '00:00:50' }),
});
const { data } = await res.json();
console.log(data.link);
curl -X POST https://api.yepapi.com/v1/youtube/screenshot \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id": "dQw4w9WgXcQ", "timestamp": "00:00:50"}'

Request Body

ParameterTypeRequiredDescriptionDefault
idstringYesYouTube video ID
timestampstringNoTime in HH:MM:SS format00:00:50

Response

{
  "ok": true,
  "data": {
    "link": ["https://screenshot-url.jpg"],
    "status": "done"
  }
}

Response Fields

FieldTypeDescription
okbooleanWhether the request succeeded
data.linkstring[]Array containing the URL(s) of the captured screenshot image(s)
data.statusstringProcessing status: done when the screenshot is ready

On this page