Skip to main content
POST
/
api
/
info
Video Information
curl --request POST \
  --url https://api.example.com/api/info \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "<string>"
}
'
{
  "id": "<string>",
  "title": "<string>",
  "description": "<string>",
  "thumbnail": "<string>",
  "duration": 123,
  "uploader": "<string>",
  "uploader_url": "<string>",
  "view_count": 123,
  "like_count": 123,
  "upload_date": "<string>",
  "webpage_url": "<string>",
  "is_playlist": true,
  "playlist_count": {},
  "subtitles": {},
  "formats": [
    {
      "format_id": "<string>",
      "ext": "<string>",
      "quality": "<string>",
      "resolution": "<string>",
      "filesize": {},
      "filesize_approx": {},
      "vcodec": "<string>",
      "acodec": "<string>",
      "abr": {},
      "vbr": {},
      "fps": {},
      "asr": {},
      "audio_channels": {},
      "format_note": "<string>"
    }
  ]
}
Retrieve detailed information about a YouTube video, including all available download formats.

Request Body

url
string
required
YouTube video URL to fetch information for

Response

id
string
YouTube video ID
title
string
Video title
description
string
Full video description
thumbnail
string
Thumbnail image URL
duration
integer
Video duration in seconds
uploader
string
Channel name or uploader name
uploader_url
string
URL to the uploader’s channel
view_count
integer
Total number of views
like_count
integer
Number of likes
upload_date
string
Upload date in YYYYMMDD format
webpage_url
string
Original webpage URL
is_playlist
boolean
Whether the URL is a playlist
playlist_count
integer | null
Number of videos in playlist (null if not a playlist)
subtitles
object
Available subtitle tracks by language code
formats
array
Array of all available download formats

Example Request

curl -X POST "http://localhost:8001/api/info" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
  }'

Example Response

{
  "id": "dQw4w9WgXcQ",
  "title": "Example Video Title",
  "description": "This is a detailed video description...",
  "thumbnail": "https://i.ytimg.com/vi/dQw4w9WgXcQ/maxresdefault.jpg",
  "duration": 212,
  "uploader": "Example Channel",
  "uploader_url": "https://www.youtube.com/@ExampleChannel",
  "view_count": 1000000000,
  "like_count": 15000000,
  "upload_date": "20091025",
  "webpage_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  "is_playlist": false,
  "playlist_count": null,
  "subtitles": {
    "en": [
      {
        "ext": "vtt",
        "url": "https://..."
      }
    ]
  },
  "formats": [
    {
      "format_id": "137",
      "ext": "mp4",
      "quality": "1080p",
      "resolution": "1920x1080",
      "filesize": 45678901,
      "filesize_approx": null,
      "vcodec": "avc1.640028",
      "acodec": "none",
      "abr": null,
      "vbr": 2500,
      "fps": 30,
      "asr": null,
      "audio_channels": null,
      "format_note": "1080p"
    },
    {
      "format_id": "136",
      "ext": "mp4",
      "quality": "720p",
      "resolution": "1280x720",
      "filesize": 23456789,
      "filesize_approx": null,
      "vcodec": "avc1.4d401f",
      "acodec": "none",
      "abr": null,
      "vbr": 1500,
      "fps": 30,
      "asr": null,
      "audio_channels": null,
      "format_note": "720p"
    },
    {
      "format_id": "140",
      "ext": "m4a",
      "quality": "audio",
      "resolution": "",
      "filesize": 3456789,
      "filesize_approx": null,
      "vcodec": "none",
      "acodec": "mp4a.40.2",
      "abr": 128,
      "vbr": null,
      "fps": null,
      "asr": 44100,
      "audio_channels": 2,
      "format_note": "medium"
    }
  ]
}

Error Responses

400 Bad Request

Returned when the URL is missing or invalid.
{
  "detail": "URL requerida"
}
{
  "detail": "No se pudo obtener información: [error message]"
}

Implementation Notes

  • Uses yt-dlp to extract comprehensive video metadata
  • Returns all available formats (video-only, audio-only, and combined streams)
  • Format IDs can be used with the /api/download endpoint for specific quality selection
  • Video-only formats (acodec=“none”) require merging with audio during download
  • Audio-only formats (vcodec=“none”) are suitable for audio extraction
  • Supports both individual videos and playlists
  • Does not download content, only extracts metadata

Build docs developers (and LLMs) love