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 if the user has a single live (non-trashed) library; required when they have multiple.
Library to count assets in. Optional if the user has a single live (non-trashed) library; required when they have multiple.
Time period to group counts by. Only month is supported; other values return 422.
Time period to group counts by. Only month is supported; other values return 422.
Return only assets in this album — the album's album_ ID, not its name.
Return only assets in this album — the album's album_ ID, not its name.
Count only assets containing a face belonging to this person.
Count only assets containing a face belonging to this person.
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 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.
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).
Which set of assets to count: live (default — excludes trashed assets), trashed (only trashed assets), or all (both live and trashed).
Maximum number of time buckets to return per page (1–200). Defaults to 20.
Maximum number of time buckets to return per page (1–200). Defaults to 20.
Response
Successful Response