This endpoint will be deprecated. TwelveLabs recommends you use the Any-to-video search endpoint instead.
Your search query. Note that the platform supports full natural language-based search. The following examples are valid queries: “birds flying near a castle,” “sun shining on the water,” “chickens on the road,” “an officer holding a child’s hand.”, “crowd cheering in the stadium.”
The unique identifier of the index to search.
An array that specifies the sources of information the platform uses when performing a search. For details, see the Search options page.
operator
parameter described below to broaden or narrow your search.This parameter specifies the strictness of the thresholds for assigning the high, medium, or low confidence levels to search results. If you use a lower value, the thresholds become more relaxed, and more search results will be classified as having high, medium, or low confidence levels. You can use this parameter to include a broader range of potentially relevant video clips, even if some results might be less precise.
Min: 0 Max: 1 Default: 0.5
Use this parameter to group or ungroup items in a response. It can take one of the following values:
video
: The platform will group the matching video clips in the response by video.clip
: The matching video clips in the response will not be grouped.Default: clip
Use this parameter to filter on the level of confidence that the results match your query.
Default: low
Use this parameter to specify the sort order for the response.
When performing a search, the platform determines the level of confidence that each video clip matches your search terms. By default, the search results are sorted on the level of confidence in descending order.
If you set this parameter to score
and group_by
is set to video
, the platform will determine the maximum value of the score
field for each video and sort the videos in the response by the maximum value of this field. For each video, the matching video clips will be sorted by the level of confidence.
If you set this parameter to clip_count
and group_by
is set to video
, the platform will sort the videos in the response by the number of clips. For each video, the matching video clips will be sorted by the level of confidence. You can use clip_count
only when the matching video clips are sorted by video.
Default: score
When you perform a search specifying multiple sources of information, you can use the this parameter to broaden or narrow your search.
The following logical operators are supported:
or
and
For details and examples, see the Using multiple sources of information section.
Default: or
.
Specifies the type of match the platform will perform. The following values are supported: semantic
and exact_match
. For details, see the Conversation option page.
Default: semantic
The number of items to return on each page. When grouping by video, this parameter represents the number of videos per page. Otherwise, it represents the maximum number of video clips per page.
Max: 50
.
For string fields, the filter parameter
returns only the results that equal the value you specify. The following example filters on the videos whose title is “Animal Encounters part 1”: "title": "Animal Encounters part 1"
.
For numeric fields, the filter
parameter returns the results that match based on the arithmetic comparison. The following example filters on the videos whose height is greater than or equal to 400 and less than or equal to 500: "height": { "gte": 400, "lte": 500 }
.
To enable filtering by custom fields:
PUT
method of the /indexes/:index-id/videos/:video-id
endpointneedsReview
of type boolean is true
, use: "needs_review": true
.For more details and examples, see the Filter search results based on metadata page.
Successfully performed a search request.
An array that contains your search results. For each match found, the engine returns the following fields:
An object that provides information about pagination.
An object that contains details about the index you queried.