Skip to navigation

Video Search by Assets

Runs the same semantic video search as Video Search (POST /api/v1/search/video), scoped to a set of assets you provide. Pass the IDs from your own system in asset_ids and the name of the metadata field that holds those IDs in asset_identifier_key (for example, external_id). Coactive normalizes the key, matches the IDs against that metadata field in the dataset, and searches only the matching videos. If none of the IDs match an asset in the dataset, the response contains an empty results list. This endpoint doesn’t accept metadata_filters. The response has the same shape as Video Search: one result per video, with the most relevant composite slice and a preview keyframe. Defaults to 400 results (max 400).

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
dataset_idstringRequiredformat: "uuid"
The unique identifier for the dataset
text_querystringRequired>=2 characters
The natural language search string
asset_idslist of stringsRequired

IDs of the assets to search within, as stored in the metadata field named by asset_identifier_key.

asset_identifier_keystringRequired

Name of the metadata field that holds the IDs in asset_ids.

negative_textstring or nullOptional>=2 characters
Optional text describing what to exclude from search results
offsetintegerOptionalDefaults to 0

Starting index to return (default 0)

limitintegerOptional1-400Defaults to 400

Max number of results to return (default 400, max 400)

modalityenum or nullOptional

Modality of the video to search for ( video, shot, image ). Valid options: “video”, “shot”, “image”, “audio_speech_to_text”, “capped-shot-segment”. Default is ‘video’.

Allowed values:
skip_moderationbooleanOptionalDefaults to false
Skip content moderation if enabled
moderation_score_typeenumOptional
Type of moderation scores to return when moderation is enabled
Allowed values:

Response

Successful Response
resultslist of objects
List of video search results

Errors

422
Unprocessable Entity Error
504
Gateway Timeout Error