---
title: "Get the grouped library tree (authors → works → versions) with stats."
method: GET
path: "/api/library"
tags: ["books"]
---

# Get the grouped library tree (authors → works → versions) with stats.

`GET /api/library`

## Request

- The document declares no server URL.
- Auth: none declared

## Response `200`

Library tree

- LibraryResponse
  - `groups` LibraryGroup[], required
    - `book_pills` BookPill[], required: "Bible-shape" navigation: when this group is a compilation that is available in multiple translations, the frontend renders the compilation's child works (e.g. Genesis, John) as primary book pills here, and the multiple translations collapse into a single subtle translation chooser. Empty for regular author groups and for compilations available in a single translation.
      - `label` string, required
      - `node_slug` string, required
      - `sort_order` integer, required
    - `books` LibraryWork[], required
      - `co_authors` string[], required
      - `editor_names` string[], nullable
      - `publication_year` integer, nullable: Identity year of the work — the edition presented (`sources.original_year`), falling back to the printing's `publication_year`. E.g. 1787 for the Kritik read in the 1911 Akademie-Ausgabe.
      - `short_title` string, nullable: Short title for the shelf spine, when the edition sets one.
      - `title` string, required
      - `versions` LibraryVersion[], required
        - `book_slug` string, required
        - `is_original` boolean, required
        - `language` string, required
        - `node_slug` string, nullable: For nested works (a child source hosted inside a compilation): the toc-node slug to deep-link to. Absent for top-level books.
        - `publication_year` integer, nullable
        - `publisher` string, nullable
        - `text_length` integer, required
        - `translator_names` string[], required
      - `work_id` string, required
    - `id` string, required: Stable identifier. Person id for `"author"` groups; source id for `"self"` groups. UUIDs are globally unique so the id is safe to use as a React key without a kind prefix.
    - `primary_kind` string, required: `"author"` — heading is a person; `books` are works by them. `"self"` — heading IS the work; `books` are its child sources (compilation case) or empty (singleton case). Click the heading to open the work in the reader.
    - `primary_label` string, required
    - `primary_slug` string, nullable: Reader path for `primary_kind = "self"` headings (e.g. `/books/king-james-bible`). Absent for author headings until per-author pages exist.
    - `sort_name` string, required
  - `stats` LibraryStats, required
    - `authors` integer, required
    - `languages` integer, required
    - `works` integer, required

## Changes

- **2026-11-26** `ffc7fa4a3c30`: 1 info
  - added the optional property `groups/items/books/items/short_title` to the response with the `200` status
- **2026-08-29** `9ec6eb98e308`: 1 info
  - added the required property `groups/items/books/items/versions/items/text_length` to the response with the `200` status
- **2026-05-06** `84e2c1f7ce7c`: 1 info
  - added the required property `groups/items/book_pills` to the response with the `200` status
- **2026-05-06** `a57954796a70`: 1 breaking, 1 info
  - removed the required property `authors` from the response with the `200` status
  - added the required property `groups` to the response with the `200` status
- **2026-04-11** `40ce8d41af94`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/scholia-study/apis/scholia-api/changes/api/library/get.md)

---

[API](https://skmtc.dev/scholia-study/apis/scholia-api.md) - [All operations](https://skmtc.dev/scholia-study/apis/scholia-api/llms.txt) - [OpenAPI document](https://skmtc.dev/scholia-study/apis/scholia-api/revisions/684b3751bfd3?raw)
