Video Search
Video Search
The Vision API provides powerful video search capabilities through the /videos/search
endpoint, which allows you to search through your uploaded videos using semantic queries.
Search Videos
Search through your videos using natural language queries:
Search Parameters
query
(required): Natural language search querylimit
(optional): Maximum number of results to returnthreshold
(optional): Confidence threshold level from 0 (lowest) to 1 (highest). Different queries may need different thresholds based on their specificity and the nature of your search.
Search Response
The search endpoint returns relevant video chunks with confidence scores relative to your search query:
Note: Confidence scores (0.0 to 1.0) are relative to your specific search query. A score of 0.95 for “person walking on beach” indicates high relevance to that particular query, not an absolute measure of query matching. Thresholds may vary significantly for each query and will require experimentation - one query might have a highest score of 0.8 while another query has 0.2 as the highest score, depending on the specificity and content of your videos.
Response Fields
video_chunk_id
: Unique identifier for the specific video chunkvideo_id
: ID of the parent videoscore
: Confidence score (0.0 to 1.0) relative to your search querystart_timestamp
: Start time of the chunk in secondsend_timestamp
: End time of the chunk in secondss3_presigned_url
: Direct access URL for the video chunk
Search Examples
Basic Content Search
Search with Threshold and Limit
Search with no threshold
Best Practices
- Use descriptive queries for better search results
- Set appropriate thresholds based on your query type and needs:
- Specific queries (e.g., “red car driving on highway”): Use higher thresholds (0.7-0.9) for precise matches
- General queries (e.g., “people”): Use lower thresholds (0.2-0.5) to capture more results
- Exploratory searches: Use very low thresholds (0.1-0.3) to discover content
- Production applications: Start with moderate thresholds (0.4-0.6) and adjust based on results
- Understand confidence scores are relative to your query, not absolute video quality
- Set reasonable limits to manage response size
- Experiment with different thresholds for the same query to find optimal results
- Consider query complexity: Simple queries may need lower thresholds, complex queries may need higher thresholds
- Remember threshold variability: Each query may have different score ranges - one query’s highest score might be 0.8 while another’s is 0.2, requiring different threshold strategies
Search Tips
- Be specific: “person walking on beach” is better than “walking”
- Use natural language: The search understands conversational queries
- Adjust threshold based on query type:
- Specific objects/actions: Higher thresholds (0.7+)
- General concepts: Lower thresholds (0.3-0.6)
- Broad categories: Very low thresholds (0.1-0.3)
- Consider your use case: Use lower thresholds for exploratory searches, higher for precise filtering
- Monitor confidence scores: Higher scores indicate better matches for your specific query
- Remember relativity: A 0.9 score for one query might be different than 0.9 for another query
- Test different thresholds: The same query may work better with different thresholds depending on your video content