Search

Moment retrieval

Use ranked local asset references to retrieve the moments your workflow needs.

FieldMeaning
idLocal identifier of an authorized photo or video.
scoreRanking score for this search. Higher-scoring hits appear first.
matchedTimestampOptional video offset in seconds. This is not the asset’s capture date.

Search returns ranked asset hits. Use their identifiers to look up local moment membership, capture dates, date ranges, activities, places, and media types in the host app.

Optional debugging metadata#

FieldMeaning
channelsOptional. Retrieval methods contributing to the match, such as lexical, visualSemantic, or conceptSemantic. Omitted from default results.

Use channels to inspect retrieval behavior during development. Product workflows can use the result’s score and local asset metadata without depending on the retrieval methods.

One event, several assets#

A moment groups related photos and videos from a real-world event. Group the returned asset references by their local moment to select candidate clips or photos without treating every near-duplicate as a separate memory.

Use moments in a workflow#

  1. Search locally for the kind of moment the feature needs.
  2. Use each hit’s score, together with local dates and moment metadata, to select candidates.
  3. Resolve authorized local references through the host app’s Photos access.
  4. Let the user review a selection when the workflow calls for it.

A local reference is not a download URL or a durable server identifier. It can become unavailable if media is deleted or the user changes photo access.