YouTube Search API
The YouTube Search API allows businesses to extract data from YouTube in real-time. It can be easily accessed by requesting at the following endpoint: api.serpdog.io/youtube.
Parameters
Description
cURL "http://api.serpdog.io/youtube?q=javascript+tutorials&api_key=APIKEY&html=true"const axios = require('axios');
axios.get('https://api.serpdog.io/youtube?q=javascript+tutorials&api_key=APIKEY&html=true')
.then(response => {
console.log(response.data);
})
.catch(error => {
console.log(error);
});import requests
payload = {'api_key': 'APIKEY', 'q':'javascript+tutorials' , 'html': 'true'}
resp = requests.get('https://api.serpdog.io/youtube', params=payload)
print (resp.text)try {
String url = "https://api.serpdog.io/youtube?q=javascript+tutorials&api_key=APIKEY&html=true";
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection conection = (HttpURLConnection) urlForGetRequest.openConnection();
conection.setRequestMethod("GET");
int responseCode = conection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(new InputStreamReader(conection.getInputStream()));
StringBuffer response = new StringBuffer();
while ((readLine = in.readLine()) != null) {
response.append(readLine);
}
in.close();
System.out.println(response.toString());
} else {
throw new Exception("Error in API Call");
}
} catch (Exception ex) {
ex.printStackTrace();
}Last updated