Skip to main content
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"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "video_id": "Y2y4OpzKIK4",
    "title": "Video title",
    "description": "Video description",
    "channel": {
      "id": "channel_id",
      "name": "Channel name",
      "subscriber_count": 1000000
    },
    "stats": {
      "view_count": 100000,
      "like_count": 5000,
      "comment_count": 1000
    },
    "published_at": "2024-01-01T00:00:00Z",
    "duration": "PT10M30S",
    "thumbnail": "https://...",
    "video_url": "https://..."
  },
  "success": true,
  "failed": false
}
This API is used to get detailed information for YouTube videos.
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 a channel option, use it to control how scraper data is sourced:
ChannelWhat it meansTypical trade-off
apifyUses Apify, a dedicated web scraping platform with broad content coverage.Most stable and most complete results, but usually more expensive.
rapidUses RapidAPI, a lower-cost aggregation platform.Lower cost, but less stable and often narrower coverage.
memories.aiManaged 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-mai-this_a_test_string_please_use_your_generated_key_during_testing"
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)

Request Body

FieldTypeRequiredDescription
video_idstringYesYouTube 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": {
    "video_id": "Y2y4OpzKIK4",
    "title": "Video title",
    "description": "Video description",
    "channel": {
      "id": "channel_id",
      "name": "Channel name",
      "subscriber_count": 1000000
    },
    "stats": {
      "view_count": 100000,
      "like_count": 5000,
      "comment_count": 1000
    },
    "published_at": "2024-01-01T00:00:00Z",
    "duration": "PT10M30S",
    "thumbnail": "https://...",
    "video_url": "https://..."
  },
  "success": true,
  "failed": false
}

Response Parameters

ParameterTypeDescription
codestringResponse code, indicates the operation result status
msgstringResponse message, describes the operation result
dataobjectResponse data object, contains video detailed information
data.video_idstringVideo ID
data.titlestringVideo title
data.descriptionstringVideo description
data.channelobjectChannel information
data.channel.idstringChannel ID
data.channel.namestringChannel name
data.channel.subscriber_countnumberSubscriber count
data.statsobjectStatistics data
data.stats.view_countnumberView count
data.stats.like_countnumberLike count
data.stats.comment_countnumberComment count
data.published_atstringPublished time (ISO 8601 format)
data.durationstringVideo duration (ISO 8601 format)
data.thumbnailstringThumbnail URL
data.video_urlstringVideo URL
successbooleanIndicates whether the operation was successful
failedbooleanIndicates whether the operation failed

Authorizations

Authorization
string
header
required

Body

application/json
video_id
string
required

YouTube video ID

Example:

"Y2y4OpzKIK4"

Response

200 - application/json

Successfully returned video detailed information

code
string

Response code, indicates the operation result status

Example:

200

msg
string

Response message, describes the operation result

Example:

"success"

data
object

Response data object, contains video detailed information

success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false