interface SearchOptions {
    accessControl?: Video.AccessControl;
    categories?: string;
    channelId?: string;
    count?: number;
    exactMatch?: boolean;
    filter?: SearchFilterEnum;
    fromModifiedDate?: string;
    fromPublishedDate?: string;
    fromUploadDate?: string;
    hasHls?: boolean;
    includeTranscriptSnippets?: boolean;
    ownerIds?: string;
    owners?: string;
    q?: string;
    recommendedFor?: string;
    searchField?: LiteralString<"title" | "tags" | "uploader" | "categories">;
    sortDirection?: SortDirection;
    sortField?: SortFieldEnum;
    status?: LiteralString<"active" | "inactive">;
    toModifiedDate?: string;
    toPublishedDate?: string;
    toUploadDate?: string;
    type?: VideoType;
    unlisted?: LiteralString<"all" | "unlisted" | "listed">;
    uploaderIds?: string;
    uploaders?: string;
    videoIds?: string | string[];
    [key: string]: any;
}

Indexable

  • [key: string]: any

    search for videos matching specific custom field values. Object in the format {My_Custom_Field_Name: "MyCustomFieldValue"}

Properties

accessControl?: Video.AccessControl

If provided, videos will be filtered by access control

categories?: string

list of category IDs separated by commas. pass blank to get uncategorized only

channelId?: string

If channelId provided, videos in that particular channel are returned. User should have rights to the channel

count?: number

Number of videos to get (default is 50)

exactMatch?: boolean

Filter the results based on the channels and categories the Principal is subscribed OR apply the recommendation logic which boosts search results based on recent viewing history using up to the last 10 videos viewed by a user.

fromModifiedDate?: string
fromPublishedDate?: string
fromUploadDate?: string
hasHls?: boolean

if true only HLS videos are returned

includeTranscriptSnippets?: boolean
ownerIds?: string

Owner GUIDs to get specific videos owner by these users. Example: ownerIds=abc, xyz

owners?: string

Retrieve videos owned by users by searching with the username as the search criterion. Example: owners=johndoe,janedoe

q?: string

text to search for

recommendedFor?: string

Show recommended videos for the specified Username. Videos returned are based on the user’s last 10 viewed videos. Must be Account Admin or Media Admin to use this query. Sort order must be _score. User must exist.

searchField?: LiteralString<"title" | "tags" | "uploader" | "categories">

If provided, the query results are fetched on the provided searchField only. If the exactMatch flag is also set along with searchField, then the results are fetched for an exact match on the provided searchField only.

sortDirection?: SortDirection
sortField?: SortFieldEnum
status?: LiteralString<"active" | "inactive">
toModifiedDate?: string
toPublishedDate?: string
toUploadDate?: string
type?: VideoType

live or vod videos

unlisted?: LiteralString<"all" | "unlisted" | "listed">
uploaderIds?: string

list of uploader IDs separated by commas

uploaders?: string

Use the first and last name of the uploader or an exact match of the uploader's username. Note that partial matches may still be returned. For example, uploaders="john doe" will retrieve all videos uploaded by a user with the first and last name "john doe". To return an exact match, you must use the uploaderIds query string

videoIds?: string | string[]

specific videoIds to search for