---
title: "Search books"
method: GET
path: "/search/books"
tags: ["Search"]
---

# Search books

`GET /search/books`

Search for books with various filters and sorting options

## Query parameters

- `q` string
- `limit` integer
- `page` integer
- `advancedGenres` string
- `genres` string
- `authors` string
- `regions` string
- `empires` string
- `yearRange` string
- `ids` string
- `sortBy` 'relevance' | 'year-asc' | 'year-desc' | 'alphabetical-asc' | 'alphabetical-desc'
- `locale` 'en' | 'ar'

## Response `200`

Search results retrieved successfully

- BookSearchResponse
  - `results` object, required
    - `hits` Book[]
      - `id` string, required — Unique identifier for the book
      - `slug` string, required — URL-friendly identifier
      - `primaryName` string, required — Primary name of the book
      - `secondaryName` string — Secondary name of the book
      - `author` Author, required
        - `id` string, required — Unique identifier for the author
        - `slug` string, required — URL-friendly identifier
        - `primaryName` string, required — Primary name of the author
        - `secondaryName` string — Secondary name of the author
        - `year` integer — Year of birth/death
        - `locations` Location[]
          - `id` string, required — Unique identifier for the location
          - `name` string, required — Name of the location
          - `region` Region
            - `id` string, required — Unique identifier for the region
            - `slug` string, required — URL-friendly identifier
            - `name` string, required — Name of the region
      - `year` integer — Year of publication
      - `versions` BookVersion[]
        - `id` string, required — Unique identifier for the version
        - `value` string, required — Version identifier
        - `source` string, required — Source of the version
        - `aiSupported` boolean — Whether AI is supported for this version
        - `keywordSupported` boolean — Whether keyword search is supported
    - `found` integer — Total number of results found
  - `pagination` object, required
    - `page` integer
    - `perPage` integer
    - `totalPages` integer
  - `selectedAuthors` Author[], nullable
    - `id` string, required — Unique identifier for the author
    - `slug` string, required — URL-friendly identifier
    - `primaryName` string, required — Primary name of the author
    - `secondaryName` string — Secondary name of the author
    - `year` integer — Year of birth/death
    - `locations` Location[]
      - `id` string, required — Unique identifier for the location
      - `name` string, required — Name of the location
      - `region` Region
        - `id` string, required — Unique identifier for the region
        - `slug` string, required — URL-friendly identifier
        - `name` string, required — Name of the region

---

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