results is a collection,
so access video_id on an individual event, not on results:
Each event is also a dictionary:
event["video_id"] is equivalent to
event.video_id. Use event.get("end_time") for an optional field. To inspect
all fields returned for a particular event, use dict(first[0]) after checking
that first is nonempty.
Deep Search returns the reranker’s selected matches. Like the app, the SDK
does not hide lower-scoring returned matches. When a rerank score is available,
the display labels it Strong match (0.75+), Good match (0.5+), or
Related (below 0.5). To select only strong matches in code:
score is a model relevance score for this query, not a calibrated
probability that the event occurred. The display tiers are presentation
thresholds, not accuracy guarantees. Do not compare scores across different
queries or model versions as if they shared a calibrated scale. For a quality
threshold, review a labeled sample against the source footage and measure
precision for your own use case.
If a newly created Studio returns no events while its search index is starting,
queued, or building, search() retries every 10 seconds and prints status
updates in plain language. You may see “Searching your Studio… New datasets
can take a few minutes to prepare.” It returns as soon as matches are available
or the index is ready.
After three minutes, it raises TimeoutError with a message to try again in a
few minutes. A ready index with no matches returns an empty result normally.
Set timeout=300 to wait longer, show_progress=False to silence updates, or
wait_for_index=False to return the first response without polling.
Refining a result with results.filter(...) keeps these wait settings.
Iteration returns the ranked matches in this response. top_k defaults to 50
and can be at most 1,000; search results do not paginate beyond it. Check
results["truncated"] to see whether the reranker or response limit left
candidate matches unexamined or undisplayed. False does not certify that
candidate retrieval found every real-world occurrence. Use
results.first(10) when you only need a sample.
Refine by taxonomy
Add an exact taxonomy condition to the same search. This sends a new request; the originalresults stays available. The condition is applied before Deep
Search reranks the matching events.
Watch the matches
In a notebook, display the matching videos and click an event to play from its timestamp when available:visualize() requests short-lived video URLs only when
you call it, and shows the first 10 matching videos by default. Pass
max_videos=5 to show fewer. Saved viewers need fresh URLs after 15 minutes;
run visualize() again to refresh them. Video playback requires access to the
source videos.