---
title: "Library stats"
method: GET
path: "/v1/stats"
tags: ["Stats"]
---

# Library stats

`GET /v1/stats`

## Request

- Base URL: `https://stashr.me`
- URL: `https://stashr.me/v1/stats`
- Auth: HTTP bearer

Aggregate counts over the library: total plus breakdowns by platform, content type, and capture month, honoring the same state parameter and filters as listBookmarks. Answers count questions in one call instead of paging.

## Query parameters

- `state` 'active' | 'archived' | 'all'
- `authors` string[]
- `contentTypes` string[]
- `favorite` string[]
- `media` string[]
- `note` string[]
- `platforms` string[]
- `tags` string[]
- `authorMode` 'include' | 'exclude'
- `contentTypeMode` 'include' | 'exclude'
- `mediaMode` 'include' | 'exclude'
- `platformMode` 'include' | 'exclude'
- `tagMode` 'include_any' | 'include_all' | 'exclude_any' | 'exclude_all'
- `capturedAfter` string: Only bookmarks saved on/after this ISO-8601 date or datetime (inclusive)
- `capturedBefore` string: Only bookmarks saved before this ISO-8601 date or datetime (exclusive)

## Response `200`

Library counts

- object
  - `data` BookmarkStats, required
    - `archived` integer, required
    - `byContentType` object, required
    - `byMonth` object, required: Capture counts keyed by "YYYY-MM", newest first
    - `byPlatform` object, required
    - `favorites` integer, required
    - `total` integer, required
    - `untagged` integer, required
    - `withNote` integer, required

## Other responses

- `400`: Malformed request (error.code bad_request or invalid_json)
- `401`: Missing, invalid, or expired credentials (error.code unauthorized)
- `402`: A Pro plan or active trial is required (error.code payment_required)
- `403`: The credential lacks the required scope (error.code forbidden)
- `404`: The resource does not exist or belongs to another account (error.code not_found)
- `422`: Validation failed; error.details.issues lists the fields (error.code validation_error)
- `429`: Too many requests (error.code rate_limited); wait Retry-After seconds, also given as error.retryAfterMs
- `500`: Something failed on Stashr's side (error.code internal_error); retryable

---

[API](https://skmtc.dev/stashr/apis/stashr-api.md) · [All operations](https://skmtc.dev/stashr/apis/stashr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stashr/apis/stashr-api/revisions/bcab186e0646?raw)
