Search videos
Parameters
searchstringrequiredqueryString 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 video information and interact with it.
uuidsanyqueryFind elements with specific UUIDs
searchTargetstringlocalsearch-indexqueryIf 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
startinteger>= 0queryOffset used to paginate results
countinteger[1, 100]15queryNumber of items to return
skipCountstringtruefalsefalsequeryif you don't need the total in the response
sortstringname-duration-createdAt-publishedAt-views-likes-comments-trending-hot-bestquerynsfwstringtruefalsequerywhether to include nsfw videos, if any
aiUsageOneOfVideoAIUsageSet | Array<VideoAIUsageSet>queryPeerTube >= 9.0 Only list videos with one of these AI usages, declared by video creators.
If not provided, the preference of the authenticated user (aiUsagesHidden) is used
isLivebooleanquerywhether or not the video is a live
includeScheduledLivebooleanquerywhether or not include live that are scheduled for later
categoryOneOfVideoCategorySet | Array<VideoCategorySet>querycategory id of the video (see /videos/categories)
licenceOneOfVideoLicenceSet | Array<VideoLicenceSet>querylicence id of the video (see /videos/licences)
languageOneOfVideoLanguageSet | Array<VideoLanguageSet>querylanguage id of the video (see /videos/languages). Use _unknown to filter on videos that don't have a video language
tagsOneOfstring | Array<string>querytag(s) of the video
tagsAllOfstring | Array<string>querytag(s) of the video, where all should be present in the video
isLocalbooleanqueryPeerTube >= 4.0 Display only local or remote objects
includeinteger012481632queryOnly administrators and moderators can use this parameter
Include additional videos in results (can be combined using bitwise or operator)
0NONE1NOT_PUBLISHED_STATE2BLACKLISTED4BLOCKED_OWNER8FILES16CAPTIONS32VIDEO SOURCE
hasHLSFilesbooleanqueryPeerTube >= 4.0 Display only videos that have HLS files
hasWebVideoFilesbooleanqueryPeerTube >= 6.0 Display only videos that have Web Video files
hoststringqueryFind elements owned by this host
autoTagOneOfstring | Array<string>queryPeerTube >= 6.2 Admins and moderators only filter on videos that contain one of these automatic tags
stateOneOfid | Array<id>queryPeerTube >= 8.2 Admins and moderators only filter on videos that have one of these states
PeerTube >= 4.0 Display only videos in this specific privacy/privacies
excludeAlreadyWatchedbooleanqueryWhether or not to exclude videos that are in the user's video history
startDatestring<date-time>queryGet videos that are published after this date
endDatestring<date-time>queryGet videos that are published before this date
originallyPublishedStartDatestring<date-time>queryGet videos that are originally published after this date
originallyPublishedEndDatestring<date-time>queryGet videos that are originally published before this date
durationMinintegerqueryGet videos that have this minimum duration
durationMaxintegerqueryGet videos that have this maximum duration
Response
successful operation
search index unavailable