How This Helps
Caption Search enables you to retrieve relevant media using natural phrases like “beach sunset” or “red car”—not just exact keyword matches.
Overview
TheGET /api/v1/explore/{dataset_id}
endpoint enables semantic caption search using the image_caption
parameter.
This type of search returns results based on intent and meaning, not just exact text.
Example
A query for"beach sunset"
may return:
- “A man at the beach on sunset”
- “Golden sun setting over the ocean waves”
red car
— matches loosely related red items and cars"red car"
— matches images of an actual red car
Authentication
All API calls require a bearer token:Textual Caption Search
Endpoint
Required Parameters
Name | Type | Description |
---|---|---|
image_caption | string | The search query (e.g. "beach sunset" ) |
threshold | integer | Clustering threshold (0–4) |
entity_type | string | Must be IMAGES or OBJECTS |
textual_similarity_threshold | float | Score cutoff (0.0–1.0) for relevance |
Example (cURL)
Response Example
Response Breakdown
clusters
: Visual similarity groupsmedia
: Individual resultscaption
: Caption matchrelevance_score
: Quality of the matchpreview
: Thumbnail preview
Filter and Refine
Add Similarity Threshold
Filter by Tags and Labels
Python Client
Example Usage
Advanced Techniques
Phrase Match
Semantic Exclusions
Best Practices
- Use specific queries
- Set a minimum similarity threshold
- Use tags and labels to focus results
- Sort using
relevance_score
- Remember: visual clusters ≠ semantic clusters
Pagination Helper
Error Handling
Limitations
- Max 100 results per page
- Minimum threshold: 0.5
- Quality depends on caption accuracy
- Complex phrasing may yield fuzzy results