> Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
yt_api API
Base URLs:
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/album/browseId/{browseId} \
-H 'Accept: application/json'
GET http://localhost:8080/album/browseId/{browseId} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/album/browseId/{browseId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/album/browseId/{browseId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/album/browseId/{browseId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/album/browseId/{browseId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/album/browseId/{browseId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/album/browseId/{browseId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /album/browseId/{browseId}
Gets the album information given its browseId (you can get it from song/{videoId} or the channel songs endpoints)
Name | In | Type | Required | Description |
---|---|---|---|---|
browseId | path | string | true | none |
> Example responses
> 200 Response
{
"playlistId": "OLAK5uy_lRly1oG8OVTI3C2gZv0pPjYxH-Q3U6GrM",
"browseId": "MPREb_Wz5C5MGVpsz",
"title": "For All The Dogs",
"artist": "Drake",
"artistBrowseId": "UCU6cE7pdJPc6DU2jSrKEsdQ",
"songCount": 23,
"releaseYear": 2023,
"totalDurationSeconds": 5100,
"description": "For All the Dogs is the eighth studio album by Canadian rapper and singer Drake. It was released through OVO Sound and Republic Records on October 6, 2023. The album features guest appearances from Teezo Touchdown, 21 Savage, J. Cole, Yeat, SZA, PartyNextDoor, Chief Keef, Bad Bunny, Sexyy Red, and Lil Yachty. Production was handled by Drake, Teezo Touchdown, and Lil Yachty themselves, along with 40, Sango, Oz, Bnyx, Southside, Boi-1da, Vinylz, Tay Keith, FnZ, Jahaan Sweet, the late DJ Screw, Stwo, Gordo, Justin Raisen, and the Alchemist, among others.\\nThe Scary Hours edition of the album was released on November 17, 2023, containing six additional tracks. The album was supported by five singles: \"Slime You Out\", \"8AM in Charlotte\", \"Rich Baby Daddy\", \"First Person Shooter\" and \"You Broke My Heart\" for the Scary Hours edition. It follows both of Drake's albums that were released in 2022: his seventh studio album, Honestly, Nevermind, and his collaborative studio album with 21 Savage titled Her Loss.\\n\\nFrom Wikipedia (https://en.wikipedia.org/wiki/For_All_the_Dogs) under Creative Commons Attribution CC-BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)",
"isExplicit": "true",
"type": "album",
"songs": [
{
"videoId": "k20wnICXpps",
"title": "Virginia Beach",
"durationSeconds": 252,
"playCount": 24000000,
"isExplicit": "true",
"artist": "Drake"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | YtmAlbum |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/album/playlistId/{playlistId} \
-H 'Accept: application/json'
GET http://localhost:8080/album/playlistId/{playlistId} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/album/playlistId/{playlistId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/album/playlistId/{playlistId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/album/playlistId/{playlistId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/album/playlistId/{playlistId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/album/playlistId/{playlistId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/album/playlistId/{playlistId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /album/playlistId/{playlistId}
Gets the album information given its playlistId (can get it through the YouTube UI)
Name | In | Type | Required | Description |
---|---|---|---|---|
playlistId | path | string | true | none |
> Example responses
> 200 Response
{
"playlistId": "OLAK5uy_lRly1oG8OVTI3C2gZv0pPjYxH-Q3U6GrM",
"browseId": "MPREb_Wz5C5MGVpsz",
"title": "For All The Dogs",
"artist": "Drake",
"artistBrowseId": "UCU6cE7pdJPc6DU2jSrKEsdQ",
"songCount": 23,
"releaseYear": 2023,
"totalDurationSeconds": 5100,
"description": "For All the Dogs is the eighth studio album by Canadian rapper and singer Drake. It was released through OVO Sound and Republic Records on October 6, 2023. The album features guest appearances from Teezo Touchdown, 21 Savage, J. Cole, Yeat, SZA, PartyNextDoor, Chief Keef, Bad Bunny, Sexyy Red, and Lil Yachty. Production was handled by Drake, Teezo Touchdown, and Lil Yachty themselves, along with 40, Sango, Oz, Bnyx, Southside, Boi-1da, Vinylz, Tay Keith, FnZ, Jahaan Sweet, the late DJ Screw, Stwo, Gordo, Justin Raisen, and the Alchemist, among others.\\nThe Scary Hours edition of the album was released on November 17, 2023, containing six additional tracks. The album was supported by five singles: \"Slime You Out\", \"8AM in Charlotte\", \"Rich Baby Daddy\", \"First Person Shooter\" and \"You Broke My Heart\" for the Scary Hours edition. It follows both of Drake's albums that were released in 2022: his seventh studio album, Honestly, Nevermind, and his collaborative studio album with 21 Savage titled Her Loss.\\n\\nFrom Wikipedia (https://en.wikipedia.org/wiki/For_All_the_Dogs) under Creative Commons Attribution CC-BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)",
"isExplicit": "true",
"type": "album",
"songs": [
{
"videoId": "k20wnICXpps",
"title": "Virginia Beach",
"durationSeconds": 252,
"playCount": 24000000,
"isExplicit": "true",
"artist": "Drake"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | YtmAlbum |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/channel/handle/{handle} \
-H 'Accept: application/json'
GET http://localhost:8080/channel/handle/{handle} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/channel/handle/{handle}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/channel/handle/{handle}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/channel/handle/{handle}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/channel/handle/{handle}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/channel/handle/{handle}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/channel/handle/{handle}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /channel/handle/{handle}
Gets the channel information given its handle
Name | In | Type | Required | Description |
---|---|---|---|---|
handle | path | string | true | none |
> Example responses
> 200 Response
{
"id": "UCByOQJjav0CUDwxCk-jVNRQ",
"name": "Drake",
"handle": "@DrakeOfficial",
"isArtist": "true",
"isVerified": "false",
"isAutogenerated": "false",
"keywords": [
"drake",
"official",
"rap",
"music",
"pop",
"r&b",
"hip-hop",
"soul",
"more life",
"gods",
"plan",
"hotline",
"energy",
"portland",
"signs"
],
"subscribers": 29300000,
"videoCount": 62,
"viewCount": 17165624250,
"thumbnailUrl": "https://yt3.googleusercontent.com/ytc/AIdro_lewFv9zbVbOLXVtS1cmCkefB0uPJ6Rt5t8g-DGpA=s900-c-k-c0x00ffffff-no-rj",
"bannerUrl": "https://yt3.googleusercontent.com/N_-lXcK6MdKwjrXQMdPbEabFwcdudvpy2p-Xmeqa-TkSGFrGRs3txwJzlx38BfF8zrNR9izN=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
"bioLinks": [
{
"title": "Drake Related",
"url": "drakerelated.com",
"imageUrl": "https://encrypted-tbn3.gstatic.com/favicon-tbn?q=tbn:ANd9GcRwYSRiBIGjOa8rXhmjl04uAQ-LQyrsylaWbtCRjn7FX5S8mLnU_HzCuJ1WkSajdS1sA34UWcv6C9wire6KlgI9fIpklie-TVaLsKYRVY1FkNbyk5oaJxGZcA"
}
],
"joinedDate": "2019-08-24T14:15:22Z",
"description": "https://www.ovosound.com\nhttps://www.drakerelated.com\n\n",
"country": null
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ChannelInfo |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/channel/handle/{handle}/shorts \
-H 'Accept: application/json'
GET http://localhost:8080/channel/handle/{handle}/shorts HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/channel/handle/{handle}/shorts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/channel/handle/{handle}/shorts',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/channel/handle/{handle}/shorts', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/channel/handle/{handle}/shorts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/channel/handle/{handle}/shorts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/channel/handle/{handle}/shorts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /channel/handle/{handle}/shorts
Gets the shorts of a channel given its handle
Name | In | Type | Required | Description |
---|---|---|---|---|
handle | path | string | true | none |
perPage | query | integer | false | none |
currentPage | query | integer | false | none |
> Example responses
> 200 Response
[
{
"id": "mWs7BekO_Ck",
"viewCount": 207000,
"thumbnailUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/oar2.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLCEq4_DkamkrEtVYZZGMM1ZcrNIFA",
"frameZeroUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/frame0.jpg"
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ShortSummary] | false | none | none |
» id | string | true | none | none |
» viewCount | integer(int64) | false | none | none |
» thumbnailUrl | string | true | none | none |
» frameZeroUrl | string | true | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/channel/handle/{handle}/songs \
-H 'Accept: application/json'
GET http://localhost:8080/channel/handle/{handle}/songs HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/channel/handle/{handle}/songs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/channel/handle/{handle}/songs',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/channel/handle/{handle}/songs', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/channel/handle/{handle}/songs', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/channel/handle/{handle}/songs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/channel/handle/{handle}/songs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /channel/handle/{handle}/songs
Gets the songs that belong to a channel (if it’s an artist channel) given its handle
Name | In | Type | Required | Description |
---|---|---|---|---|
handle | path | string | true | none |
perPage | query | integer | false | none |
currentPage | query | integer | false | none |
> Example responses
> 200 Response
[
{
"videoId": "Jo9sOqzoBHI",
"title": "Rich Baby Daddy (feat. Sexyy Red & SZA)",
"artist": "Drake",
"albumName": "For All The Dogs",
"albumBrowseId": "MPREb_Wz5C5MGVpsz",
"thumbnailUrl": "https://lh3.googleusercontent.com/LNtaC8gTrKrnikWZwYenbpcW-1rTN9dOTvislu7UXVJELwo4ZRjrMfSW1ioPwklP5ktl8dgkWcilopNd=w120-h120-l90-rj",
"durationSeconds": 320,
"isExplicit": true,
"playCount": 63000000
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [YtmSongSummaryResponse] | false | none | none |
» videoId | string | true | none | none |
» title | string | true | none | none |
» artist | string | true | none | none |
» albumName | string¦null | false | none | none |
» albumBrowseId | string¦null | false | none | none |
» thumbnailUrl | string¦null | false | none | none |
» durationSeconds | integer(int32) | false | none | none |
» isExplicit | boolean | false | none | none |
» playCount | integer(int64) | false | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/channel/id/{channelId} \
-H 'Accept: application/json'
GET http://localhost:8080/channel/id/{channelId} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/channel/id/{channelId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/channel/id/{channelId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/channel/id/{channelId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/channel/id/{channelId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/channel/id/{channelId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/channel/id/{channelId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /channel/id/{channelId}
Gets the info of a channel given it’s channel id
Name | In | Type | Required | Description |
---|---|---|---|---|
channelId | path | string | true | none |
> Example responses
> 200 Response
{
"id": "UCByOQJjav0CUDwxCk-jVNRQ",
"name": "Drake",
"handle": "@DrakeOfficial",
"isArtist": "true",
"isVerified": "false",
"isAutogenerated": "false",
"keywords": [
"drake",
"official",
"rap",
"music",
"pop",
"r&b",
"hip-hop",
"soul",
"more life",
"gods",
"plan",
"hotline",
"energy",
"portland",
"signs"
],
"subscribers": 29300000,
"videoCount": 62,
"viewCount": 17165624250,
"thumbnailUrl": "https://yt3.googleusercontent.com/ytc/AIdro_lewFv9zbVbOLXVtS1cmCkefB0uPJ6Rt5t8g-DGpA=s900-c-k-c0x00ffffff-no-rj",
"bannerUrl": "https://yt3.googleusercontent.com/N_-lXcK6MdKwjrXQMdPbEabFwcdudvpy2p-Xmeqa-TkSGFrGRs3txwJzlx38BfF8zrNR9izN=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
"bioLinks": [
{
"title": "Drake Related",
"url": "drakerelated.com",
"imageUrl": "https://encrypted-tbn3.gstatic.com/favicon-tbn?q=tbn:ANd9GcRwYSRiBIGjOa8rXhmjl04uAQ-LQyrsylaWbtCRjn7FX5S8mLnU_HzCuJ1WkSajdS1sA34UWcv6C9wire6KlgI9fIpklie-TVaLsKYRVY1FkNbyk5oaJxGZcA"
}
],
"joinedDate": "2019-08-24T14:15:22Z",
"description": "https://www.ovosound.com\nhttps://www.drakerelated.com\n\n",
"country": null
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ChannelInfo |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/channel/id/{channelId}/shorts \
-H 'Accept: application/json'
GET http://localhost:8080/channel/id/{channelId}/shorts HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/channel/id/{channelId}/shorts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/channel/id/{channelId}/shorts',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/channel/id/{channelId}/shorts', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/channel/id/{channelId}/shorts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/channel/id/{channelId}/shorts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/channel/id/{channelId}/shorts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /channel/id/{channelId}/shorts
Get the shorts of a channel given its channel id
Name | In | Type | Required | Description |
---|---|---|---|---|
channelId | path | string | true | none |
perPage | query | integer | false | none |
currentPage | query | integer | false | none |
> Example responses
> 200 Response
[
{
"id": "mWs7BekO_Ck",
"viewCount": 207000,
"thumbnailUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/oar2.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLCEq4_DkamkrEtVYZZGMM1ZcrNIFA",
"frameZeroUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/frame0.jpg"
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ShortSummary] | false | none | none |
» id | string | true | none | none |
» viewCount | integer(int64) | false | none | none |
» thumbnailUrl | string | true | none | none |
» frameZeroUrl | string | true | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/channel/id/{channelId}/songs \
-H 'Accept: application/json'
GET http://localhost:8080/channel/id/{channelId}/songs HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/channel/id/{channelId}/songs',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/channel/id/{channelId}/songs',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/channel/id/{channelId}/songs', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/channel/id/{channelId}/songs', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/channel/id/{channelId}/songs");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/channel/id/{channelId}/songs", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /channel/id/{channelId}/songs
Gets the songs that belong to a channel (if it’s an artist channel) given its channel id
Name | In | Type | Required | Description |
---|---|---|---|---|
channelId | path | string | true | none |
perPage | query | integer | false | none |
currentPage | query | integer | false | none |
> Example responses
> 200 Response
[
{
"videoId": "Jo9sOqzoBHI",
"title": "Rich Baby Daddy (feat. Sexyy Red & SZA)",
"artist": "Drake",
"albumName": "For All The Dogs",
"albumBrowseId": "MPREb_Wz5C5MGVpsz",
"thumbnailUrl": "https://lh3.googleusercontent.com/LNtaC8gTrKrnikWZwYenbpcW-1rTN9dOTvislu7UXVJELwo4ZRjrMfSW1ioPwklP5ktl8dgkWcilopNd=w120-h120-l90-rj",
"durationSeconds": 320,
"isExplicit": true,
"playCount": 63000000
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [YtmSongSummaryResponse] | false | none | none |
» videoId | string | true | none | none |
» title | string | true | none | none |
» artist | string | true | none | none |
» albumName | string¦null | false | none | none |
» albumBrowseId | string¦null | false | none | none |
» thumbnailUrl | string¦null | false | none | none |
» durationSeconds | integer(int32) | false | none | none |
» isExplicit | boolean | false | none | none |
» playCount | integer(int64) | false | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/short/{videoId} \
-H 'Accept: application/json'
GET http://localhost:8080/short/{videoId} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/short/{videoId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/short/{videoId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/short/{videoId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/short/{videoId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/short/{videoId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/short/{videoId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /short/{videoId}
Gets the information for a short given its id
Name | In | Type | Required | Description |
---|---|---|---|---|
videoId | path | string | true | none |
> Example responses
> 200 Response
{
"id": "2zp2x4V6fUM",
"description": "#trincredible",
"viewCount": 1598744,
"likeCount": null,
"likesDisabled": false,
"commentCount": 0,
"commentsDisabled": true,
"durationSeconds": 7,
"category": "People & Blogs",
"thumbnailUrl": "https://i.ytimg.com/vi/2zp2x4V6fUM/maxres2.jpg",
"frameZeroUrl": "https://i.ytimg.com/vi/2zp2x4V6fUM/frame0.jpg",
"creatorHandle": "@Trincredible",
"creatorName": "TRINCREDIBLE",
"attributedSound": {
"id": "m1a_GqJf02M",
"title": "God's Plan",
"thumbnailUrl": "https://lh3.googleusercontent.com/zOaDpfj2eyVVe1WX6_hRirEI0DZxghCjpg-wVOebZK3FS_Q7MJKddQ2z5MGLqcUlcWN9RlJME34xpRuA"
},
"createdAt": "2022-11-17T06:08:41Z"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | ShortInfo |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/song/{videoId} \
-H 'Accept: application/json'
GET http://localhost:8080/song/{videoId} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/song/{videoId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/song/{videoId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/song/{videoId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/song/{videoId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/song/{videoId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/song/{videoId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /song/{videoId}
Gets the song attributed to a short or video (if it has one)
Name | In | Type | Required | Description |
---|---|---|---|---|
videoId | path | string | true | none |
> Example responses
> 200 Response
{
"videoId": "FrsOnNxIrg8",
"title": "God's Plan",
"artist": "Drake",
"artistChannelId": "UCU6cE7pdJPc6DU2jSrKEsdQ",
"albumName": "Scorpion",
"albumBrowseId": "MPREb_ZBw3snXoAxN",
"thumbnailUrl": "https://lh3.googleusercontent.com/9Oe4acEXgmAlCKgcgI6JlSXi2Tj30u6anzvfGBrunGO-fLhBTgzy-ei1ugPJpZDD5ArKFod9H4RTA5g0=w544-h544-l90-rj",
"durationSeconds": 199,
"isExplicit": true,
"viewCount": 236912093,
"yearReleased": 2018
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | YtmSongDetailResponse |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/sound/{soundId} \
-H 'Accept: application/json'
GET http://localhost:8080/sound/{soundId} HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/sound/{soundId}',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/sound/{soundId}',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/sound/{soundId}', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/sound/{soundId}', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/sound/{soundId}");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/sound/{soundId}", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sound/{soundId}
Gets information for a sound given its id (it’s the same as the original video id)
Name | In | Type | Required | Description |
---|---|---|---|---|
soundId | path | string | true | none |
> Example responses
> 200 Response
{
"id": "FrsOnNxIrg8",
"title": "God's Plan",
"thumbnailUrl": "https://i.ytimg.com/vi/xpVfcZ0ZcFM/hq720.jpg",
"creatorChannelId": "UCByOQJjav0CUDwxCk-jVNRQ",
"creatorChannelHandle": "Drake",
"creatorChannelThumbnailUrl": "https://yt3.ggpht.com/ytc/AIdro_lst3aB43NFyIGxmCfG7wXmhS991KgNL2y16cRHYA=s720-c-k-c0x00ffffff-no-rj",
"sourceVideoType": "full_video",
"createCount": 237000,
"attributedSong": {
"title": "God's Plan",
"artists": "Drake",
"album": "Scorpion",
"originalSongId": "xpVfcZ0ZcFM"
},
"isOriginalSong": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | SoundInfoResponse |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
> Code samples
# You can also use wget
curl -X GET http://localhost:8080/sound/{soundId}/shorts \
-H 'Accept: application/json'
GET http://localhost:8080/sound/{soundId}/shorts HTTP/1.1
Host: localhost:8080
Accept: application/json
const headers = {
'Accept':'application/json'
};
fetch('http://localhost:8080/sound/{soundId}/shorts',
{
method: 'GET',
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Accept' => 'application/json'
}
result = RestClient.get 'http://localhost:8080/sound/{soundId}/shorts',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Accept': 'application/json'
}
r = requests.get('http://localhost:8080/sound/{soundId}/shorts', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Accept' => 'application/json',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('GET','http://localhost:8080/sound/{soundId}/shorts', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("http://localhost:8080/sound/{soundId}/shorts");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
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());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Accept": []string{"application/json"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "http://localhost:8080/sound/{soundId}/shorts", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
GET /sound/{soundId}/shorts
Returns the shorts created using a given sound
Name | In | Type | Required | Description |
---|---|---|---|---|
soundId | path | string | true | none |
perPage | query | integer | false | none |
currentPage | query | integer | false | none |
> Example responses
> 200 Response
[
{
"id": "mWs7BekO_Ck",
"viewCount": 207000,
"thumbnailUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/oar2.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLCEq4_DkamkrEtVYZZGMM1ZcrNIFA",
"frameZeroUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/frame0.jpg"
}
]
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | OK | Inline |
400 | Bad Request | Bad Request | Inline |
404 | Not Found | Not Found | Inline |
500 | Internal Server Error | Internal server error | Inline |
Status Code 200
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | [ShortSummary] | false | none | none |
» id | string | true | none | none |
» viewCount | integer(int64) | false | none | none |
» thumbnailUrl | string | true | none | none |
» frameZeroUrl | string | true | none | none |
Status Code 400
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 404
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
Status Code 500
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
» message | string | false | none | none |
{
"videoId": "k20wnICXpps",
"title": "Virginia Beach",
"durationSeconds": 252,
"playCount": 24000000,
"isExplicit": "true",
"artist": "Drake"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
videoId | string | true | none | none |
title | string | true | none | none |
durationSeconds | integer(int32) | false | none | none |
playCount | integer(int64) | false | none | none |
isExplicit | boolean | false | none | none |
artist | string | true | none | none |
{
"playlistId": "OLAK5uy_lRly1oG8OVTI3C2gZv0pPjYxH-Q3U6GrM",
"browseId": "MPREb_Wz5C5MGVpsz",
"title": "For All The Dogs",
"artist": "Drake",
"artistBrowseId": "UCU6cE7pdJPc6DU2jSrKEsdQ",
"songCount": 23,
"releaseYear": 2023,
"totalDurationSeconds": 5100,
"description": "For All the Dogs is the eighth studio album by Canadian rapper and singer Drake. It was released through OVO Sound and Republic Records on October 6, 2023. The album features guest appearances from Teezo Touchdown, 21 Savage, J. Cole, Yeat, SZA, PartyNextDoor, Chief Keef, Bad Bunny, Sexyy Red, and Lil Yachty. Production was handled by Drake, Teezo Touchdown, and Lil Yachty themselves, along with 40, Sango, Oz, Bnyx, Southside, Boi-1da, Vinylz, Tay Keith, FnZ, Jahaan Sweet, the late DJ Screw, Stwo, Gordo, Justin Raisen, and the Alchemist, among others.\\nThe Scary Hours edition of the album was released on November 17, 2023, containing six additional tracks. The album was supported by five singles: \"Slime You Out\", \"8AM in Charlotte\", \"Rich Baby Daddy\", \"First Person Shooter\" and \"You Broke My Heart\" for the Scary Hours edition. It follows both of Drake's albums that were released in 2022: his seventh studio album, Honestly, Nevermind, and his collaborative studio album with 21 Savage titled Her Loss.\\n\\nFrom Wikipedia (https://en.wikipedia.org/wiki/For_All_the_Dogs) under Creative Commons Attribution CC-BY-SA 3.0 (https://creativecommons.org/licenses/by-sa/3.0/legalcode)",
"isExplicit": "true",
"type": "album",
"songs": [
{
"videoId": "k20wnICXpps",
"title": "Virginia Beach",
"durationSeconds": 252,
"playCount": 24000000,
"isExplicit": "true",
"artist": "Drake"
}
]
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
playlistId | string | true | none | none |
browseId | string | true | none | none |
title | string | true | none | none |
artist | string | true | none | none |
artistBrowseId | string | false | none | none |
songCount | integer(int32) | false | none | none |
releaseYear | integer(int32) | false | none | none |
totalDurationSeconds | integer(int32) | false | none | none |
description | string | false | none | none |
isExplicit | boolean | false | none | none |
type | string | true | none | none |
songs | [YtmSongAlbum] | true | none | none |
{
"title": "Drake Related",
"url": "drakerelated.com",
"imageUrl": "https://encrypted-tbn3.gstatic.com/favicon-tbn?q=tbn:ANd9GcRwYSRiBIGjOa8rXhmjl04uAQ-LQyrsylaWbtCRjn7FX5S8mLnU_HzCuJ1WkSajdS1sA34UWcv6C9wire6KlgI9fIpklie-TVaLsKYRVY1FkNbyk5oaJxGZcA"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | none |
url | string | true | none | none |
imageUrl | string | true | none | none |
{
"id": "UCByOQJjav0CUDwxCk-jVNRQ",
"name": "Drake",
"handle": "@DrakeOfficial",
"isArtist": "true",
"isVerified": "false",
"isAutogenerated": "false",
"keywords": [
"drake",
"official",
"rap",
"music",
"pop",
"r&b",
"hip-hop",
"soul",
"more life",
"gods",
"plan",
"hotline",
"energy",
"portland",
"signs"
],
"subscribers": 29300000,
"videoCount": 62,
"viewCount": 17165624250,
"thumbnailUrl": "https://yt3.googleusercontent.com/ytc/AIdro_lewFv9zbVbOLXVtS1cmCkefB0uPJ6Rt5t8g-DGpA=s900-c-k-c0x00ffffff-no-rj",
"bannerUrl": "https://yt3.googleusercontent.com/N_-lXcK6MdKwjrXQMdPbEabFwcdudvpy2p-Xmeqa-TkSGFrGRs3txwJzlx38BfF8zrNR9izN=w1060-fcrop64=1,00005a57ffffa5a8-k-c0xffffffff-no-nd-rj",
"bioLinks": [
{
"title": "Drake Related",
"url": "drakerelated.com",
"imageUrl": "https://encrypted-tbn3.gstatic.com/favicon-tbn?q=tbn:ANd9GcRwYSRiBIGjOa8rXhmjl04uAQ-LQyrsylaWbtCRjn7FX5S8mLnU_HzCuJ1WkSajdS1sA34UWcv6C9wire6KlgI9fIpklie-TVaLsKYRVY1FkNbyk5oaJxGZcA"
}
],
"joinedDate": "2019-08-24T14:15:22Z",
"description": "https://www.ovosound.com\nhttps://www.drakerelated.com\n\n",
"country": null
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
name | string | true | none | none |
handle | string¦null | false | none | none |
isArtist | boolean | false | none | none |
isVerified | boolean | false | none | none |
isAutogenerated | boolean | false | none | none |
keywords | [string] | true | none | none |
subscribers | integer(int32)¦null | false | none | none |
videoCount | integer(int32)¦null | false | none | none |
viewCount | integer(int64)¦null | false | none | none |
thumbnailUrl | string | true | none | none |
bannerUrl | string | true | none | none |
bioLinks | [BioLink] | true | none | none |
joinedDate | string(date-time) | true | none | none |
description | string¦null | false | none | none |
country | string¦null | false | none | none |
{
"id": "mWs7BekO_Ck",
"viewCount": 207000,
"thumbnailUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/oar2.jpg?sqp=-oaymwEdCJUDENAFSFWQAgHyq4qpAwwIARUAAIhCcAHAAQY=&rs=AOn4CLCEq4_DkamkrEtVYZZGMM1ZcrNIFA",
"frameZeroUrl": "https://i.ytimg.com/vi/mWs7BekO_Ck/frame0.jpg"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
viewCount | integer(int64) | false | none | none |
thumbnailUrl | string | true | none | none |
frameZeroUrl | string | true | none | none |
{
"videoId": "Jo9sOqzoBHI",
"title": "Rich Baby Daddy (feat. Sexyy Red & SZA)",
"artist": "Drake",
"albumName": "For All The Dogs",
"albumBrowseId": "MPREb_Wz5C5MGVpsz",
"thumbnailUrl": "https://lh3.googleusercontent.com/LNtaC8gTrKrnikWZwYenbpcW-1rTN9dOTvislu7UXVJELwo4ZRjrMfSW1ioPwklP5ktl8dgkWcilopNd=w120-h120-l90-rj",
"durationSeconds": 320,
"isExplicit": true,
"playCount": 63000000
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
videoId | string | true | none | none |
title | string | true | none | none |
artist | string | true | none | none |
albumName | string¦null | false | none | none |
albumBrowseId | string¦null | false | none | none |
thumbnailUrl | string¦null | false | none | none |
durationSeconds | integer(int32) | false | none | none |
isExplicit | boolean | false | none | none |
playCount | integer(int64) | false | none | none |
{
"id": "m1a_GqJf02M",
"title": "God's Plan",
"thumbnailUrl": "https://lh3.googleusercontent.com/zOaDpfj2eyVVe1WX6_hRirEI0DZxghCjpg-wVOebZK3FS_Q7MJKddQ2z5MGLqcUlcWN9RlJME34xpRuA"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
title | string | true | none | none |
thumbnailUrl | string | true | none | none |
{
"id": "2zp2x4V6fUM",
"description": "#trincredible",
"viewCount": 1598744,
"likeCount": null,
"likesDisabled": false,
"commentCount": 0,
"commentsDisabled": true,
"durationSeconds": 7,
"category": "People & Blogs",
"thumbnailUrl": "https://i.ytimg.com/vi/2zp2x4V6fUM/maxres2.jpg",
"frameZeroUrl": "https://i.ytimg.com/vi/2zp2x4V6fUM/frame0.jpg",
"creatorHandle": "@Trincredible",
"creatorName": "TRINCREDIBLE",
"attributedSound": {
"id": "m1a_GqJf02M",
"title": "God's Plan",
"thumbnailUrl": "https://lh3.googleusercontent.com/zOaDpfj2eyVVe1WX6_hRirEI0DZxghCjpg-wVOebZK3FS_Q7MJKddQ2z5MGLqcUlcWN9RlJME34xpRuA"
},
"createdAt": "2022-11-17T06:08:41Z"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
description | string¦null | false | none | none |
viewCount | integer(int64) | false | none | none |
likeCount | integer(int32)¦null | false | none | none |
likesDisabled | boolean | false | none | none |
commentCount | integer(int32) | false | none | none |
commentsDisabled | boolean | false | none | none |
durationSeconds | integer(int32) | false | none | none |
category | string | true | none | none |
thumbnailUrl | string | true | none | none |
frameZeroUrl | string | true | none | none |
creatorHandle | string | true | none | none |
creatorName | string | true | none | none |
attributedSound | AttributedSound | false | none | none |
createdAt | string(date-time) | true | none | none |
{
"videoId": "FrsOnNxIrg8",
"title": "God's Plan",
"artist": "Drake",
"artistChannelId": "UCU6cE7pdJPc6DU2jSrKEsdQ",
"albumName": "Scorpion",
"albumBrowseId": "MPREb_ZBw3snXoAxN",
"thumbnailUrl": "https://lh3.googleusercontent.com/9Oe4acEXgmAlCKgcgI6JlSXi2Tj30u6anzvfGBrunGO-fLhBTgzy-ei1ugPJpZDD5ArKFod9H4RTA5g0=w544-h544-l90-rj",
"durationSeconds": 199,
"isExplicit": true,
"viewCount": 236912093,
"yearReleased": 2018
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
videoId | string | true | none | none |
title | string | true | none | none |
artist | string | true | none | none |
artistChannelId | string | true | none | none |
albumName | string | false | none | none |
albumBrowseId | string | false | none | none |
thumbnailUrl | string | false | none | none |
durationSeconds | integer(int32) | false | none | none |
isExplicit | boolean | false | none | none |
viewCount | integer(int32) | false | none | none |
yearReleased | integer(int32) | false | none | none |
{
"title": "God's Plan",
"artists": "Drake",
"album": "Scorpion",
"originalSongId": "xpVfcZ0ZcFM"
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | true | none | none |
artists | string | true | none | none |
album | string | true | none | none |
originalSongId | string | true | none | none |
{
"id": "FrsOnNxIrg8",
"title": "God's Plan",
"thumbnailUrl": "https://i.ytimg.com/vi/xpVfcZ0ZcFM/hq720.jpg",
"creatorChannelId": "UCByOQJjav0CUDwxCk-jVNRQ",
"creatorChannelHandle": "Drake",
"creatorChannelThumbnailUrl": "https://yt3.ggpht.com/ytc/AIdro_lst3aB43NFyIGxmCfG7wXmhS991KgNL2y16cRHYA=s720-c-k-c0x00ffffff-no-rj",
"sourceVideoType": "full_video",
"createCount": 237000,
"attributedSong": {
"title": "God's Plan",
"artists": "Drake",
"album": "Scorpion",
"originalSongId": "xpVfcZ0ZcFM"
},
"isOriginalSong": true
}
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
id | string | true | none | none |
title | string | true | none | none |
thumbnailUrl | string | true | none | none |
creatorChannelId | string | true | none | none |
creatorChannelHandle | string | true | none | none |
creatorChannelThumbnailUrl | string | true | none | none |
sourceVideoType | string | true | none | none |
createCount | integer(int32) | false | none | none |
attributedSong | AttributedSongResponse | false | none | none |
isOriginalSong | boolean | false | none | none |