YouTube Video Detail
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"video_id": "Y2y4OpzKIK4"
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail"
payload = { "video_id": "Y2y4OpzKIK4" }
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_id: 'Y2y4OpzKIK4'})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail', 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/detail",
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_id' => 'Y2y4OpzKIK4'
]),
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/detail"
payload := strings.NewReader("{\n \"video_id\": \"Y2y4OpzKIK4\"\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/detail")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_id\": \"Y2y4OpzKIK4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail")
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_id\": \"Y2y4OpzKIK4\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"id": "otECntwBTVU",
"title": "Finding Empty Restaurants, Then Bringing 100 Customers",
"url": "https://www.youtube.com/watch?v=otECntwBTVU",
"author_id": "UCJv5T2W-D3K3fYO0prgv5uw",
"author_url": "https://www.youtube.com/channel/UCJv5T2W-D3K3fYO0prgv5uw",
"description": "FOLLOW ME ON SNAP TO WIN $: ...",
"tags": ["viral", "kindness content", "tipping"],
"publish_time": "2026-01-10T14:30:53Z",
"view_count": "8797038",
"like_count": "413902",
"comment_count": "9489",
"duration_seconds": "692"
}
}
YouTube
YouTube Video Detail
Get detailed information for YouTube videos.
POST
/
youtube
/
video
/
detail
YouTube Video Detail
curl --request POST \
--url https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"video_id": "Y2y4OpzKIK4"
}
'import requests
url = "https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail"
payload = { "video_id": "Y2y4OpzKIK4" }
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_id: 'Y2y4OpzKIK4'})
};
fetch('https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail', 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/detail",
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_id' => 'Y2y4OpzKIK4'
]),
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/detail"
payload := strings.NewReader("{\n \"video_id\": \"Y2y4OpzKIK4\"\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/detail")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"video_id\": \"Y2y4OpzKIK4\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail")
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_id\": \"Y2y4OpzKIK4\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "success",
"data": {
"id": "otECntwBTVU",
"title": "Finding Empty Restaurants, Then Bringing 100 Customers",
"url": "https://www.youtube.com/watch?v=otECntwBTVU",
"author_id": "UCJv5T2W-D3K3fYO0prgv5uw",
"author_url": "https://www.youtube.com/channel/UCJv5T2W-D3K3fYO0prgv5uw",
"description": "FOLLOW ME ON SNAP TO WIN $: ...",
"tags": ["viral", "kindness content", "tipping"],
"publish_time": "2026-01-10T14:30:53Z",
"view_count": "8797038",
"like_count": "413902",
"comment_count": "9489",
"duration_seconds": "692"
}
}
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.Each API call costs $0.01 USD.
Channel Options
If your request supports achannel option, use it to control how scraper data is sourced:
| Channel | What it means | Typical trade-off |
|---|---|---|
apify | Uses Apify, a dedicated web scraping platform with broad content coverage. | Most stable and most complete results, but usually more expensive. |
rapid | Uses RapidAPI, a lower-cost aggregation platform. | Lower cost, but less stable and often narrower coverage. |
memories.ai | Managed routing by Memories.ai. | Automatically selects the best price/performance path for your request. |
Recommendation: Start with
memories.ai unless you need to force a specific provider.Code Example
import requests
BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
API_KEY = "sk-mavi-..."
HEADERS = {
"Authorization": f"{API_KEY}",
"Content-Type": "application/json"
}
def youtube_video_detail(video_id: str):
url = f"{BASE_URL}/youtube/video/detail"
data = {"video_id": video_id}
resp = requests.post(url, json=data, headers=HEADERS)
return resp.json()
# Usage example
result = youtube_video_detail("your_youtube_video_id")
print(result)
const axios = require('axios');
const BASE_URL = 'https://mavi-backend.memories.ai/serve/api/v2';
const API_KEY = 'sk-mavi-...';
const headers = {
'Authorization': API_KEY,
'Content-Type': 'application/json'
};
async function youtubeVideoDetail(videoId) {
const response = await axios.post(
`${BASE_URL}/youtube/video/detail`,
{ video_id: videoId },
{ headers }
);
return response.data;
}
// Usage example
youtubeVideoDetail('your_youtube_video_id')
.then(result => console.log(result));
curl -X POST "https://mavi-backend.memories.ai/serve/api/v2/youtube/video/detail" \
-H "Authorization: sk-mavi-..." \
-H "Content-Type: application/json" \
-d '{
"video_id": "your_youtube_video_id"
}'
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| video_id | string | Yes | YouTube video ID — the v parameter from the YouTube video URL |
How to get the
video_id: Extract the v parameter from a YouTube video URL.For example, from https://www.youtube.com/watch?v=Y2y4OpzKIK4, the video_id is Y2y4OpzKIK4.Response
Returns detailed information for the YouTube video.{
"code": 200,
"msg": "success",
"data": {
"id": "otECntwBTVU",
"title": "Finding Empty Restaurants, Then Bringing 100 Customers",
"url": "https://www.youtube.com/watch?v=otECntwBTVU",
"author_id": "UCJv5T2W-D3K3fYO0prgv5uw",
"author_url": "https://www.youtube.com/channel/UCJv5T2W-D3K3fYO0prgv5uw",
"description": "FOLLOW ME ON SNAP TO WIN $: ...",
"tags": ["viral", "kindness content", "tipping"],
"publish_time": "2026-01-10T14:30:53Z",
"view_count": "8797038",
"like_count": "413902",
"comment_count": "9489",
"duration_seconds": "692"
}
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | Response code (200 on success) |
| msg | string | Response message |
| data | object | Video information |
| data.id | string | YouTube video ID (the v parameter from the URL) |
| data.title | string | Video title |
| data.url | string | Canonical YouTube watch URL. Note: this is the page URL, not a direct media stream — there is no mp4 download URL in the response. To download the file, use Visual Search /scraper_url followed by Visual Search /download. |
| data.author_id | string | Channel ID (the UC... segment from the channel URL) |
| data.author_url | string | Channel page URL |
| data.description | string | Video description |
| data.tags | array | Creator-provided tags |
| data.publish_time | string | Publish time, ISO 8601 |
| data.view_count | string | View count (returned as string) |
| data.like_count | string | Like count (returned as string) |
| data.comment_count | string | Comment count (returned as string) |
| data.duration_seconds | string | Video duration in seconds (returned as string). Convert with int(...) for arithmetic. |
Channel metadata is limited to
author_id and author_url. To get the channel name, subscriber count, or per-channel statistics, follow up with a dedicated channel endpoint.Authorizations
Body
application/json
YouTube video ID
Example:
"Y2y4OpzKIK4"
Response
200 - application/json
Successfully returned video detailed information
Response code, indicates the operation result status
Example:
200
Response message, describes the operation result
Example:
"success"
Response data object, contains video detailed information
Indicates whether the operation was successful
Example:
true
Indicates whether the operation failed
Example:
false
