Skip to main content
POST
/
search
Search within videos
curl --request POST \
  --url https://api.trytldw.ai/v1/search/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "collection_id": "<string>",
  "search_term": "<string>",
  "media_ids": [
    "<string>"
  ],
  "similarity_threshold": 0.28,
  "offset": 0,
  "limit": 30,
  "configs": {
    "smart_remove_false_positive": false
  },
  "filter": {
    "user_id": "1221"
  }
}
'
{
  "scenes": [
    {
      "media_id": "<string>",
      "external_id": "<string>",
      "start_ms": 123,
      "end_ms": 123,
      "max_similarity": 123,
      "fragments": [
        {
          "uuid": "<string>",
          "start_ms": 123,
          "end_ms": 123,
          "similarity": 123,
          "description": "<string>"
        }
      ]
    }
  ],
  "metadata": {}
}

Authorizations

Authorization
string
header
required

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

Body

application/json
collection_id
string
required

The collection UUID to search within

search_term
string
required

The text query used for searching

media_ids
string[]

A list of media UUIDs to filter the search

similarity_threshold
number
default:0.28

The minimum similarity score required to presented in search results

offset
integer
default:0

The pagination offset for search results

limit
integer
default:30

The maximum number of search results to return

configs
SearchConfigs · object

Additional configuration options for the search, such as removing false positives

filter
Filter · object

Optional filters to apply to the search results. For now, it only supports matching value on metadata fields

Example:
{ "user_id": "1221" }

Response

Successful Response

scenes
Scene · object[]
required
metadata
Metadata · object
required