Get asset counts
Counts assets bucketed by time period — use this to summarize a library (or a filtered slice) without paging through the full timeline. Returns one row per bucket, ordered most-recent-first, with optional filtering by album, person, date range, or trash state.
To list the actual assets within a bucket, call list_assets with the same filters and a local_datetime_after / local_datetime_before window matching the bucket. Does not filter by image content or location; for content-based search use search_assets.
Pagination: When has_more is true, pass the last time_bucket value from data as local_datetime_before to fetch the next page.
Query Parameters
Library to count assets in (optional)
Time period to group counts by. Only month is supported; other values return 422.
"month"Return only assets in this album — the album's album_ ID, not its name.
Filter by assets associated with a specific person ID
Only include assets captured strictly after this instant (ISO 8601; exclusive). Convert a relative or natural-language date phrase ('in 2023') into an explicit bound before sending. local_datetime is the photo's wall-clock time in the device's own timezone. Naive values compare directly against local_datetime. Timezone-aware values: assets with a known offset are compared in UTC (local_datetime - offset); assets without an offset fall back to wall-clock comparison against local_datetime.
Only include assets captured strictly before this instant (ISO 8601; exclusive). Same conversion requirement and awareness/offset semantics as local_datetime_after.
Which set of assets to count: live (default — excludes trashed assets), trashed (only trashed assets), or all (both live and trashed).
live, trashed, all Maximum number of time buckets to return (1-200)
1 <= x <= 200Response
Successful Response
Time bucket and count pairs, ordered by time bucket descending
True if there are more time buckets. To fetch the next page, pass the last time_bucket value as local_datetime_before (exclusive — buckets starting before that value are returned).