---
title: "This will return a list of mappings from ID -> page num. ID will be the xhtml key and page num will be the reading order
this is used to rewrite anchors in the book text so that we always load properly in our reader."
method: GET
path: "/api/Book/{chapterId}/chapters"
tags: ["Book"]
---

# This will return a list of mappings from ID -> page num. ID will be the xhtml key and page num will be the reading order
this is used to rewrite anchors in the book text so that we always load properly in our reader.

`GET /api/Book/{chapterId}/chapters`

This is essentially building the table of contents

## Path parameters

- `chapterId` integer, required

## Response `200`

OK

- BookChapterItem[]
  - `title` string, nullable
  - `part` string, nullable
  - `page` integer
  - `children` BookChapterItem[], nullable

---

[API](https://skmtc.net/kareadita/apis/kavita.md) · [All operations](https://skmtc.net/kareadita/apis/kavita/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kareadita/kavita/revisions/cc7f90a35897/schema)
