Make any-to-video search requests
Make any-to-video search requests
Make any-to-video search requests
Use this endpoint to search for relevant matches in an index using text, media, or a combination of both as your query.
Text queries:
query_text parameter to specify your query.Media queries:
query_media_type parameter to the corresponding media type (example: image).query_media_url: Publicly accessible URL of your media file.query_media_file: Local media file.
Composed text and media queries:query_text parameter for your text query.query_media_type to image.query_media_url and query_media_file parameters multiple times.Entity search (beta):
query_text parameter.The type of media you wish to use. This parameter is required for media queries. For example, to perform an image-based search, set this parameter to image. Use query_text together with this parameter when you want to perform a composed image+text search.
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.
Specifies whether to include user-defined metadata in the search results.
An array that contains your search results. For each match found, the model returns the following fields:
Your API key.
You can find your API key on the API Keys page.
The publicly accessible URL of a media file to use as a query. This parameter is required for media queries if query_media_file is not provided.
You can provide up to 10 images by specifying this parameter multiple times:
A local media file to use as a query. This parameter is required for media queries if query_media_url is not provided.
You can provide up to 10 images by specifying this parameter multiple times:
The text query to search for. This parameter is required for text queries. Note that the platform supports full natural language-based search. You can use this parameter together with query_media_type and query_media_url or query_media_file to perform a composed image+text search.
If you’re using the Entity Search feature to search for specific persons in your video content, you must enclose the unique identifier of your entity between the <@ and > markers. For example, to search for an entity with the ID entity123, use <@entity123> is walking as your query.
Marengo supports up to 500 tokens per query.
Specifies the modalities the video understanding model uses to find relevant information.
Available options:
visual: Searches visual content.audio: Searches non-speech audio.transcription: Spoken wordsoperator parameter described below to broaden or narrow your search. For example, to search using both visual and non-speech audio content, include this parameter two times in the request as shown below:
For guidance, see the Search options section.
Specifies how the platform matches your text query with the words spoken in the video. This parameter applies only when the search_options parameter contains the transcription value.
Available options:
lexical: Exact word matchingsemantic: Meaning-based matchingFor details on when to use each option, see the Transcription options section.
Default: ["lexical", "semantic"].
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
Combines multiple search options using or or and. Use and to find segments matching all search options. Use or to find segments matching any search option. For detailed guidance on using this parameter, see the Combine multiple modalities section.
Default: or.
Specifies a stringified JSON object to filter your search results. Supports both system-generated metadata (example: video ID, duration) and user-defined metadata.
Syntax for filtering
The following table describes the supported data types, operators, and filter syntax:
System-generated metadata
The table below describes the system-generated metadata available for filtering your search results:
User-defined metadata
To filter by user-defined metadata:
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 page.