Skip to content
Skip to Content
DevelopersAPI referenceBilling

Get a summary of the user's library

GET
/v1/stats

Counts for the Plan & usage page: totals, items by kind, storage by type, and saves this week and today. On every plan; it makes no model calls and does not count towards AI limits. API keys need read on account, like GET /v1/billing.

  • Deleted items never count. Archived items count in totals.items, by_kind, activity and favourites, as usage.items of GET /v1/billing does; totals.items and storage.total_bytes always equal that endpoint's usage.items and usage.storage_bytes.
  • Days and hours are read in tz; weeks start on Monday.
  • Every number is counted when asked, so an item just saved shows on the next request.

Authorization

bearer
headerAuthorizationBearer <token>

A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Query Parameters

tz?string

IANA timezone such as Africa/Accra that days and hours are read in. Default UTC; an unknown name is 422.

Lengthlength <= 64
Default"UTC"

Response Body

The library summary

application/json
  1. response

A summary of the user's library. Item counts are of live items (deleted items never count); archived items count wherever an item would, except in totals.tags and top_tags.

timezone*string

The IANA timezone days and hours are read in

totals*
by_kind*

Live items of each kind, archived ones included. Every kind is present, 0 when there are none.

storage*

What the user's stored files take up. Every stored file is a row with a kind (upload, banner, screenshot, archive, pdf, video, thumbnail) and is counted under that kind; thumbnails are stored files like the rest, so they count towards the plan's storage. A file whose size is not known counts 0 bytes (and 1 in count). Files of a kind not listed here would be counted under other, which is only present when it has any; the parts always add up to total_bytes.

activity*

Live items (archived ones included) by created_at, the saved date that updateItem can backdate and the feed is ordered by, read in timezone. Days run from local midnight to local midnight, so a day with a clock change is 23 or 25 hours long; on a night the clocks go back, both passes through the repeated hour count in that hour.

cards*array<>

Items by card (recipe, book, film...), most first. Items without a card are left out.

top_domains*array<>

The 10 sites saved from most; ties by name.

top_tags*array<>

The 10 user tags used most, counted as GET /v1/tags counts them; ties by tag.

by_hour*array<integer>

Saves over all time by local hour of day; index 0 is midnight to 1am.

Items24 <= items <= 24
by_weekday*array<integer>

Saves over all time by local day of week; index 0 is Monday.

Items7 <= items <= 7
monthly*array<>

Saves in each of the last 12 calendar months, oldest first, empty months included.

Example Request
curl -X GET 'https://example.com/v1/stats'
Example Response
{  "timezone": "Africa/Accra",  "totals": {    "items": 0,    "favourites": 0,    "archived": 0,    "tags": 0,    "storage_bytes": 0,    "completed": 0,    "domains": 0,    "lists": 0,    "smart_lists": 0,    "dead_links": 0  },  "by_kind": {    "link": 0,    "note": 0,    "quote": 0,    "highlight": 0,    "todo": 0,    "image": 0,    "pdf": 0,    "video": 0,    "audio": 0  },  "storage": {    "total_bytes": 0,    "by_type": [      {        "type": "upload",        "bytes": 0,        "count": 0      }    ]  },  "activity": {    "week_start": "2019-08-24",    "week": [      {        "date": "2019-08-24",        "count": 0      },      {        "date": "2019-08-24",        "count": 0      },      {        "date": "2019-08-24",        "count": 0      },      {        "date": "2019-08-24",        "count": 0      },      {        "date": "2019-08-24",        "count": 0      },      {        "date": "2019-08-24",        "count": 0      },      {        "date": "2019-08-24",        "count": 0      }    ],    "today": [      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      },      {        "hour": 0,        "count": 0      }    ]  },  "cards": [    {      "name": "string",      "count": 0    }  ],  "top_domains": [    {      "name": "string",      "count": 0    }  ],  "top_tags": [    {      "name": "string",      "count": 0    }  ],  "by_hour": [    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0,    0  ],  "by_weekday": [    0,    0,    0,    0,    0,    0,    0  ],  "monthly": [    {      "month": "2026-11",      "count": 0    }  ]}