Youtube API
| Endpoint | Method | Description |
|---|---|---|
| jsonRpc | Info | |
| jsonRpc | Search | |
| jsonRpc | Resource info | |
| youtube:search | websocket | Search youtube |
| youtube:info | websocket | Info youtube |
| youtube:resourceInfo | websocket | Resource info youtube |
| youtube:getSourceUrl | websocket | Get source url |
| youtube:getUploadInfo | websocket | Get youtube upload info |
| resource:createYoutube | websocket | Create youtube resource |
| websocket | Create youtube resources |
Info
Method: jsonRpc
HTTP Method: POST
Path: /api/v0/rpc/youtube.info
DEPRECATED
Description: Deprecated, use websocket youtube:info instead
Request:
{
"url": string
"id": string
}
Response:
{
"data": {
"id": string
"title": string
"url": string
"embed": string
"thumbnail": string
}
"error": { "status": bool, "code": int, "message": string }
}
Search
Method: jsonRpc
HTTP Method: POST
Path: /api/v0/rpc/youtube.search
DEPRECATED
Description: Deprecated, use websocket youtube:search instead
Request:
{
"query": string
"type": string
"maxResults": int
}
Response:
{
"data": [{
"etag": string
"id": {
"channelId": string
"kind": string
"playlistId": string
"videoId": string
}
"kind": string
"snippet": {
"channelId": string
"channelTitle": string
"description": string
"liveBroadcastContent": string
"publishedAt": string
"thumbnails": {
"default": {
"height": int
"url": string
"width": int
}
"high": {
"height": int
"url": string
"width": int
}
"maxres": {
"height": int
"url": string
"width": int
}
"medium": {
"height": int
"url": string
"width": int
}
"standard": {
"height": int
"url": string
"width": int
}
}
"title": string
}
}]
"error": { "status": bool, "code": int, "message": string }
}
Resource info
Method: jsonRpc
HTTP Method: POST
Path: /api/v0/rpc/youtube.resourceInfo
DEPRECATED
Description: Deprecated, use websocket youtube:resourceInfo instead
Request:
{
"url": string
"id": string
}
Response:
{
"data": {
"remoteId": string
"title": string
"description": string
"thumbnail": string
"metadata": {
"fileDate": timestamp
"contentType": string
"link": string
}
}
"error": { "status": bool, "code": int, "message": string }
}
Search youtube
Method: websocket
Endpoint: youtube:search
Request:
{
"data": {
"query": string
"type": string
"maxResults": int
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": [{
"etag": string
"id": {
"channelId": string
"kind": string
"playlistId": string
"videoId": string
}
"kind": string
"snippet": {
"channelId": string
"channelTitle": string
"description": string
"liveBroadcastContent": string
"publishedAt": string
"thumbnails": {
"default": {
"height": int
"url": string
"width": int
}
"high": {
"height": int
"url": string
"width": int
}
"maxres": {
"height": int
"url": string
"width": int
}
"medium": {
"height": int
"url": string
"width": int
}
"standard": {
"height": int
"url": string
"width": int
}
}
"title": string
}
}]
"error": { "status": bool, "code": int, "message": string }
}
Info youtube
Method: websocket
Endpoint: youtube:info
Request:
{
"data": {
"url": string
"id": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"id": string
"title": string
"url": string
"embed": string
"thumbnail": string
}
"error": { "status": bool, "code": int, "message": string }
}
Resource info youtube
Method: websocket
Endpoint: youtube:resourceInfo
Request:
{
"data": {
"url": string
"id": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"Resource": {
"remoteId": string
"title": string
"description": string
"thumbnail": string
"metadata": {
"fileDate": timestamp
"contentType": string
"link": string
}
}
}
"error": { "status": bool, "code": int, "message": string }
}
Get source url
Method: websocket
Endpoint: youtube:getSourceUrl
Description: Get direct sources to youtube video by its id.
Request:
{
"data": {
"id": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"sources": [{
"type": string
"quality": string
"url": string
"expire": timestamp
}]
}
"error": { "status": bool, "code": int, "message": string }
}
Get youtube upload info
Method: websocket
Endpoint: youtube:getUploadInfo
Description: Get youtube upload info by its id.
Request:
{
"data": {
"id": string
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"info": {
"id": string
"title": string
"description": string
"thumbnail": string
"releaseDate": timestamp
"width": int
"height": int
"orientation": int
"formats": [{
"formatId": string
"type": string
"quality": string
"videoQuality": string
"fileSize": int
}]
}
"maxFileSize": int // file size limit for upload
}
"error": { "status": bool, "code": int, "message": string }
}
Create youtube resource
Method: websocket
Endpoint: resource:createYoutube
Request:
{
"data": {
"youtubeId": string
"formatId": string
"parent": string // mark that resource belongs to directory
"roomId": string // mark that resource belongs to room
"contributeToRoom": string // mark that resource belongs to room sorting table
"addToSortingTable": bool // mark that resource belongs to user sorting table
"belonging": string // use custom belonging (like 'userAIGeneration:{userId}')
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"resource": { resource structure }
}
"error": { "status": bool, "code": int, "message": string }
}
Create youtube resources
Method: websocket
Endpoint: resource:createYoutubeMulti
DEPRECATED
Description: Deprecated, use resource:createYoutube instead
Request:
{
"data": {
"ids": [ string ] // ids of youtube videos
"parent": string // mark that resource belongs to directory
"roomId": string // mark that resource belongs to room
"contributeToRoom": string // mark that resource belongs to room sorting table
"addToSortingTable": bool // mark that resource belongs to user sorting table
"belonging": string // use custom belonging (like 'userAIGeneration:{userId}')
}
"event": { "id": string, "date": timestamp }
}
Response:
{
"data": {
"resources": [{ resource structure }]
}
"error": { "status": bool, "code": int, "message": string }
}
Models
Resource
{
"id": string
"created": timestamp
"updated": timestamp
"title": string
"description": string
"location": string
"date": string
"category": string
"linkId": string // id of resource link is pointing to
"linkType": string // global/local
"encryptionVersion": string // encryption version, like 'verus.v1'
"encryptionEpoch": int // epoch defines key bundle that was used for encryption
"encryptionEpk": string // ephemeral public key that should be used to decrypt cypher data
"belonging": string // determines resource location in the system in a way 'belongingType:belongingPath(networkId)'
"status": string // pending/processing/ready/failed
"metadata": {
"fileName": string
"fileSize": int
"fileDate": timestamp
"behaviourType": string
"contentType": string
"convertedFrom": string
"link": string
"origin": { resource origin structure }
"geolocation": { geolocation structure }
"dimensions": { dimensions structure }
}
"thumbnail": string
"fromTemplate": bool
"totalReactions": int // amount of users who reacted to the resource
"data": {
"audio": { resource data audio structure }
"video": { resource data video structure }
"amazon": { resource data amazon structure }
"imdb": { resource data imdb structure }
"youtube": { resource data youtube structure }
"pinterest": { resource data pinterest structure }
"pixabay": { resource data pixabay structure }
"facebook": { resource data facebook structure }
"remoteUrl": { resource data remote url structure }
"liveStream": { live stream data structure }
"aiGeneration": { ai generation data structure }
"thumbnailUrl": string
"downloadUrl": string
"directory": { resource data directory structure }
"channel": { channel data structure }
"googleDrive": { google drive structure }
}
"customParams": map[string]{ custom structure } // client defined parameters
"actions": [{ programmatic action with children structure }] // custom programmatic actions from users
}
Resource Origin
{
"type": string
"device": string
"deviceName": string
"path": string
}
Geolocation
{
"latitude": float
"longitude": float
}
Dimensions
{
"width": int
"height": int
"orientation": int
}
Resource Data Audio
{
"title": string
"artist": string
"album": string
"genre": string
"duration": int
"durationFloat": float
}
Resource Data Video
{
"duration": int
"durationFloat": float
"hasAlphaChannel": bool // true, if video generated from gif with transparent pixels
"alphaChannel": string // alpha channel video resource (if generated from gif)
}
Resource Data Amazon
{
"asin": string
"summary": string
"author": [ string ]
"manufacturer": string
"title": string
"publicationDate": string
"url": string
}
Resource Data Imdb
{
"Actors": string
"Genre": string
"Ratings": [{
"Source": string
"Value": string
}]
"Released": string
"Runtime": string
"Website": string
"Year": string
"Trailers": [ string ]
"imdbID": string
}
Resource Data Youtube
{
"videoId": string
"formatId": string
}
Resource Data Pinterest
{
"pin": string
"url": string
}
Resource Data Pixabay
{
"id": string
"pageUrl": string
}
Resource Data Facebook
{
"id": string
}
Resource Data Remote Url
{
"url": string
"urlType": string
"favicon": string
"title": string
}
Live Stream Data
{
"streamId": string
"assetId": string
"playbackUrl": string
"masterUrl": string
}
AI Generation Data
{
"generationModel": string // the model used for image generation [dall-e-3]
"prompt": string // a text description of the desired image
"revisedPrompt": string // the prompt that was used to generate the image, if there was any revision to the prompt
"url": string // the URL of the generated image
}
Resource Data Directory
{
"innerContentType": string
"innerContentCount": int
}
Channel Data
{
"communityId": string
"channelId": string
"subChannelId": string
"messageId": string
}
Google Drive
{
"fileId": string
"name": string
"mimeType": string
}
Programmatic Action with children
{
"localId": string // local action id, operated by client side only
"eventName": string
"actionName": string
"actionData": {
"usedPropId": string
"usedRoomId": string
"usedNetworkId": string
"usedStorylineId": string
"usedQuestionId": int
"usedQuestionnaireId": int
"usedSegmentId": string
"usedPlacementAreaId": string
"usedRoomPoint": string
"animationData": map[string]{ custom structure }
}
"childActions": [{ programmatic action structure }]
}
Programmatic Action
{
"localId": string // local action id, operated by client side only
"eventName": string
"actionName": string
"actionData": {
"usedPropId": string
"usedRoomId": string
"usedNetworkId": string
"usedStorylineId": string
"usedQuestionId": int
"usedQuestionnaireId": int
"usedSegmentId": string
"usedPlacementAreaId": string
"usedRoomPoint": string
"animationData": map[string]{ custom structure }
}
}