Skip to main content
POST
/
api
/
search
Search assets
curl --request POST \
  --url https://api.example.com/api/search \
  --header 'Content-Type: multipart/form-data' \
  --form 'library_id=<string>' \
  --form 'query=<string>' \
  --form 'image=<string>' \
  --form 'person_ids=<string>' \
  --form captured_before=2023-11-07T05:31:56Z \
  --form captured_after=2023-11-07T05:31:56Z \
  --form page=1 \
  --form limit=50 \
  --form threshold=0.8 \
  --form image.0='@example-file'
{
  "data": [
    {
      "asset": {
        "id": "<string>",
        "device_asset_id": "<string>",
        "device_id": "<string>",
        "mime_type": "<string>",
        "original_file_name": "<string>",
        "file_created_at": "2023-11-07T05:31:56Z",
        "file_modified_at": "2023-11-07T05:31:56Z",
        "local_datetime": "2023-11-07T05:31:56Z",
        "checksum": "<string>",
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "checksum_sha1": "<string>",
        "exif": {
          "asset_id": "<string>",
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "make": "<string>",
          "model": "<string>",
          "orientation": 123,
          "modified_datetime": "2023-11-07T05:31:56Z",
          "original_datetime": "2023-11-07T05:31:56Z",
          "digitized_datetime": "2023-11-07T05:31:56Z",
          "lens_model": "<string>",
          "f_number": 123,
          "focal_length": 123,
          "iso": 123,
          "exposure_time": 123,
          "exposure_bias": 123,
          "latitude": 123,
          "longitude": 123,
          "altitude": 123,
          "city": "<string>",
          "state": "<string>",
          "country": "<string>",
          "description": "<string>",
          "fps": 123,
          "live_photo_cid": "<string>",
          "projection_type": "<string>",
          "profile_description": "<string>",
          "auto_stack_id": "<string>",
          "rating": 123
        },
        "metrics": {},
        "download_url": "<string>",
        "thumbnail_url": "<string>",
        "faces": [
          {
            "id": "<string>",
            "asset_id": "<string>",
            "bounding_box": {},
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "person_id": "<string>",
            "timestamp_ms": 123,
            "thumbnail_url": "<string>"
          }
        ],
        "people": [
          {
            "id": "<string>",
            "is_hidden": true,
            "is_favorite": true,
            "created_at": "2023-11-07T05:31:56Z",
            "updated_at": "2023-11-07T05:31:56Z",
            "name": "<string>",
            "birth_date": "2023-12-25",
            "thumbnail_face_id": "<string>",
            "thumbnail_face_url": "<string>"
          }
        ],
        "width": 0,
        "height": 0,
        "file_size_bytes": 0
      },
      "distance": 123
    }
  ]
}

Body

multipart/form-data
library_id
string | null

Library to search assets from (optional)

query
string | null

The text query to search for. If you want to search for a specific person or set of people, use the person_ids parameter instead.If you want to search for a photos taken during a specific date range, use the captured_before and captured_after parameters instead.

image
file | null

Image file to search for similar assets. Can be combined with text query.

person_ids
string[] | null

Filter to only include assets containing ALL of these person IDs. Can be comma-delimited string (e.g. 'person_123,person_abc') or multiple query parameters.

captured_before
string<date-time> | null

Filter to only include assets captured before this date (ISO format).

captured_after
string<date-time> | null

Filter to only include assets captured after this date (ISO format).

page
integer
default:1

Page number

Required range: x >= 1
limit
integer
default:50

Number of results per page

Required range: 1 <= x <= 1000
threshold
number
default:0.8

Similarity threshold (lower means more similar)

Required range: 0 <= x <= 1

Response

Successful Response

data
SearchResultItem · object[]
required