VideoDB icon

VideoDB

Interact with the VideoDB API

Search in a Video

AI-generated

Summary

Search for a query within a video using specified search and index types.

Inputs

  • collection_id (required) — Choose from the list, or specify an ID using an expression. Determines which collection the video belongs to.
  • video_id (required) — The ID of the video to search within. Depends on collection_id for dynamic loading.
  • search_type (required) — Type of search (semantic, keyword, scene). Defaults to semantic.
  • index_type — Type of index to use for search (spoken_word or scene). Defaults to spoken_word.
  • query (required) — Search query string.
  • score_threshold — Minimum score for a result to be included. Defaults to 0.
  • result_threshold — Maximum number of results to return. Defaults to 10.
  • dynamic_score_percentage — Dynamic score percentage adjustment. Defaults to 0.

Output shape

Returns search results from the VideoDB API for the specified video, matching the query using the selected search and index types.

Results include media segments or moments matching the query criteria, filtered by score and result thresholds.

Examples

Example 1: Search a video for semantic matches to a spoken phrase.

collection_id from list, video_id from collection, search_type=semantic, query=your phrase

Discussion