* Add playlist attachment type * add viewCountText to video object
4 KiB
Channels endpoint
Please refer to the Common object types page for more details on the various JSON objects used below.
GET /api/v1/channels/:id
Response:
{
"author": String,
"authorId": String,
"authorUrl": String,
"authorVerified": Boolean,
"authorBanners": [
// One or more ImageObject
],
"authorThumbnails": [
// One or more ImageObject
],
"subCount": Number, // Integer
"totalViews": Number, // Integer
"joined": Number, // Unix timestamp
"autoGenerated": Boolean,
"isFamilyFriendly": Boolean,
"description": String,
"descriptionHtml": String,
"allowedRegions": String[],
"tabs": String[],
"latestVideos": [
// One or more VideoObject
],
"relatedChannels": [
// One or more ChannelObject
]
}
GET /api/v1/channels/:id/channels
URL parameters:
continuation
: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
Response:
{
"relatedChannels": [
// One or more ChannelObject
],
"continuation": String
}
GET /api/v1/channels/:id/latest
This is the same as requesting /api/v1/channels/:id/videos
without URL parameters.
GET /api/v1/channels/:id/playlists
URL parameters:
continuation
: A continuation token to get the next chunk of items. The token is provided each time this API is requested.sort_by
: Sort order filter. Accepted values:oldest
,newest
,last
. Defaults tolast
.
Response:
{
"playlists": [
// One or more PlaylistOject
],
"continuation": continuation
}
GET /api/v1/channels/:id/shorts
URL parameters:
continuation
: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
Response:
See: GET /api/v1/channels/:id/videos
GET /api/v1/channels/:id/streams
URL parameters:
continuation
: A continuation token to get the next chunk of items. The token is provided each time this API is requested.
Response:
See: GET /api/v1/channels/:id/videos
GET /api/v1/channels/:id/videos
URL parameters:
continuation
: A continuation token to get the next chunk of items. The token is provided each time this API is requested.sort_by
: Sort order filter. Accepted values:newest
,popular
oroldest
(Broken as of 10/2022). Default tonewest
.
Response:
{
"videos": [
// One or more VideoObject
],
"continuation": String
}
GET /api/v1/channels/:id/community
Please refer to the Community Post Attachment types below for more details on the attachment JSON objects used below.
Url parameters
continuation
: A continuation token to get the next chunk of items.
Response:
{
"authorId": String,
"comments": {
"attachment": ImageAttachment | MultiImageAttachment | VideoAttachment | PollAttachment | PlaylistAttachment
"author": String,
"authorIsChannelOwner": Boolean
"authorId": String,
"authorThumbnails": ImageObject[],
"authorUrl": String,
"commentId": String,
"content": String,
"contentHtml": String,
"isEdited": Boolean,
"likeCount": Number,
"published": Number,
"publishedText": String,
"replyCount": Number
}[]
}
Community Post Attachment Types
VideoAttachment See VideoObject common type
PlaylistAttachment See PlaylistObject common type
ImageAttachment
{
"type": "image",
"imageThumbnails": ImageObject[]
}
MultiImageAttachment
{
"type": "multiImage",
"images": ImageObject[][]
}
PollAttachment
{
"type": "poll",
"totalVotes": Number,
"choices": {
"text": String,
"image?": ImageObject[]
}[]
}
Unknown
This usually means that parsing support for the attachment type has not yet been implemented.
{
"type": "unknown",
"error": String
}