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
}
'import requests
url = "https://app.dumplingai.com/api/v1/youtube/video"
payload = {
"url": "https://www.youtube.com/watch?v=PkZNo7MFNFg",
"get_transcript": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.youtube.com/watch?v=PkZNo7MFNFg', get_transcript: true})
};
fetch('https://app.dumplingai.com/api/v1/youtube/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/youtube/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://www.youtube.com/watch?v=PkZNo7MFNFg',
'get_transcript' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/youtube/video"
payload := strings.NewReader("{\n \"url\": \"https://www.youtube.com/watch?v=PkZNo7MFNFg\",\n \"get_transcript\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/youtube/video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://www.youtube.com/watch?v=PkZNo7MFNFg\",\n \"get_transcript\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/youtube/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://www.youtube.com/watch?v=PkZNo7MFNFg\",\n \"get_transcript\": true\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Data APIs
Get YouTube Video
Retrieve detailed metadata, statistics, related videos, and optionally transcripts for a YouTube video or short.
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
}
'import requests
url = "https://app.dumplingai.com/api/v1/youtube/video"
payload = {
"url": "https://www.youtube.com/watch?v=PkZNo7MFNFg",
"get_transcript": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({url: 'https://www.youtube.com/watch?v=PkZNo7MFNFg', get_transcript: true})
};
fetch('https://app.dumplingai.com/api/v1/youtube/video', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.dumplingai.com/api/v1/youtube/video",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => 'https://www.youtube.com/watch?v=PkZNo7MFNFg',
'get_transcript' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.dumplingai.com/api/v1/youtube/video"
payload := strings.NewReader("{\n \"url\": \"https://www.youtube.com/watch?v=PkZNo7MFNFg\",\n \"get_transcript\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.dumplingai.com/api/v1/youtube/video")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://www.youtube.com/watch?v=PkZNo7MFNFg\",\n \"get_transcript\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.dumplingai.com/api/v1/youtube/video")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://www.youtube.com/watch?v=PkZNo7MFNFg\",\n \"get_transcript\": true\n}"
response = http.request(request)
puts response.read_body{
"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>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<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
urlparameter must be a valid YouTube video or short URL - When
get_transcriptis set totrue, 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
watchNextVideoscontains suggested videos that YouTube recommendstranscript_only_textprovides the full transcript as a single concatenated string- This endpoint uses 10 credits 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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Full YouTube video URL.
When true, include transcript segments.
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.
Show child attributes
Show child attributes
Show child attributes
Show child attributes