Skip to main content
POST
/
api
/
v1
/
youtube
/
video
Get YouTube video
curl --request POST \
  --url https://app.dumplingai.com/api/v1/youtube/video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://www.youtube.com/watch?v=PkZNo7MFNFg",
  "get_transcript": true
}'
{
  "id": "<string>",
  "thumbnail": "<string>",
  "type": "<string>",
  "title": "<string>",
  "description": "<string>",
  "commentCountText": "<string>",
  "commentCountInt": 123,
  "likeCountText": "<string>",
  "likeCountInt": 123,
  "viewCountText": "<string>",
  "viewCountInt": 123,
  "publishDateText": "<string>",
  "publishDate": "2023-11-07T05:31:56Z",
  "channel": {},
  "durationMs": 123,
  "durationFormatted": "<string>",
  "watchNextVideos": [
    {
      "id": "<string>",
      "title": "<string>",
      "thumbnail": "<string>",
      "url": "<string>",
      "type": "<string>",
      "publishDateText": "<string>",
      "publishDate": "2023-11-07T05:31:56Z",
      "viewCountText": "<string>",
      "viewCountInt": 123,
      "lengthText": "<string>",
      "channel": {}
    }
  ],
  "keywords": [
    "<string>"
  ],
  "transcript": [
    {
      "text": "<string>",
      "startMs": "<string>",
      "endMs": "<string>",
      "startTimeText": "<string>"
    }
  ],
  "transcript_only_text": "<string>"
}

Description

This endpoint retrieves comprehensive information about a YouTube video including metadata, statistics, channel information, and optionally the video transcript. Works with both regular videos and shorts.

Endpoint

POST https://app.dumplingai.com/api/v1/youtube/video

Headers

  • Content-Type: application/json
  • Authorization: Bearer <API_KEY> (required)

Request Body

{
  "url": "string", // Required. Full YouTube video URL
  "get_transcript": "boolean" // Optional. Whether to include transcript data. Default: false
}

Responses

Success (200)

Returns complete video information including metadata, statistics, and optionally transcript data.
{
  "id": "PkZNo7MFNFg",
  "thumbnail": "https://i.ytimg.com/vi/PkZNo7MFNFg/maxresdefault.jpg",
  "type": "video",
  "title": "JavaScript Tutorial for Beginners: Learn JS in 1 Hour",
  "description": "This comprehensive JavaScript tutorial covers all the fundamentals you need to get started with programming...",
  "commentCountText": "1.2M",
  "commentCountInt": 1200000,
  "likeCountText": "12M",
  "likeCountInt": 12000000,
  "viewCountText": "1.5B",
  "viewCountInt": 1500000000,
  "publishDateText": "Oct 25, 2009",
  "publishDate": "2009-10-25T00:00:00.000Z",
  "channel": {
    "id": "UCWv7vMbMWH4-V0ZXdmDpPBA",
    "url": "https://www.youtube.com/@programmingwithmosh",
    "handle": "programmingwithmosh",
    "title": "Programming with Mosh"
  },
  "durationMs": 212000,
  "durationFormatted": "3:32",
  "watchNextVideos": [
    {
      "id": "anotherVideoId",
      "title": "Related Video Title",
      "thumbnail": "https://i.ytimg.com/vi/anotherVideoId/maxresdefault.jpg",
      "channel": {
        "title": "Channel Name",
        "url": "https://www.youtube.com/channel/channelId",
        "handle": "@channelhandle",
        "id": "channelId"
      },
      "publishDateText": "Jan 1, 2023",
      "publishDate": "2023-01-01T00:00:00.000Z",
      "viewCountText": "1M",
      "viewCountInt": 1000000,
      "lengthText": "4:20",
      "videoUrl": "https://www.youtube.com/watch?v=anotherVideoId"
    }
  ],
  "keywords": ["javascript", "programming", "tutorial", "beginner"],
  "transcript": [
    {
      "text": "Welcome to this comprehensive JavaScript tutorial",
      "startMs": "0",
      "endMs": "2500",
      "startTimeText": "0:00"
    },
    {
      "text": "You know the rules and so do I",
      "startMs": "2500",
      "endMs": "5000",
      "startTimeText": "0:02"
    }
  ],
  "transcript_only_text": "We're no strangers to love\nYou know the rules and so do I..."
}
  • Content-Type: application/json
  • X-RateLimit-Limit: The rate limit for the user
  • X-RateLimit-Remaining: The remaining number of requests for the user

Bad Request (400)

Returned if the request is invalid or missing required parameters.
{
  "error": "'url' parameter is required and must be a non-empty string. Please provide a YouTube video or short URL."
}

Bad Gateway (502)

Returned if the external service is unavailable or returns invalid data.
{
  "error": "Failed to retrieve YouTube video information"
}

Internal Server Error (500)

Returned if there’s an unexpected server error.
{
  "error": "An unexpected server error occurred while fetching YouTube video information"
}

Example Request

curl -X POST https://app.dumplingai.com/api/v1/youtube/video \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
  "url": "https://www.youtube.com/watch?v=PkZNo7MFNFg",
  "get_transcript": true
}'

Example Response

{
  "id": "PkZNo7MFNFg",
  "thumbnail": "https://i.ytimg.com/vi/PkZNo7MFNFg/maxresdefault.jpg",
  "type": "video",
  "title": "JavaScript Tutorial for Beginners: Learn JS in 1 Hour",
  "description": "This comprehensive JavaScript tutorial covers all the fundamentals you need to get started with programming...",
  "commentCountText": "1.2M",
  "commentCountInt": 1200000,
  "likeCountText": "12M",
  "likeCountInt": 12000000,
  "viewCountText": "1.5B",
  "viewCountInt": 1500000000,
  "publishDateText": "Oct 25, 2009",
  "publishDate": "2009-10-25T00:00:00.000Z",
  "channel": {
    "id": "UCWv7vMbMWH4-V0ZXdmDpPBA",
    "url": "https://www.youtube.com/@programmingwithmosh",
    "handle": "programmingwithmosh",
    "title": "Programming with Mosh"
  },
  "durationMs": 212000,
  "durationFormatted": "3:32",
  "keywords": ["javascript", "programming", "tutorial", "beginner"],
  "transcript": [
    {
      "text": "Welcome to this comprehensive JavaScript tutorial",
      "startMs": "0",
      "endMs": "2500",
      "startTimeText": "0:00"
    }
  ],
  "transcript_only_text": "Welcome to this comprehensive JavaScript tutorial. Today we'll cover variables, functions, objects..."
}

Notes

  • The url parameter must be a valid YouTube video or short URL
  • When get_transcript is set to true, transcript data will be included if available
  • Transcripts are only available for videos that have captions enabled
  • The response includes comprehensive video metadata, statistics, and channel information
  • watchNextVideos contains suggested videos that YouTube recommends
  • transcript_only_text provides the full transcript as a single concatenated string
  • This endpoint uses 1 credit per request

Rate Limiting

Rate limit headers (X-RateLimit-Limit and X-RateLimit-Remaining) are included in the response to indicate the user’s current rate limit status.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string<uri>
required

Full YouTube video URL.

get_transcript
boolean

When true, include transcript segments.

requestSource
enum<string>

Optional identifier describing where the API request originated.

Available options:
API,
WEB,
MAKE_DOT_COM,
ZAPIER,
N8N,
PLAYGROUND,
DEFAULT_AUTOMATION,
AGENT_PREVIEW,
AGENT_LIVE,
AUTOPILOT,
STUDIO

Response

Video details retrieved.

id
string
thumbnail
string<uri>
type
string
title
string
description
string
commentCountText
string | null
commentCountInt
integer | null
likeCountText
string | null
likeCountInt
integer | null
viewCountText
string | null
viewCountInt
integer | null
publishDateText
string | null
publishDate
string<date-time> | null
channel
object
durationMs
integer | null
durationFormatted
string | null
watchNextVideos
object[]
keywords
string[]
transcript
object[]
transcript_only_text
string | null