Skip to main content
GET
Get asset counts

Query Parameters

library_id
string | null

Library to count assets in (optional)

group_by
string
default:month

Time period to group counts by. Only month is supported; other values return 422.

Allowed value: "month"
album_id
string | null

Return only assets in this album — the album's album_ ID, not its name.

person_id
string | null

Filter by assets associated with a specific person ID

local_datetime_after
string<date-time> | null

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.

local_datetime_before
string<date-time> | null

Only include assets captured strictly before this instant (ISO 8601; exclusive). Same conversion requirement and awareness/offset semantics as local_datetime_after.

state
enum<string>
default:live

Which set of assets to count: live (default — excludes trashed assets), trashed (only trashed assets), or all (both live and trashed).

Available options:
live,
trashed,
all
limit
integer
default:20

Maximum number of time buckets to return (1-200)

Required range: 1 <= x <= 200

Response

Successful Response

data
TimeBucketCount · object[]
required

Time bucket and count pairs, ordered by time bucket descending

has_more
boolean
required

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).