YouTube Downloader API CC

Powered by Python ah sure ba yan?

Python Logo

API Documentation

To use the YouTube Downloader API, send a GET request to the following URL with the required parameters:

https:///ytdl?url=[video_url]&type=[mp3/mp4]

How to Get MP3 and MP4:

If you want to download the video as an MP3 or MP4, use the "type" parameter in the request:

Supported Methods:

Node.js Example

const axios = require('axios');

axios.get('https://${window.location.hostname}/ytdl?url=&type=mp4')
    .then(response => {
        console.log(response.data);
    })
    .catch(error => {
        console.error(error);
    });
            

Python Example

import requests

url = 'https://${window.location.hostname}/ytdl?url=&type=mp4'
response = requests.get(url)
print(response.json())
            

cURL Example

curl "https://${window.location.hostname}/ytdl?url=&type=mp4"
            

PHP Example

&type=mp4';
$response = file_get_contents($url);
echo $response;
?>
            

Java Example

import java.io.*;
import java.net.*;

public class YouTubeDownloader {
    public static void main(String[] args) throws IOException {
        String url = "https://${window.location.hostname}/ytdl?url=&type=mp4";
        URL obj = new URL(url);
        HttpURLConnection con = (HttpURLConnection) obj.openConnection();
        con.setRequestMethod("GET");

        BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
        String inputLine;
        StringBuffer response = new StringBuffer();

        while ((inputLine = in.readLine()) != null) {
            response.append(inputLine);
        }
        in.close();

        System.out.println(response.toString());
    }
}
            

For more details, check out the source code and contribute on GitHub!

Salamat sa Owner ng CCPRAKJIK 19 na commands ko