Youtube Downloader API

Get Youtube video info, subtitles and download links to MP4 or MP3 file with multiple media options.

API Overview

Test for free on Rapid API

Click here to Test for FREE on RapidAPI!

Empower your app with our YouTube Video Downloader API. Download videos in MP4 format with multiple quality options, from standard to 4K. Extract audio as MP3 files for offline listening. Retrieve high-quality thumbnails to enhance visual appeal.

Key features: • Versatile format support (MP4, MP3) • Multiple video quality options • Video trimmer • Video watermark adder • Subtitle downloader • Thumbnail retrieval • Fast processing • Easy integration

Perfect for content creators, music enthusiasts, and developers building media management tools or educational platforms. Our API offers seamless YouTube content extraction, enabling you to deliver enhanced user experiences across various applications.

Get Youtube video info, subtitles and download links to MP4 or MP3 file with multiple media options.

Youtube Downloader REST API

The Youtube Downloader API is constructed around REST. The API offers resource-oriented URLs, returns JSON-encoded responses, accepts multiple parameters, and uses standard HTTP response codes and authentication.

To access the Youtube Downloader API, you will need an API key from RapidAPI. The same API key will be used for testing purposes and when the integration is live. The API key is used to authenticate the requests.

Periodically, we will add fields to our API. In order to prevent errors once you are integrated with our API, we recommend ignoring unknown fields.


Test for free on Rapid API

Click here to Test for FREE on RapidAPI!

Endpoints:

Googlevideo.com download links

GET | /download - Grabs deciphered Youtube download links directly from Google Video server.

Video/audio streams muxer

GET | /mux - Media converter generating directly downloadable subtitles and high quality links with merged audio and video.

Video meta info

GET | /info - Returns metainfo object of a video.

GET | /info/{data} - Returns specific data of a video (like title, description, thumbnails, ...)

Grabs Youtube download links directly from Google Video server valid for 6 hours. Includes additional formats, and ready to download deciphered URL.

Note that high quality videos are muted. You can use our muxer available at the /mux endpoint to merge audio and video.

Attributes

Query parameters to pass data when making a request to this endpoint

GET | /download

Field

Notes

id REQUIRED

string Youtube video ID in expected format (/^[a-zA-Z0-9-_]{11}$/)

filter OPTIONAL

string Used to filter the list of formats to choose from. Can be: audioandvideo or videoandaudio to filter formats that contain both video and audio, video to filter for formats that contain video, videoonly for formats that contain video and no additional audio track, audio to filter for formats that contain audio. audioonly for formats that contain audio and no additional video track.

quality OPTIONAL

string Video quality to download. Can be an itag value, a list of itag values, or one of these strings: highest/lowest/highestaudio/lowestaudio/highestvideo/lowestvideo. highestaudio/lowestaudio try to minimize video bitrate for equally good audio formats while highestvideo/lowestvideo try to minimize audio respectively. Defaults to highest, which prefers formats with both video and audio.

Example Response

[
   {
      "mimeType":"video/mp4; codecs=\"avc1.42001E, mp4a.40.2\"",
      "qualityLabel":"360p",
      "bitrate":631710,
      "audioBitrate":96,
      "itag":18,
      "url":"https://rr2---sn-25glene6.googlevideo.com/videoplayback?expire=1731449538&ei=Yn4zZ-iMG5T6xN8Pz4ivyAY&ip=...",
      "width":640,
      "height":360,
      "lastModified":"1709283156036389",
      "contentLength":"2413136",
      "quality":"medium",
      "fps":25,
      "projectionType":"RECTANGULAR",
      "averageBitrate":630329,
      "audioQuality":"AUDIO_QUALITY_LOW",
      "approxDurationMs":"30627",
      "audioSampleRate":"44100",
      "audioChannels":2,
      "hasVideo":true,
      "hasAudio":true,
      "container":"mp4",
      "codecs":"avc1.42001E, mp4a.40.2",
      "videoCodec":"avc1.42001E",
      "audioCodec":"mp4a.40.2",
      "isLive":false,
      "isHLS":false,
      "isDashMPD":false
   },
   {
      "mimeType":"audio/webm; codecs=\"opus\"",
      "qualityLabel":null,
      "bitrate":134460,
      "audioBitrate":160,
      "itag":251,
      "url":"https://rr2---sn-25glene6.googlevideo.com/videoplayback?expire=1731449538&ei=Yn4zZ-iMG5T6xN8Pz4ivyAY&ip=...",
      "initRange":{
         "start":"0",
         "end":"265"
      },
      "indexRange":{
         "start":"266",
         "end":"332"
      },
      "lastModified":"1709283155567051",
      "contentLength":"488409",
      "quality":"tiny",
      "projectionType":"RECTANGULAR",
      "averageBitrate":127767,
      "audioQuality":"AUDIO_QUALITY_MEDIUM",
      "approxDurationMs":"30581",
      "audioSampleRate":"48000",
      "audioChannels":2,
      "loudnessDb":3.6499996,
      "hasVideo":false,
      "hasAudio":true,
      "container":"webm",
      "codecs":"opus",
      "videoCodec":null,
      "audioCodec":"opus",
      "isLive":false,
      "isHLS":false,
      "isDashMPD":false
   },
   ...
]

RETURNS object

Video & Audio Muxer which generates directly downloadable subtitles and links from a Youtube video.

This media converter merges audio and video and returns high quality streams from a multiple list of options.

Attributes

Query parameters to pass data when making a request to this endpoint

GET | /mux

Field

Notes

id REQUIRED

string Youtube video ID in expected format (/^[a-zA-Z0-9-_]{11}$/)

quality OPTIONAL

string Sets the video quality for downloads. The desired video quality (e.g., 144, 720, max). 720 quality is recommended for phones. Throws: Error if the provided quality is not valid.

codec OPTIONAL

string Sets the video codec for downloads. The desired video codec (e.g., h264, vp9, av1). H264 codec is set by default. Throws: Error if the provided codec is not valid.

audioFormat OPTIONAL

string Sets the audio format for downloads (e.g., mp3, ogg, wav). Default: mp3. Throws: Error if the provided format is not valid.

language OPTIONAL

string specifies the language of audio to download when a youtube video is dubbed. E.g.: en / ru / cs / ja / es-US / ...

audioOnly OPTIONAL

boolean Enables downloading only audio.

videoOnly OPTIONAL

boolean Enables downloading only video.

startTime OPTIONAL

datetime or unsigned integer Trims video or audio with reference to start time. Time in HH:mm:ss format or in milliseconds.

endTime OPTIONAL

datetime or unsigned integer Trims video or audio with reference to end time. Time in HH:mm:ss format or in milliseconds.

watermark OPTIONAL

array of watermark parameters Adds a watermark or logo to the Youtube video. List of values: 1. string REQUIRED URL of the watermark/logo image. 2. string OPTIONAL position on the screen among this predefined list topLeft / topRight / bottomLeft / bottomRight / center (with a 10px margin from the corner) or pixel coordinates in x:y format starting from the top left corner. Defaults to center. 3. unsigned decimal OPTIONAL Scale of the watermark in percent of the video widest side. Defaults to 1.0 (fits the full width for landscape). 4. unsigned decimal between 0 and 1 OPTIONAL Transparency of the logo. Defaults to 1.0 (none)

subtitleLang OPTIONAL

string specifies the language of the subtitle file to download in the tunnels . Language code in any valid ISO 639-1. E.g.: en / ru / cs / fr / ...

Example Response

{
"status": "tunnel",
"url": "https://api-media-downloader.api-hub.cloud/tunnel?id=UHJwtdu_bZdSnnBpsxguT&exp=1731455062657&sig=...",
"filename": "youtube_v4zTAkLKgm4_1280x720_h264.mp4"
}

Gets metainfo from a video.

This global endpoint will return all info available about a video in a big JSON object, use the endpoint /info/{data} to extract a specific data from this object. Scroll down to get a list of available sub-routes.

Attributes

Query parameters to pass data when making a request to these endpoints

GET | /info and with sub-route GET | /info/{data}

Field

Notes

id REQUIRED

string Youtube video ID in expected format (/^[a-zA-Z0-9-_]{11}$/)

/info/{data} endpoint

Replace {data} with one of the following sub-route

{data} sub-route

Returned JSON {data} key value

height

unsigned integer The encoded video content's maximum height in pixels.

width

unsigned integer The encoded video content's maximum width in pixels.

description

string The localized video description.

title

string The localized video title.

duration

string The length of the video. The property value is an ISO 8601 duration.

viewCount

unsigned long The number of times the video has been viewed.

category

string The YouTube video category associated with the video.

publishDate

datetime The date and time that the video was published. Note that this time might be different than the time that the video was uploaded. For example, if a video is uploaded as a private video and then made public at a later time, this property will specify the time that the video was made public. The value is specified in ISO 8601 format.

channelName

string Channel title for the channel that the video belongs to.

channelId

string The ID that YouTube uses to uniquely identify the channel that the video was uploaded to.

channelUrl

string Channel URL for the channel that the video belongs to.

channelSubscriberCount

unsigned long The number of subscribers that the channel has. This value is rounded down to three significant figures.

likes

unsigned long The number of users who have indicated that they liked the video.

video_url

string The Youtube video URL.

thumbnails

object A map of thumbnail images associated with the video. For each object in the map, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.

Example Responses

  1. For GET | /info endpoint

{
   "embed":{
      "iframeUrl":"https://www.youtube.com/embed/v4zTAkLKgm4",
      "width":1280,
      "height":720
   },
   "title":"Electromagnetic Aircraft Launcher",
   "description":"Thank you to KiwiCo for sponsoring today's video...",
   "lengthSeconds":"909",
   "ownerProfileUrl":"http://www.youtube.com/@TomStantonEngineering",
   "externalChannelId":"UC67gfx2Fg7K2NSHqoENVgwA",
   "isFamilySafe":true,
   "availableCountries":[
      "AD",
      "AE",
      "AF",
      ...
   ],
   "isUnlisted":false,
   "hasYpcMetadata":false,
   "viewCount":"2044212",
   "category":"Science & Technology",
   "publishDate":"2024-09-04T09:00:03-07:00",
   "ownerChannelName":"Tom Stanton",
   "uploadDate":"2024-09-04T09:00:03-07:00",
   "isShortsEligible":false,
   "videoId":"v4zTAkLKgm4",
   "channelId":"UC67gfx2Fg7K2NSHqoENVgwA",
   "isOwnerViewing":false,
   "isCrawlable":true,
   "allowRatings":true,
   "author":{
      "id":"UC67gfx2Fg7K2NSHqoENVgwA",
      "name":"Tom Stanton",
      "user":"@TomStantonEngineering",
      "channel_url":"https://www.youtube.com/channel/UC67gfx2Fg7K2NSHqoENVgwA",
      "external_channel_url":"https://www.youtube.com/channel/UC67gfx2Fg7K2NSHqoENVgwA",
      "user_url":"http://www.youtube.com/@TomStantonEngineering",
      "thumbnails":[
         {
            "url":"https://yt3.ggpht.com/ytc/AIdro_lN5k-a9pdJ2Mc0bpSMVcAnjhdIq9JpvZxZMwo79A7CB0A=s48-c-k-c0x00ffffff-no-rj",
            "width":48,
            "height":48
         },
         ...
      ],
      "verified":true,
      "subscriber_count":1400000
   },
   "isPrivate":false,
   "isUnpluggedCorpus":false,
   "isLiveContent":false,
   "media":{
      
   },
   "likes":76735,
   "age_restricted":false,
   "video_url":"https://www.youtube.com/watch?v=v4zTAkLKgm4",
   "storyboards":[
      {
         "templateUrl":"https://i.ytimg.com/sb/v4zTAkLKgm4/storyboard3_L0/default.jpg?sqp=...",
         "thumbnailWidth":48,
         "thumbnailHeight":27,
         "thumbnailCount":100,
         "interval":0,
         "columns":10,
         "rows":10,
         "storyboardCount":1
      },
      ...
   ],
   "chapters":[
      
   ],
   "thumbnails":[
      {
         "url":"https://i.ytimg.com/vi/v4zTAkLKgm4/hqdefault.jpg?sqp=...",
         "width":168,
         "height":94
      },
      {
         "url":"https://i.ytimg.com/vi/v4zTAkLKgm4/hqdefault.jpg?sqp=...",
         "width":196,
         "height":110
      },
     ...
   ]
}

  1. For GET | /info/title endpoint

{
   "title":"Electromagnetic Aircraft Launcher"
}

  1. For GET | /info/thumbnails endpoint

{
   "thumbnails":[
      {
         "url":"https://i.ytimg.com/vi/v4zTAkLKgm4/hqdefault.jpg?sqp=...",
         "width":168,
         "height":94
      },
      ...
}