Get asset counts
Changed onCounts 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, newest-first by default or oldest-first when order=asc, with optional filtering by album, album membership, people, rating, media type, date range, location, 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; for content-based search use search_assets.
Pagination: When has_more is true, pass the last time_bucket from data as starting_after_bucket. Repeat the same group_by, order, date bounds, and non-date filters. Count bounds, the cursor, and returned bucket starts are timezone-naive local-calendar values.
Request
- Base URL: https://api.gumnut.ai
- URL: https://api.gumnut.ai/api/assets/counts
- Auth: one of:
- HTTP bearer
- HTTP bearer
Query parameters
Library to count assets in. Optional if the user has a single live (non-trashed) library; required when they have multiple.
Calendar period for asset-count buckets: day, week, month, or year.
Week buckets run Sunday through Saturday.
Calendar period to use for each count bucket.
Return only assets in this album — the album's album_ ID, not its name.
Which assets to include, based on album membership: in_album returns assets filed into at least one album; not_in_album returns assets in no album at all — the ones still waiting to be organized; all returns both.
Filter by album membership in general, rather than by membership of one specific album. This filter is independent of album_id, but combining not_in_album with album_id is contradictory and returns 422. Defaults to all.
Deprecated compatibility alias for one person_ids value. Do not combine it with person_ids.
Filter to assets containing faces belonging to ALL of these people (intersection, not union). Accepts up to 200 IDs across repeated person_ids= query params or comma-delimited values. Person IDs are carried by the entries of an asset's people field (returned with include=people).
Which media class an asset belongs to.
Every image format is image and every video format is video. An asset's class is fixed by the file originally uploaded, so an edited photo is still image.
Filter to one media class (image or video). Omit to include both images and videos.
Return assets whose effective rating is one of these exact values. Values must be integers from 0 through 5; 5 is a favorite. 0 matches every unrated form: an explicit zero, a null or legacy out-of-range effective rating, or an asset with no metadata. Accepts repeated ratings= parameters or one comma-delimited value. Omit the parameter for no rating filter.
Only include assets captured strictly after this local wall-clock datetime (ISO 8601; exclusive). Asset counts accept timezone-naive values only; a Z suffix or timezone offset returns 422. Repeat this bound unchanged on every pagination page.
Only include assets captured strictly before this local wall-clock datetime (ISO 8601; exclusive). Asset counts accept timezone-naive values only; a Z suffix or timezone offset returns 422. Repeat this bound unchanged on every pagination page.
Center point of a radius location filter: two comma-separated decimal-degree numbers longitude,latitude, e.g. -77.05,38.95. Supply with radius. Mutually exclusive with bbox.
Radius of the center location filter, in meters (greater than 0, at most 50,000). Supply with center. Mutually exclusive with bbox.
Bounding-box (map viewport) location filter: four comma-separated decimal-degree numbers min_longitude,min_latitude,max_longitude,max_latitude (west,south,east,north), e.g. -77.1,38.9,-77.0,39.0. A box whose min_longitude exceeds max_longitude crosses the antimeridian: it selects the band running east from min_longitude over ±180° to max_longitude, so there is no need to split it client-side. Longitude order is therefore significant — transposed corners read as a crossing viewport, not as an error. A viewport 360° or wider must be sent as the full range -180,...,180,..., which the wrapped form cannot express. Mutually exclusive with center/radius.
Cursor for time-bucket pagination. Pass the last returned time_bucket unchanged; buckets after it in the requested order are returned. Omit for the first page.
Which set of assets to count: live (default — excludes trashed assets), trashed (only trashed assets), or all (both live and trashed).
Sort direction for capture-date buckets: desc returns newest buckets first; asc returns oldest buckets first.
Maximum number of time buckets to return per page (1–200). Defaults to 20.
Response
Successful Response
Changes
- breaking
the
queryrequest parametergroup_bywas restricted to a list of enum values - info
added the new optional
queryrequest parameterbbox - info
added the new optional
queryrequest parametercenter - info
added the new optional
queryrequest parametermedia_type - info
added the new optional
queryrequest parameterorder - info
added the new optional
queryrequest parameterradius - info
added the new optional
queryrequest parameterratings - info
added the new optional
queryrequest parameterstarting_after_bucket - info
added the new enum value
dayto thequeryrequest parametergroup_by - info
added the new enum value
monthto thequeryrequest parametergroup_by - info
added the new enum value
weekto thequeryrequest parametergroup_by - info
added the new enum value
yearto thequeryrequest parametergroup_by - info
added the non-success response with the status
- info
added the non-success response with the status
- breaking
- info
added the new optional
queryrequest parameterperson_ids - info
queryrequest parameterperson_idwas deprecated
- info