Search

Search playlists

GET
https://peertube2.cpy.re/api/v1/search/video-playlists

Parameters

searchstringrequiredquery

String to search. If the user can make a remote URI search, and the string is an URI then the PeerTube instance will fetch the remote object and add it to its database. Then, you can use the REST API to fetch the complete playlist information and interact with it.

startinteger>= 0query

Offset used to paginate results

countinteger[1, 100]15query

Number of items to return

searchTargetstringlocalsearch-indexquery

If the administrator enabled search index support, you can override the default search target.

Warning: If you choose to make an index search, PeerTube will get results from a third party service. It means the instance may not yet know the objects you fetched. If you want to load video/channel information:

  • If the current user has the ability to make a remote URI search (this information is available in the config endpoint), then reuse the search API to make a search using the object URI so PeerTube instance fetches the remote object and fill its database. After that, you can use the classic REST API endpoints to fetch the complete object or interact with it
  • If the current user doesn't have the ability to make a remote URI search, then redirect the user on the origin instance or fetch the data from the origin instance API
sortstringquery

Sort column

hoststringquery

Find elements owned by this host

uuidsanyquery

Find elements with specific UUIDs

Response

200OKobject

successful operation

Response fields application/json
totalinteger
Example
1
Show child attributes
idid>= 1
Example
42
Example
9c9de5e8-0a1e-484a-b099-e80766180a6d
shortUUIDshortUUID
Show child attributes

translation of a uuid v4 with a bigger alphabet to have a shorter uuid

shortUUID
Example
2y84q2MQUMWPbiEcxNXMgC
createdAtstring<date-time>
updatedAtstring<date-time>
descriptionstring
displayNamestring
isLocalboolean
videoLengthinteger>= 0
thumbnailPathstring | nulldeprecated

Deprecated in PeerTube v8.1, use thumbnails instead. Null if the file is stored in object storage: use the non-deprecated field instead.

PeerTube >= 8.1 Array of thumbnails for the playlist

Show child attributes
fileUrlstring
widthinteger
heightinteger
aspectRatiostring
Example
16:9
Show child attributes

Video playlist privacy policy (see /video-playlists/privacies)

labelstring
Show child attributes

The video playlist type (Regular = 1, Watch Later = 2)

labelstring
ownerAccountAccountSummary
Show child attributes
idinteger
namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
Show child attributes
idid>= 1
Example
42
namestring
displayNamestring
urlstring<url>
hoststring<hostname>
Show child attributes
pathstring | nulldeprecated

Deprecated in PeerTube v8.0, use fileUrl instead. Null if the file is stored in object storage: use the non-deprecated field instead.

fileUrlstring

PeerTube >= 7.1

widthinteger
heightinteger

PeerTube >= 7.3

createdAtstring<date-time>
updatedAtstring<date-time>
videoChannelPositioninteger>= 1

Position of the playlist in the channel

500Internal Server Error

search index unavailable