# Chapters

> Stream URL reference, generated from the OpenAPI spec.

HTML version: https://www.mux.com/docs/api-reference/stream/chapters. Full OpenAPI spec: https://www.mux.com/stream-spec.json

## Retrieve chapters

`GET https://stream.mux.com/{PLAYBACK_ID}/chapters/{TRACK_ID}.json`

Fetch the chapters for an asset as JSON. This is only possible for assets with a text track where `text_type` is `chapters`.

Operation ID: `get-chapters`. HTML version: https://www.mux.com/docs/api-reference/stream/chapters/get-chapters

### Path parameters

- `PLAYBACK_ID` (string, required): The asset or live stream's playback ID.
- `TRACK_ID` (string, required): The ID of the track for an asset.

### Query parameters

- `token` (string): Signed token (JWT) for [secure video playback](https://docs.mux.com/guides/secure-video-playback).

### Response `200`

Chapters retrieved successfully.

- `chapter` (number, minimum: 1): The chapter number.
- `start-time` (number, required, minimum: 0): The chapter start time in seconds.
- `duration` (number, exclusiveMinimum: 0): The chapter duration in seconds. Only present when chapters overlap or nest.
- `titles` (array of object): The chapter title in each available language.
  - `language` (string, required): The [BCP 47](https://tools.ietf.org/html/bcp47) language code of the title, or `und` if the title is language-neutral.
  - `title` (string, required): The chapter title in the given language.
- `images` (array of object): Images associated with the chapter.
  - `image-category` (string, required): A category identifying similar images across chapters, for example `thumbnail`.
  - `pixel-width` (number, required): The width of the image in pixels.
  - `pixel-height` (number, required): The height of the image in pixels.
  - `url` (string, required): The absolute or relative URL of the image. Relative URLs are relative to the chapters document.
- `metadata` (array of object): Arbitrary metadata associated with the chapter.
  - `key` (string, required): The metadata key.
  - `value` (one of, required): The metadata value. Can be a string, number, boolean, array, or object.
    - **string**
    - **number**
    - **boolean**
    - **array**
    - **object**
  - `language` (string): The [BCP 47](https://tools.ietf.org/html/bcp47) language code of the value, if it is language-specific.

### Errors

- `400`: Invalid request due to missing or incorrect parameters.
- `404`: The requested chapters track was not found.

Every error response has this body:

- `error` (object)
  - `message` (string, required): Description of the error
  - `messages` (array of string): Description of the errors
  - `type` (string): Category of the error
  - `code` (integer, format: int32): Internal error code
- `code` (integer, format: int32): Internal error code
- `message` (string): Description of the error
