GET api/v1/search/videos

cpy.re:peertube

Summary: Search videos
Operation ID: searchVideos
Auth: unknown

Parameters (26)

categoryOneOf (?, query, optional)

category id of the video (see [/videos/categories](#operation/getCategories))

count (integer, query, optional, default: 15)

Number of items to return

Constraints: {'minimum': 1, 'maximum': 100}

durationMax (integer, query, optional)

Get videos that have this maximum duration

durationMin (integer, query, optional)

Get videos that have this minimum duration

endDate (string, query, optional)

Get videos that are published before this date

excludeAlreadyWatched (boolean, query, optional)

Whether or not to exclude videos that are in the user's video history

hasHLSFiles (boolean, query, optional)

**PeerTube >= 4.0** Display only videos that have HLS files

hasWebtorrentFiles (boolean, query, optional)

**PeerTube >= 4.0** Display only videos that have WebTorrent files

include (integer, query, optional)

**PeerTube >= 4.0** Include additional videos in results (can be combined using bitwise or operator) - `0` NONE - `1` NOT_PUBLISHED_STATE - `2` BLACKLISTED - `4` BLOCKED_OWNER - `8` FILES

Constraints: {'enum': [0, 1, 2, 4, 8]}

isLive (boolean, query, optional)

whether or not the video is a live

isLocal (boolean, query, optional)

**PeerTube >= 4.0** Display only local or remote videos

languageOneOf (?, query, optional)

language id of the video (see [/videos/languages](#operation/getLanguages)). Use `_unknown` to filter on videos that don't have a video language

licenceOneOf (?, query, optional)

licence id of the video (see [/videos/licences](#operation/getLicences))

nsfw (string, query, optional)

whether to include nsfw videos, if any

Constraints: {'enum': ['true', 'false']}

originallyPublishedEndDate (string, query, optional)

Get videos that are originally published before this date

originallyPublishedStartDate (string, query, optional)

Get videos that are originally published after this date

privacyOneOf (?, query, optional)

**PeerTube >= 4.0** Display only videos in this specific privacy/privacies

search (string, query, required)

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 video information and interact with it.

searchTarget (string, query, optional)

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

Constraints: {'enum': ['local', 'search-index']}

skipCount (string, query, optional, default: false)

if you don't need the `total` in the response

Constraints: {'enum': ['true', 'false']}

sort (string, query, optional)

Sort videos by criteria (prefixing with `-` means `DESC` order):

Constraints: {'enum': ['name', '-duration', '-createdAt', '-publishedAt', '-views', '-likes', '-match']}

start (integer, query, optional)

Offset used to paginate results

Constraints: {'minimum': 0}

startDate (string, query, optional)

Get videos that are published after this date

tagsAllOf (?, query, optional)

tag(s) of the video, where all should be present in the video

tagsOneOf (?, query, optional)

tag(s) of the video

uuids (?, query, optional)

Find videos with specific UUIDs

No probe data for this endpoint yet.