Video Details
Retrieve public details for a YouTube video identified by video ID. Use it to inspect a known video before further content or comment analysis.
Parameters
| Name | Required | Type | Description | Example | Allowed values |
|---|---|---|---|---|---|
video_id |
Required | string | The unique identifier for a YouTube video. | dQw4w9WgXcQ |
— |
Code samples
curl -G "https://api.mofa-ai.com/v1/youtube/get_video_detail_v1" \
-H "Authorization: Bearer $MOFA_API_KEY" \
--data-urlencode 'video_id=dQw4w9WgXcQ'
import os
import requests
resp = requests.get(
"https://api.mofa-ai.com/v1/youtube/get_video_detail_v1",
headers={"Authorization": f"Bearer {os.environ['MOFA_API_KEY']}"},
params={
"video_id": "dQw4w9WgXcQ",
},
timeout=60,
)
body = resp.json()
if body["success"]:
print(body["cost_usd"], body["data"])
else:
print(body["error"], body["message"])
const url = new URL("https://api.mofa-ai.com/v1/youtube/get_video_detail_v1");
url.search = new URLSearchParams({
video_id: "dQw4w9WgXcQ",
});
const resp = await fetch(url, {
headers: { Authorization: `Bearer ${process.env.MOFA_API_KEY}` },
});
const body = await resp.json();
if (body.success) console.log(body.cost_usd, body.data);
else console.error(body.error, body.message);
Try it
Sign in to call this endpoint from this page. Successful calls are billed to your balance, failed calls are free, and new accounts get $0.50 of trial credit.
Example response
Captured 2026-11-08, took 2999 ms · Request parameters {"video_id": "dQw4w9WgXcQ"}
JSON
{
"success": true,
"code": 0,
"message": "success",
"request_id": "req_5f1c2a9be04d7c3a81f6e2d0",
"endpoint": "youtube.get_video_detail_v1",
"cost_usd": 0.02,
"data": {
"code": 0,
"data": {
"id": "dQw4w9WgXcQ",
"type": "video",
"title": "Rick Astley - Never Gonna Give You Up (Official Video) (4K Remaster)",
"audios": {
"items": [
{
"url": "https://rr2---sn-bvvbax-cvne.googlevideo.com/videoplayback?expire=1794117607&ei=h7vvaqWIA8aKkucP6e2e0Ag&ip=73.253.8.87&i…",
"size": 3449447,
"isDrc": false,
"lengthMs": 213089,
"mimeType": "audio/mp4; codecs=\"mp4a.40.2\"",
"sizeText": "3.3MB",
"extension": "m4a",
"lastModified": 1766955925572207
},
"… +3"
],
"errorId": "Success",
"expiration": 1794117607
},
"videos": {
"items": [
{
"url": "https://rr2---sn-bvvbax-cvne.googlevideo.com/videoplayback?expire=1794117607&ei=h7vvaqWIA8aKkucP6e2e0Ag&ip=73.253.8.87&i…",
"size": 11829048,
"width": 640,
"height": 360,
"quality": "360p",
"hasAudio": true,
"lengthMs": 213089,
"mimeType": "video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"",
"sizeText": "11.3MB",
"extension": "mp4",
"lastModified": 1766960953317159
},
"… +22"
],
"errorId": "Success",
"expiration": 1794117607
},
"channel": {
"id": "UCuAXFkgsw1L7xaCfnd5JJOw",
"name": "Rick Astley",
"type": "channel",
"avatar": [
{
"url": "https://yt3.ggpht.com/_ShEGOdg-t5YGJse14Ooq6FYBZqX_QSlhaTNjG06miYusm5lWm1UroLyVxnYtahADfRTVLtuVQ=s48-c-k-c0x00ffffff-no-…",
"width": 48,
"height": 48
},
"… +2"
],
"handle": "@RickAstleyYT",
"isVerified": true,
"isVerifiedArtist": true,
"subscriberCountText": "4.56M subscribers"
},
"errorId": "Success",
"related": {
"items": [
{
"id": "RDdjV11Xbc914",
"type": "playlist",
"title": "Mix - a-ha - Take On Me (Official Video) [4K]",
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/djV11Xbc914/hqdefault.jpg?sqp=-oaymwEwCKgBEF5IWvKriqkDIwgBFQAAiEIYAfABAfgBvgeAAtAFigIMCAAQARhTIFc…",
"width": 168,
"height": 94
},
"… +1"
]
},
"… +19"
],
"nextToken": "video-related.CBQSExILZFF3NHc5V2dYY1HAAQHIAQEYACrqDU1nb0k5cmpEaHVhWHhheGgyczZMNnd5Y0NncVpDZ29EOGo0QUNnN0NQZ3NJNDdTeGd1Ym…"
},
"isLiveNow": false,
"likeCount": 19495198,
"subtitles": {
"items": [
{
"url": "https://www.youtube.com/api/timedtext?v=dQw4w9WgXcQ&ei=h7vvaqWIA8aKkucP6e2e0Ag&caps=asr&opi=112496729&xoaf=5&xowf=1&hl=e…",
"code": "en"
},
"… +5"
],
"errorId": "Success",
"expiration": 1794121207
},
"viewCount": 1834858584,
"isUnlisted": false,
"thumbnails": [
{
"url": "https://i.ytimg.com/vi/dQw4w9WgXcQ/hqdefault.jpg?sqp=-oaymwEbCKgBEF5IVfKriqkDDggBFQAAiEIYAXABwAEG&rs=AOn4CLDd2KtelLHaNSX…",
"width": 168,
"height": 94
},
"… +4"
],
"description": "The official video for “Never Gonna Give You Up” by Rick Astley. \n\nNever: The Autobiography 📚 OUT NOW! \nFollow this link…",
"isLiveStream": false,
"musicCredits": [
{
"album": "Whenever You Need Somebody",
"title": "Never Gonna Give You Up (7\" Mix)",
"artist": "Rick Astley",
"thumbnails": [
{
"url": "https://yt3.googleusercontent.com/eC9DfRcYSk4FE-fvDCJSu_4xsKdVMKxwmFTYFZwP8OqB7R4TKxAjKoR-Kp1lXeRi2WddPFYulSte4eW-"
}
],
"description": "Song: Never Gonna Give You Up (7\" Mix)\n\nArtist: Rick Astley\n\nAlbum: Whenever You Need Somebody\n\nWriters: Pete Waterman, …"
}
],
"lengthSeconds": 213,
"publishedTime": "2009-10-24T23:57:33-07:00",
"commentCountText": "2.4M",
"isCommentDisabled": false,
"publishedTimeText": "Oct 24, 2009",
"isRegionRestricted": false
},
"message": null,
"requestId": "8abddb3040d84e588f5a2f92e9505d6c",
"recordTime": "2026-11-08T08:00:08.200171099",
"requestParams": {
"body": null,
"query": {
"videoId": "dQw4w9WgXcQ"
}
}
}
}