YouTube Video Metadata
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"channel": "apify"
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata"
payload = {
"video_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"channel": "apify"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({video_url: 'https://www.youtube.com/watch?v=Y2y4OpzKIK4', channel: 'apify'})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata', 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://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata",
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([
'video_url' => 'https://www.youtube.com/watch?v=Y2y4OpzKIK4',
'channel' => 'apify'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata"
payload := strings.NewReader("{\n \"video_url\": \"https://www.youtube.com/watch?v=Y2y4OpzKIK4\",\n \"channel\": \"apify\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://www.youtube.com/watch?v=Y2y4OpzKIK4\",\n \"channel\": \"apify\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://www.youtube.com/watch?v=Y2y4OpzKIK4\",\n \"channel\": \"apify\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": [
{
"original_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"requested_resolution": "720p",
"title": "Close Encounter with a Siamese Crocodile | Saving Planet Earth: Crocodiles | BBC Earth",
"channel": "BBC Earth",
"duration": "2m 39s",
"provided_resolution": "360p",
"thumbnail": "https://i.ytimg.com/vi/Y2y4OpzKIK4/maxresdefault.jpg",
"downloadable_video_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"downloadable_audio_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"merged_downloadable_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"view_count": "48.4K",
"categories": ["Pets & Animals"],
"description": "Radio DJ Edith Bowman has a close encounter with a young crocodile...",
"availability": "public",
"live_status": "not_live",
"channel_subscribers": "14.2M",
"video_filesize": "8.50MB",
"audio_filesize": "950.39KB",
"additional_metadata": {
"view_count": "48.4K",
"like_count": "223",
"comment_count": "7",
"video_type": "long",
"hashtags": [],
"keywords": ["Close encounter with a Siamese Crocodile", "saving siamese crocodile", ...],
"categories": ["Pets & Animals"],
"language": "en",
"channel_name": "BBC Earth",
"channel_id": "UCwmZiChSryoWQCZMIQezgTg",
"channel_url": "https://www.youtube.com/channel/UCwmZiChSryoWQCZMIQezgTg",
"channel_followers": "14.2M",
"uploader_id": "@bbcearth",
"uploader_url": "https://www.youtube.com/@bbcearth",
"upload_date": "2009-08-29",
"video_format": {
"ext": "mp4",
"format_note": "360p",
"height": 360,
"width": 636,
"fps": 25,
"vcodec": "avc1.4d401e",
"acodec": "none",
"filesize": "8.50MB"
},
"audio_format": {
"ext": "m4a",
"format_note": "low",
"acodec": "mp4a.40.5",
"abr": 48.82,
"filesize": "950.39KB"
},
"source_platform": "youtube",
"webpage_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4"
}
}
],
"failed": false,
"success": true
}
YouTube
YouTube Video Metadata
Get YouTube video metadata.
POST
/
youtube
/
video
/
metadata
YouTube Video Metadata
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"video_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"channel": "apify"
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata"
payload = {
"video_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"channel": "apify"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({video_url: 'https://www.youtube.com/watch?v=Y2y4OpzKIK4', channel: 'apify'})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata', 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://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata",
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([
'video_url' => 'https://www.youtube.com/watch?v=Y2y4OpzKIK4',
'channel' => 'apify'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata"
payload := strings.NewReader("{\n \"video_url\": \"https://www.youtube.com/watch?v=Y2y4OpzKIK4\",\n \"channel\": \"apify\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_url\": \"https://www.youtube.com/watch?v=Y2y4OpzKIK4\",\n \"channel\": \"apify\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/youtube/video/metadata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"video_url\": \"https://www.youtube.com/watch?v=Y2y4OpzKIK4\",\n \"channel\": \"apify\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": [
{
"original_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"requested_resolution": "720p",
"title": "Close Encounter with a Siamese Crocodile | Saving Planet Earth: Crocodiles | BBC Earth",
"channel": "BBC Earth",
"duration": "2m 39s",
"provided_resolution": "360p",
"thumbnail": "https://i.ytimg.com/vi/Y2y4OpzKIK4/maxresdefault.jpg",
"downloadable_video_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"downloadable_audio_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"merged_downloadable_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"view_count": "48.4K",
"categories": ["Pets & Animals"],
"description": "Radio DJ Edith Bowman has a close encounter with a young crocodile...",
"availability": "public",
"live_status": "not_live",
"channel_subscribers": "14.2M",
"video_filesize": "8.50MB",
"audio_filesize": "950.39KB",
"additional_metadata": {
"view_count": "48.4K",
"like_count": "223",
"comment_count": "7",
"video_type": "long",
"hashtags": [],
"keywords": ["Close encounter with a Siamese Crocodile", "saving siamese crocodile", ...],
"categories": ["Pets & Animals"],
"language": "en",
"channel_name": "BBC Earth",
"channel_id": "UCwmZiChSryoWQCZMIQezgTg",
"channel_url": "https://www.youtube.com/channel/UCwmZiChSryoWQCZMIQezgTg",
"channel_followers": "14.2M",
"uploader_id": "@bbcearth",
"uploader_url": "https://www.youtube.com/@bbcearth",
"upload_date": "2009-08-29",
"video_format": {
"ext": "mp4",
"format_note": "360p",
"height": 360,
"width": 636,
"fps": 25,
"vcodec": "avc1.4d401e",
"acodec": "none",
"filesize": "8.50MB"
},
"audio_format": {
"ext": "m4a",
"format_note": "low",
"acodec": "mp4a.40.5",
"abr": 48.82,
"filesize": "950.39KB"
},
"source_platform": "youtube",
"webpage_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4"
}
}
],
"failed": false,
"success": true
}
Product: Visual Intelligence — Social Media Scraping
Use case: Fetch video metadata, transcripts, captions, and comments from YouTube, Instagram, TikTok, and Twitter/X
Host:
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)Channel routing guide: see Social Media Scraping Overview. Endpoints with a
channel request field let you choose apify, rapid, or memories.ai; endpoints without this field use managed routing.Pricing:
- rapid channel: $0.01 per video
- memories.ai channel: $0.01 per video
- apify channel: Charged at Apify’s actual cost (higher and variable pricing)
Code Example
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": f"{API_KEY}"
}
def youtube_video_metadata(video_url: str, channel: str):
url = f"{BASE_URL}/youtube/video/metadata"
data = {"video_url": video_url, "channel": channel}
resp = requests.post(url, headers=HEADERS, json=data)
return resp.json()
# Usage example
result = youtube_video_metadata("https://www.youtube.com/watch?v=Y2y4OpzKIK4", "apify")
print(result)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| video_url | string | Yes | The YouTube video URL |
| channel | string | Yes | The channel name. Supported values: apify, rapid, memories.ai |
Response
The response shape depends on which
channel you pass. Each channel passes through a different upstream provider’s schema essentially unchanged, so the three channels are not drop-in interchangeable. Verified live:channel: "apify"— the canonical shape documented below.datais an array of flat metadata objects withtitle,duration,view_count,downloadable_video_link, etc. This is the only channel that returns direct downloadable video / audio URLs.channel: "memories.ai"— YouTube Data API v3 nested shape.datais an object (data.items[]), each item havingsnippet.title,snippet.thumbnails.{maxres,standard,high,medium,default}.url, andcontentDetails.duration(ISO 8601). No download links.channel: "rapid"— flat shape but different field names:id,title,description,view_count, plus anerrorId: "Success"marker. No download links.
{
"code": 200,
"msg": "success",
"data": [
{
"original_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4",
"requested_resolution": "720p",
"title": "Close Encounter with a Siamese Crocodile | Saving Planet Earth: Crocodiles | BBC Earth",
"channel": "BBC Earth",
"duration": "2m 39s",
"provided_resolution": "360p",
"thumbnail": "https://i.ytimg.com/vi/Y2y4OpzKIK4/maxresdefault.jpg",
"downloadable_video_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"downloadable_audio_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"merged_downloadable_link": "https://rr8---sn-bvvbaxivnuxq5uu-vgql.googlevideo.com/videoplayback?...",
"view_count": "48.4K",
"categories": ["Pets & Animals"],
"description": "Radio DJ Edith Bowman has a close encounter with a young crocodile...",
"availability": "public",
"live_status": "not_live",
"channel_subscribers": "14.2M",
"video_filesize": "8.50MB",
"audio_filesize": "950.39KB",
"additional_metadata": {
"view_count": "48.4K",
"like_count": "223",
"comment_count": "7",
"video_type": "long",
"hashtags": [],
"keywords": ["Close encounter with a Siamese Crocodile", "saving siamese crocodile", ...],
"categories": ["Pets & Animals"],
"language": "en",
"channel_name": "BBC Earth",
"channel_id": "UCwmZiChSryoWQCZMIQezgTg",
"channel_url": "https://www.youtube.com/channel/UCwmZiChSryoWQCZMIQezgTg",
"channel_followers": "14.2M",
"uploader_id": "@bbcearth",
"uploader_url": "https://www.youtube.com/@bbcearth",
"upload_date": "2009-08-29",
"video_format": {
"ext": "mp4",
"format_note": "360p",
"height": 360,
"width": 636,
"fps": 25,
"vcodec": "avc1.4d401e",
"acodec": "none",
"filesize": "8.50MB"
},
"audio_format": {
"ext": "m4a",
"format_note": "low",
"acodec": "mp4a.40.5",
"abr": 48.82,
"filesize": "950.39KB"
},
"source_platform": "youtube",
"webpage_url": "https://www.youtube.com/watch?v=Y2y4OpzKIK4"
}
}
],
"failed": false,
"success": true
}
Response Parameters (apify channel)
The table below documents the apify channel shape. For the other two channels see the Warning above.| Parameter | Type | Description |
|---|---|---|
| code | integer | Response code (200 on success) |
| msg | string | Response message |
| data | array[object] | object | Array of video metadata objects on apify and rapid; object with items[] on memories.ai. The fields below describe the apify shape. |
| data[].original_url | string | The original YouTube video URL |
| data[].requested_resolution | string | The requested video resolution (e.g., “720p”) |
| data[].title | string | Video title |
| data[].channel | string | YouTube channel name |
| data[].duration | string | Video duration in human-readable format (e.g., “2m 39s”) |
| data[].provided_resolution | string | The actual video resolution provided |
| data[].thumbnail | string | Thumbnail image URL |
| data[].downloadable_video_link | string | Direct download link for video file |
| data[].downloadable_audio_link | string | Direct download link for audio file |
| data[].merged_downloadable_link | string | Merged video and audio download link |
| data[].view_count | string | Number of views |
| data[].categories | array[string] | Video categories |
| data[].description | string | Video description |
| data[].availability | string | Video availability status |
| data[].live_status | string | Live streaming status |
| data[].channel_subscribers | string | Number of channel subscribers |
| data[].video_filesize | string | Video file size |
| data[].audio_filesize | string | Audio file size |
| data[].additional_metadata | object | Additional metadata including format details, keywords, etc. |
| success | boolean | Indicates whether the operation was successful |
| failed | boolean | Indicates whether the operation failed |
Authorizations
Body
application/json
Response
200 - application/json
Video metadata information
Response code indicating the result status
Example:
200
Response message describing the operation result
Example:
"success"
Array of video metadata objects
Show child attributes
Show child attributes
Indicates whether the operation was successful
Example:
true
Indicates whether the operation failed
Example:
false
⌘I
