Get Photos day counts
GET
/api/v1/photos/timeline/buckets
const url = 'https://example.com/api/v1/photos/timeline/buckets?filter=all';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/api/v1/photos/timeline/buckets?filter=all' \ --header 'Authorization: Bearer <token>'Requires a signed-in User. It returns days from newest to oldest with counts and the total number of items. It can filter to Videos or Stacks and repeated tags that require every selected Tag. Route: /api/v1/photos/timeline/buckets. Inputs: filter, tag. Safe reads can use bounded retries.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”filter
Which timeline groups a read returns. videos keeps groups whose display
item is a video; stacks keeps RAW+JPEG pairs, Live Photos and bursts.
string
tag
Array<string>
Repeat tag to require every selected Tag (#1109, DESIGN §33).
Responses
Section titled “Responses”Media typeapplication/json
object
days
required
Newest day first.
Array<object>
One day and its group count, without tiles.
object
count
required
integer format: int64
day
required
string
total
required
Sum of every day’s count.
integer format: int64
Examplegenerated
{ "days": [ { "count": 1, "day": "example" } ], "total": 1}Media typeapplication/json
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}