The SearchClient class provides methods to perform search requests.
Description: This method performs a search across a specific index using text, media, or a combination of both as your query and returns a paginated iterator of search results.
Text queries:
query_text parameter to specify your query.Media queries:
query_media_type parameter to the corresponding media type (example: image).query_media_url: Publicly accessible URL of your media file.query_media_file: Local media file.
If you specify both, query_media_url takes precedence.query_media_urls: Publicly accessible URLs of your media files.query_media_files: Local media files.Composed text and media queries:
query_text parameter for your text query.query_media_type to image.query_media_url, query_media_file, query_media_urls, or query_media_files.When using images in your search queries (either as media queries or in composed searches), ensure your image files meet the requirements.
Entity search:
query_text parameter.For instructions on setting up and using this feature, see the Entity search page.
This method is rate-limited. For details, see the Rate limits page.
Function signature and example:
Returns a SyncPager[SearchItem] object that allows you to iterate through the paginated search results.
The SyncPager[T] class contains the following properties and methods:
The SearchItem class contains the following properties:
The SearchItemClipsItem class contains the following properties:
This section lists the most common error messages you may encounter while performing search requests.
search_option_not_supported
{search_option} is not supported for index {index_id}. Please use one of the following search options: {supported_search_option}.search_option_combination_not_supported
{search_option} is not supported with {other_combination}.search_filter_invalid
search_page_token_expired
{next_page_token}.index_not_supported_for_search:
For a list of general errors that apply to all endpoints, see the Error codes page.