Search assets
Searches for assets using semantic (CLIP-based) image-content matching and/or structured filters on people and date range. Use this tool when the user describes what’s in the photos they want — subjects, scenes, places, activities, moods, objects — as opposed to browsing by album membership or exact ID.
A natural-language query can be combined with structured filters (person_ids, captured_before, captured_after) for precision. For example, ‘photos of my kids at the beach last summer’ becomes query='kids at the beach' + captured_after=2025-06-01 + captured_before=2025-09-01.
Use list_assets instead when the request can be answered with exact filters alone (album, person, date range, ID) — it’s cheaper and more deterministic than semantic search.
Does not filter by location/place today; pass place names as part of query and rely on semantic matching until a structured location filter lands.
At least one of query, person_ids, captured_before, or captured_after must be provided.
Query Parameters
Library to search. Optional if the user has a single library; required when they have multiple. Use list_libraries to enumerate available libraries.
Natural-language description of the image content to search for. Matched against CLIP image embeddings, so it works best with concrete visual concepts: subjects, scenes, objects, settings ('beach sunset', 'birthday cake', 'mountain hike').
Prefer structured params when available: use person_ids for people (not names in query) and captured_before/captured_after for dates (not phrases like 'in 2023' in query).
Filter to assets containing ALL of these person IDs (intersection, not union). Accepts multiple person_ids= query params or a single comma-delimited value (e.g., person_123,person_abc). Get person IDs from list_people. Plural on this tool; the sibling list_assets uses person_id (singular).
Only include assets captured strictly before this instant (ISO 8601; exclusive). Equivalent in purpose to local_datetime_before on list_assets (naming inconsistency is tracked as a follow-up).
Only include assets captured strictly after this instant (ISO 8601; exclusive). Equivalent in purpose to local_datetime_after on list_assets (naming inconsistency is tracked as a follow-up).
1-indexed page number. search_assets uses page-number pagination; the sibling list_assets uses cursor pagination via starting_after_id. Increment page to fetch subsequent pages.
x >= 1Maximum number of results per page (1–200). Defaults to 20.
1 <= x <= 200Maximum semantic distance for a result to be included (0.0 = identical, 1.0 = unrelated). Lower values return fewer, more confident matches; higher values return more results with looser matching. Default 0.8 is moderate — try 0.6 for high-precision queries, 0.9 for exploratory searches. Note: this is inverted from the usual 'similarity score' convention where higher means more similar.
0 <= x <= 1Opt-in expansion fields. Supported values: metadata (camera/EXIF/GPS and location names), faces, people, metrics (ML quality scores), file_data (a group token populating the nested file_data object with the file/provenance scalars device_asset_id, device_id, file_created_at, file_modified_at, checksum, checksum_sha1, file_size_bytes), and variants (the non-thumbnail asset_urls size variants; without it asset_urls carries only its lean rung — thumbnail, or thumbnail_image for a video with an extracted still, or original for a still-less video — so callers that render non-thumbnail variants must pass it). Accepts multiple include= query params or a single comma-delimited value (e.g. include=faces,people). Unknown values return 422. When omitted, only the lean core is returned (id, mime_type, local_datetime, dimensions, description, thumbhash, asset_urls) and each data field above is null/absent until you request it.
Response
Successful Response
Matching assets ordered by semantic distance (closest first) when query is set.