Search parameters

The most important parameters that control how the platform performs search requests are as follows:

Required parameters for both text and image queries

  • index_id: The unique identifier of the index containing your videos.
  • options: An array specifying the sources of information the platform should use.

Text query parameters

  • query_text: The text query to search for. This parameter is required for text queries.

Image query parameters

  • query_media_type: The type of media you wish to use. For example, to use an image as your query set this parameter to image. This parameter is required for media queries.
  • query_media_url: The publicly accessible URL of the media file you wish to use. This parameter is required for media queries if query_media_file is not provided.
  • query_media_file: The path of the image file you wish to provide. This parameter is required for image queries if query_media_url is not provided.

Optional parameters for both text and image queries

  • operator: The logical operator to apply when performing searches across multiple sources of information specified in the options array. Supported values:

    • or: Returns video segments that match any of the specified sources of information.
    • and: Returns video segments that match all of the specified sources of information.
      If the options array contains more than one value and the operator parameter is omitted, the platform defaults to a logical OR operation.
      The following diagram illustrates the difference between the OR and AND logical operators:

    Logical Operators

For a detailed description of each field, refer to the API Reference > Any-to-video search page.