---
title: "Get a book by ID"
method: GET
path: "/books/{bookId}"
tags: ["Books"]
---

# Get a book by ID

`GET /books/{bookId}`

Returns a single book

## Path parameters

- `bookId` integer, required

## Response `200`

A single book

- union
  - ProgrammingBook
    - `id` integer
    - `title` string, required
    - `description` string, required
    - `price` integer, required — Price in USD cents
    - `category` 'Programming', required
    - `author` union, required
      - object
        - `id` integer
        - `name` string, required
        - `photo` string
        - `biography` string
      - object
        - `id` integer, required
        - `name` string
        - `photo` string
        - `biography` string
    - `cover_image` string
  - FantasyBook
    - `id` integer
    - `title` string, required
    - `description` string, required
    - `price` integer, required — Price in USD cents
    - `category` 'Fantasy', required
    - `author` union, required
      - object
        - `id` integer
        - `name` string, required
        - `photo` string
        - `biography` string
      - object
        - `id` integer, required
        - `name` string
        - `photo` string
        - `biography` string
    - `cover_image` string
  - SciFiBook
    - `id` integer
    - `title` string, required
    - `description` string, required
    - `price` integer, required — Price in USD cents
    - `category` 'Sci-fi', required
    - `author` union, required
      - object
        - `id` integer
        - `name` string, required
        - `photo` string
        - `biography` string
      - object
        - `id` integer, required
        - `name` string
        - `photo` string
        - `biography` string
    - `cover_image` string

---

[API](https://skmtc.dev/speakeasy-api/apis/bookstore-api.md) · [All operations](https://skmtc.dev/speakeasy-api/apis/bookstore-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/speakeasy-api/bookstore-api/revisions/b46c8a1b9720/schema)
