2018-08-05 13:19:59 -04:00
|
|
|
##### GET `/api/v1/videos/:id`
|
|
|
|
> Schema:
|
2018-08-05 13:07:48 -04:00
|
|
|
```
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
},
|
|
|
|
],
|
|
|
|
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String,
|
|
|
|
"published": Int64
|
|
|
|
|
|
|
|
"keywords": Array(String),
|
|
|
|
"viewCount": Int64,
|
|
|
|
"likeCount": Int32,
|
|
|
|
"dislikeCount": Int32,
|
|
|
|
|
|
|
|
"isFamilyFriendly": Bool,
|
|
|
|
"allowedRegions": Array(String),
|
|
|
|
"genre": String,
|
|
|
|
|
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"allowRatings": Bool,
|
|
|
|
"rating": Float32,
|
|
|
|
"isListed": Bool,
|
2018-08-07 15:37:58 -04:00
|
|
|
"hlsUrl": String?,
|
2018-08-05 13:07:48 -04: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
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"captions": [
|
|
|
|
{
|
|
|
|
"label": String,
|
|
|
|
"languageCode": String
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"recommendedVideos": [
|
|
|
|
{
|
|
|
|
"videoId": String,
|
|
|
|
"title": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"author": String,
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"viewCountText" String
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-08-05 13:19:59 -04:00
|
|
|
##### GET `/api/v1/trending`
|
|
|
|
> Schema:
|
|
|
|
```
|
2018-08-05 13:30:33 -04:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height" Int32
|
|
|
|
],
|
|
|
|
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"viewCount": Int64,
|
|
|
|
|
|
|
|
"author": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
2018-08-05 13:31:51 -04:00
|
|
|
"published": Int64,
|
2018-08-05 13:30:33 -04:00
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String
|
|
|
|
}
|
|
|
|
]
|
2018-08-05 13:19:59 -04:00
|
|
|
```
|
2018-08-05 13:07:48 -04:00
|
|
|
|
2018-08-05 13:36:55 -04:00
|
|
|
##### GET `/api/v1/top`
|
|
|
|
> Schema:
|
|
|
|
```
|
2018-08-07 15:37:58 -04:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height" Int32
|
|
|
|
],
|
|
|
|
|
|
|
|
"lengthSeconds": Int32,
|
|
|
|
"viewCount": Int64,
|
|
|
|
|
|
|
|
"author": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"published": Int64,
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String
|
|
|
|
}
|
|
|
|
]
|
2018-08-05 13:36:55 -04:00
|
|
|
```
|
2018-08-05 13:07:48 -04:00
|
|
|
|
2018-08-05 13:36:55 -04:00
|
|
|
##### GET `/api/v1/channels/:ucid`
|
|
|
|
> Schema:
|
|
|
|
```
|
2018-08-07 15:37:58 -04:00
|
|
|
{
|
|
|
|
"author": String,
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
"authorBanners": [
|
|
|
|
{
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"authorThumbnails": [
|
|
|
|
{
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
|
|
|
|
"subCount": Int32,
|
|
|
|
"totalViews": Int64,
|
|
|
|
"joined": Int64,
|
|
|
|
"paid": Bool,
|
|
|
|
"isFamilyFriendly": Bool,
|
|
|
|
"description": String,
|
|
|
|
"allowedRegions": Array(String),
|
|
|
|
"latestVideos": [
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"published": Int64,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2018-08-05 13:36:55 -04:00
|
|
|
```
|
2018-08-05 13:07:48 -04:00
|
|
|
|
2018-08-05 13:36:55 -04:00
|
|
|
##### GET `/api/v1/channels/:ucid/videos`
|
|
|
|
> Schema:
|
|
|
|
```
|
2018-08-07 15:41:28 -04:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String,
|
2018-08-07 15:57:58 -04:00
|
|
|
|
2018-08-07 15:41:28 -04:00
|
|
|
"viewCount": Int64,
|
|
|
|
"published": Int64,
|
|
|
|
"lengthSeconds": Int32
|
|
|
|
}
|
|
|
|
]
|
2018-08-05 13:36:55 -04:00
|
|
|
```
|
2018-08-05 13:07:48 -04:00
|
|
|
|
2018-08-08 11:36:46 -04:00
|
|
|
Parameters:
|
|
|
|
```
|
|
|
|
page: Int32
|
|
|
|
```
|
|
|
|
|
2018-08-05 13:36:55 -04:00
|
|
|
##### GET `/api/v1/search`
|
|
|
|
> Schema:
|
|
|
|
```
|
2018-08-07 15:45:21 -04:00
|
|
|
[
|
|
|
|
{
|
|
|
|
"title": String,
|
|
|
|
"videoId": String,
|
|
|
|
"author": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"videoThumbnails": [
|
|
|
|
{
|
|
|
|
"quality": String,
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"description": String,
|
|
|
|
"descriptionHtml": String,
|
|
|
|
|
|
|
|
"viewCount": Int64,
|
|
|
|
"published": Int64,
|
|
|
|
"lengthSeconds": Int32
|
|
|
|
}
|
|
|
|
]
|
2018-08-05 13:36:55 -04:00
|
|
|
```
|
2018-08-07 15:57:58 -04:00
|
|
|
|
2018-08-08 11:36:46 -04:00
|
|
|
Parameters
|
|
|
|
```
|
|
|
|
q: String,
|
|
|
|
page: Int32,
|
|
|
|
sort_by: "relevance", "rating", "upload_date", "view_count"
|
|
|
|
date: "hour", "today", "week", "month", "year"
|
|
|
|
duration: "short", "long"
|
|
|
|
```
|
|
|
|
|
2018-08-07 15:57:58 -04:00
|
|
|
##### GET `/api/v1/captions/:id`
|
|
|
|
> Schema:
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"captions": [
|
|
|
|
{
|
|
|
|
"label": String,
|
|
|
|
"languageCode": String
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2018-08-08 11:36:46 -04:00
|
|
|
Parameters
|
|
|
|
```
|
|
|
|
label: String
|
|
|
|
```
|
|
|
|
|
|
|
|
A request with `label` will return the selected captions in WebVTT format.
|
|
|
|
|
|
|
|
|
2018-08-07 15:57:58 -04:00
|
|
|
##### GET `/api/v1/comments/:id`
|
|
|
|
> Schema:
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"commentCount": Int32?,
|
|
|
|
"comments": [
|
|
|
|
{
|
|
|
|
"author": String,
|
|
|
|
"authorThumbnails": [
|
|
|
|
"url": String,
|
|
|
|
"width": Int32,
|
|
|
|
"height": Int32
|
|
|
|
],
|
|
|
|
"authorId": String,
|
|
|
|
"authorUrl": String,
|
|
|
|
|
|
|
|
"content": String,
|
|
|
|
"published": Int64,
|
|
|
|
"likeCount": Int32,
|
|
|
|
"commentId": String,
|
|
|
|
|
|
|
|
"replies": {
|
|
|
|
"replyCount": Int32,
|
|
|
|
"continuation": String
|
2018-08-07 16:01:55 -04:00
|
|
|
}?
|
2018-08-07 15:57:58 -04:00
|
|
|
}
|
2018-08-07 16:00:34 -04:00
|
|
|
],
|
|
|
|
"continuation": String?
|
2018-08-07 15:57:58 -04:00
|
|
|
}
|
2018-08-08 11:36:46 -04:00
|
|
|
```
|
|
|
|
|
|
|
|
Parameters:
|
|
|
|
```
|
|
|
|
continuation: String
|
2018-08-07 15:57:58 -04:00
|
|
|
```
|