# Search by text

**Description**
By using the *Search Route*, you can utilize Bria's generative search capabilities, which don't require labels or keywords. The user can send any text query and receive relevant images that match the query.
The *Search Route* returns the images, sorted by the match score, from highest match to lowest match. The images are returned in batches, and you can specify how many images to receive in one batch, and which batch to receive in each call.
Search will only work on images that have been onboarded using the `register` endpoint.
**Note:** To use this endpoint, please [Contact Us](https://bria.ai/contact-us).

Endpoint: GET /search

## Query parameters:

  - `query` (string)
    the text query for which the user is looking for matching images.

  - `num_results_per_page` (integer)
    how many images you would like to receive from the gallery search. The default value is 50. The maximum value is 500. No need to use this parameter when gallery_search=false.

  - `page` (integer)
    which batch of images you would like to receive in the current call. Synthetic results will only be included in page no. 1. The default value is 1. For each query, we support 800 results, so if you set num_results_per_page=50, you will have 16 pages of results.

  - `gallery_id` (string)
    Bria will provide you with this parameter which represents your account's image gallery. You must include this parameter.

  - `style` (string)
    Which style you would like to see in your results, this parameter is optional.

  - `atmosphere` (string)
    Which atmosphere you would like to get in your results, this parameter is optional.

  - `camera` (string)
    Which camera angle you would like to see in your results, this parameter is optional.

  - `medium` (string)
    Which medium should be included in your results, this parameter is optional.

## Header parameters:

  - `api_token` (string, required)

## Response 200 fields (application/json):

  - `results` (array)
    there are multiple objects in this array (based on the amount specified in num_results_per_page) and each object represents a single image. The images in the array are sorted by the similarity score, from the highest to the lowest. If the specified batch (=page) is empty, the results array will be empty.

  - `results.visual_id` (string)
    visual id of the image, documented in Bria.
    Example: a169a6862f24de75

  - `results.org_image_key` (string)
    It will be returned if the image was registered using an org_image_key.
    Example: None

  - `results.source_url` (string)
    It will be returned if the image was registered using a URL.
    Example: None

