2018-08-05 19:19:59 +02:00
|
|
|
##### GET `/api/v1/videos/:id`
|
2018-09-28 17:58:34 +02:00
|
|
|
|
|
|
|
> Schema:
|
|
|
|
|
|
|
|
```javascript
|
2018-08-05 19:07:48 +02:00
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
2018-09-28 17:58:34 +02:00
|
|
|
{
|
2018-08-05 19:07:48 +02:00
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"published": Int64,
|
|
|
|
"publishedText": String,
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:07:48 +02:00
|
|
|
"keywords": Array(String),
|
|
|
|
"viewCount": Int64,
|
|
|
|
"likeCount": Int32,
|
|
|
|
"dislikeCount": Int32,
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:07:48 +02:00
|
|
|
"isFamilyFriendly": Bool,
|
|
|
|
"allowedRegions": Array(String),
|
|
|
|
"genre": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"genreUrl": String,
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:07:48 +02:00
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"allowRatings": Bool,
|
|
|
|
"rating": Float32,
|
|
|
|
"isListed": Bool,
|
2018-08-07 21:37:58 +02:00
|
|
|
"hlsUrl": String?,
|
2018-08-05 19:07:48 +02:00
|
|
|
|
|
|
|
"adaptiveFormats": [
|
|
|
|
{
|
|
|
|
"index": String,
|
|
|
|
"bitrate": String,
|
|
|
|
"init": String,
|
|
|
|
"url": String,
|
|
|
|
"itag": String,
|
|
|
|
"type": String,
|
|
|
|
"clen": String,
|
|
|
|
"lmt": String,
|
|
|
|
"projectionType": Int32,
|
|
|
|
"container": String,
|
|
|
|
"encoding": String,
|
|
|
|
"qualityLabel": String?,
|
|
|
|
"resolution": String?
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"formatStreams": [
|
|
|
|
{
|
|
|
|
"url": String,
|
|
|
|
"itag": String,
|
|
|
|
"type": String,
|
|
|
|
"quality": String,
|
|
|
|
"container": String,
|
|
|
|
"encoding": String,
|
|
|
|
"qualityLabel": String,
|
|
|
|
"resolution": String,
|
|
|
|
"size": String
|
2018-09-28 17:58:34 +02:00
|
|
|
},
|
2018-08-05 19:07:48 +02:00
|
|
|
],
|
|
|
|
"captions": [
|
|
|
|
{
|
|
|
|
"label": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"languageCode": String,
|
|
|
|
"url": String,
|
2018-08-05 19:07:48 +02:00
|
|
|
},
|
|
|
|
],
|
|
|
|
"recommendedVideos": [
|
|
|
|
{
|
|
|
|
"videoId": String,
|
|
|
|
"title": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"author": String,
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"viewCountText" String
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
##### GET `/api/v1/comments/:id`
|
|
|
|
|
|
|
|
> Schema:
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"commentCount": Int32?,
|
|
|
|
"comments": [
|
|
|
|
{
|
|
|
|
"author": String,
|
|
|
|
"authorThumbnails": [
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
],
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"content": String,
|
|
|
|
"contentHtml": String,
|
|
|
|
"published": Int64,
|
|
|
|
"publishedText": String,
|
|
|
|
"likeCount": Int32,
|
|
|
|
"commentId": String,
|
|
|
|
|
|
|
|
"replies": {
|
|
|
|
"replyCount": Int32,
|
|
|
|
"continuation": String
|
|
|
|
}?
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"continuation": String?
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
|
|
```
|
|
|
|
continuation: String
|
|
|
|
```
|
|
|
|
|
2018-09-28 18:00:38 +02:00
|
|
|
##### GET `/api/v1/insights/:id`
|
|
|
|
|
|
|
|
> Schema:
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"viewCount": Int64,
|
|
|
|
"timeWatchedText": String,
|
|
|
|
"subscriptionsDriven": Int32,
|
|
|
|
"shares": Int32,
|
|
|
|
"avgViewDurationSeconds": Int32,
|
|
|
|
|
|
|
|
"graphData": {
|
|
|
|
...
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
##### GET `/api/v1/captions/:id`
|
|
|
|
|
|
|
|
> Schema:
|
|
|
|
|
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"captions": [
|
|
|
|
{
|
|
|
|
"label": String,
|
|
|
|
"languageCode": String,
|
|
|
|
"url": String
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
|
|
|
```
|
|
|
|
label: String
|
|
|
|
```
|
|
|
|
|
|
|
|
A request with `label` will return the selected captions in WebVTT format.
|
|
|
|
|
2018-08-05 19:19:59 +02:00
|
|
|
##### GET `/api/v1/trending`
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:19:59 +02:00
|
|
|
> Schema:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:19:59 +02:00
|
|
|
```
|
2018-08-05 19:30:33 +02:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height" Int32
|
|
|
|
],
|
|
|
|
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"viewCount": Int64,
|
|
|
|
|
|
|
|
"author": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"authorId": String,
|
2018-08-05 19:30:33 +02:00
|
|
|
"authorUrl": String,
|
|
|
|
|
2018-08-05 19:31:51 +02:00
|
|
|
"published": Int64,
|
2018-09-28 17:48:24 +02:00
|
|
|
"publishedText": String,
|
2018-08-05 19:30:33 +02:00
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String
|
|
|
|
}
|
|
|
|
]
|
2018-08-05 19:19:59 +02:00
|
|
|
```
|
2018-08-05 19:07:48 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
##### GET `/api/v1/top`
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
> Schema:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-08-07 21:37:58 +02:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height" Int32
|
|
|
|
],
|
|
|
|
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"viewCount": Int64,
|
|
|
|
|
|
|
|
"author": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"authorId": String,
|
2018-08-07 21:37:58 +02:00
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"published": Int64,
|
2018-09-28 17:48:24 +02:00
|
|
|
"publishedText": String,
|
2018-08-07 21:37:58 +02:00
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String
|
|
|
|
}
|
|
|
|
]
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-08-05 19:07:48 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
##### GET `/api/v1/channels/:ucid`
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
> Schema:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-08-07 21:37:58 +02:00
|
|
|
{
|
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
"authorBanners": [
|
|
|
|
{
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"authorThumbnails": [
|
|
|
|
{
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-07 21:37:58 +02:00
|
|
|
"subCount": Int32,
|
|
|
|
"totalViews": Int64,
|
|
|
|
"joined": Int64,
|
|
|
|
"paid": Bool,
|
|
|
|
"isFamilyFriendly": Bool,
|
|
|
|
"description": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"descriptionHtml": String,
|
2018-08-07 21:37:58 +02:00
|
|
|
"allowedRegions": Array(String),
|
|
|
|
"latestVideos": [
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
2018-09-28 17:48:24 +02:00
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
2018-08-07 21:37:58 +02:00
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
2018-09-28 17:48:24 +02:00
|
|
|
],
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String,
|
|
|
|
"viewCount": Int64,
|
|
|
|
"published": Int64,
|
|
|
|
"publishedText": String,
|
|
|
|
"lengthSeconds": Int32
|
2018-08-07 21:37:58 +02:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-08-05 19:07:48 +02:00
|
|
|
|
2018-09-28 17:49:08 +02:00
|
|
|
##### GET `/api/v1/channels/:ucid/videos`, `/api/v1/channels/videos/:ucid`
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
> Schema:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
|
|
|
```javascript
|
2018-08-07 21:41:28 +02:00
|
|
|
[
|
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
title: String,
|
|
|
|
videoId: String,
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
2018-09-28 17:48:24 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
videoThumbnails: [
|
2018-08-07 21:41:28 +02:00
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
quality: String,
|
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
2018-08-07 21:41:28 +02:00
|
|
|
}
|
|
|
|
],
|
2018-09-28 17:58:34 +02:00
|
|
|
description: String,
|
|
|
|
descriptionHtml: String,
|
2018-08-07 21:57:58 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
viewCount: Int64,
|
|
|
|
published: Int64,
|
|
|
|
publishedText: String,
|
|
|
|
lengthSeconds: Int32
|
2018-08-07 21:41:28 +02:00
|
|
|
}
|
2018-09-28 17:58:34 +02:00
|
|
|
];
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-08-05 19:07:48 +02:00
|
|
|
|
2018-08-08 17:36:46 +02:00
|
|
|
Parameters:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
2018-08-08 17:36:46 +02:00
|
|
|
```
|
|
|
|
page: Int32
|
|
|
|
```
|
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
##### GET `/api/v1/channels/search/:ucid`
|
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
> Schema:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
|
|
|
```javascript
|
|
|
|
[
|
|
|
|
{
|
|
|
|
type: "video",
|
|
|
|
title: String,
|
|
|
|
videoId: String,
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
|
|
|
videoThumbnails: [
|
|
|
|
{
|
|
|
|
quality: String,
|
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
description: String,
|
|
|
|
descriptionHtml: String,
|
|
|
|
viewCount: Int64,
|
|
|
|
published: Int64,
|
|
|
|
publishedText: String,
|
|
|
|
lengthSeconds: Int32,
|
|
|
|
liveNow: Bool
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "playlist",
|
|
|
|
title: String,
|
|
|
|
playlistId: String,
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
|
|
|
|
|
|
|
videoCount: Int32,
|
|
|
|
videos: [
|
2018-09-29 02:19:15 +02:00
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
quality: String,
|
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2018-09-28 17:58:34 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
type: "channel",
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
|
|
|
|
|
|
|
authorThumbnails: [
|
|
|
|
{
|
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
subCount: Int32,
|
|
|
|
videoCount: Int32,
|
|
|
|
description: String,
|
|
|
|
descriptionHtml: String
|
|
|
|
}
|
|
|
|
];
|
|
|
|
```
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-09-28 17:58:34 +02:00
|
|
|
q: String
|
|
|
|
page: Int32
|
|
|
|
```
|
|
|
|
|
|
|
|
##### GET `/api/v1/search`
|
|
|
|
|
|
|
|
> Schema:
|
|
|
|
|
|
|
|
```javascript
|
2018-08-07 21:45:21 +02:00
|
|
|
[
|
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
type: "video",
|
|
|
|
title: String,
|
|
|
|
videoId: String,
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
|
|
|
videoThumbnails: [
|
2018-08-07 21:45:21 +02:00
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
quality: String,
|
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
2018-08-07 21:45:21 +02:00
|
|
|
}
|
|
|
|
],
|
2018-09-28 17:58:34 +02:00
|
|
|
description: String,
|
|
|
|
descriptionHtml: String,
|
|
|
|
viewCount: Int64,
|
|
|
|
published: Int64,
|
|
|
|
publishedText: String,
|
|
|
|
lengthSeconds: Int32,
|
|
|
|
liveNow: Bool
|
2018-09-28 17:48:24 +02:00
|
|
|
},
|
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
type: "playlist",
|
|
|
|
title: String,
|
|
|
|
playlistId: String,
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
|
|
|
|
|
|
|
videoCount: Int32,
|
|
|
|
videos: [
|
2018-09-29 02:19:15 +02:00
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
quality: String,
|
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2018-09-28 17:48:24 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
type: "channel",
|
|
|
|
author: String,
|
|
|
|
authorId: String,
|
|
|
|
authorUrl: String,
|
2018-09-28 17:48:24 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
authorThumbnails: [
|
2018-09-28 17:48:24 +02:00
|
|
|
{
|
2018-09-28 17:58:34 +02:00
|
|
|
url: String,
|
|
|
|
width: Int32,
|
|
|
|
height: Int32
|
2018-09-28 17:48:24 +02:00
|
|
|
}
|
|
|
|
],
|
2018-09-28 17:58:34 +02:00
|
|
|
subCount: Int32,
|
|
|
|
videoCount: Int32,
|
|
|
|
description: String,
|
|
|
|
descriptionHtml: String
|
2018-08-07 21:45:21 +02:00
|
|
|
}
|
2018-09-28 17:58:34 +02:00
|
|
|
];
|
2018-08-05 19:36:55 +02:00
|
|
|
```
|
2018-08-07 21:57:58 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
Parameters:
|
|
|
|
|
2018-08-08 17:36:46 +02:00
|
|
|
```
|
2018-09-28 17:58:34 +02:00
|
|
|
q: String
|
|
|
|
page: Int32
|
2018-08-08 17:36:46 +02:00
|
|
|
sort_by: "relevance", "rating", "upload_date", "view_count"
|
|
|
|
date: "hour", "today", "week", "month", "year"
|
|
|
|
duration: "short", "long"
|
2018-09-28 17:48:24 +02:00
|
|
|
type: "video", "playlist", "channel", "all", (default: video)
|
2018-08-08 17:36:46 +02:00
|
|
|
```
|
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
##### GET `/api/v1/playlists/:plid`
|
|
|
|
|
2018-08-07 21:57:58 +02:00
|
|
|
> Schema:
|
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
```javascript
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"playlistId": String,
|
2018-08-08 17:36:46 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorThumbnails": [
|
|
|
|
{
|
|
|
|
"url": String,
|
|
|
|
"width": String,
|
|
|
|
"height": String
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String,
|
2018-08-08 17:36:46 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
"videoCount": Int32,
|
|
|
|
"viewCount": Int64,
|
|
|
|
"updated": Int64,
|
2018-08-08 17:36:46 +02:00
|
|
|
|
2018-09-28 17:58:34 +02:00
|
|
|
"videos": [
|
2018-09-29 02:19:15 +02:00
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"index": Int32,
|
|
|
|
"lengthSeconds": Int32
|
|
|
|
}
|
2018-09-28 17:58:34 +02:00
|
|
|
]
|
2018-08-07 21:57:58 +02:00
|
|
|
}
|
2018-08-08 17:36:46 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Parameters:
|
2018-09-28 17:58:34 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
page: Int32
|
2018-08-08 17:36:46 +02:00
|
|
|
```
|