---
title: "Get collection by slug"
method: GET
path: "/collections/by-slug/{slug}"
tags: ["Collections"]
---

# Get collection by slug

`GET /collections/by-slug/{slug}`

Retrieve a collection by its slug with searchable book results

## Path parameters

- `slug` string, required

## Query parameters

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

## Response `200`

Collection retrieved successfully

- CollectionBySlugResponse
  - `data` object, required
    - `id` string, required — Unique identifier for the collection
    - `name` string, required — Name of the collection
    - `description` string — Description of the collection
    - `slug` string, required — URL-friendly slug identifier
    - `visibility` 'PUBLIC' | 'UNLISTED', required — Visibility of the collection
    - `createdAt` string, date-time — Creation timestamp
    - `updatedAt` string, date-time — Last update timestamp
    - `isOwner` boolean — Whether the authenticated user owns this collection
    - `totalBooks` integer — Total number of books in the collection
  - `results` object, required
    - `found` integer, required — Total number of results found
    - `page` integer, required — Current page number
    - `hits` Book[], required — Array of book results
      - `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
  - `pagination` object, required
    - `totalRecords` integer, required — Total number of records
    - `totalPages` integer, required — Total number of pages
    - `currentPage` integer, required — Current page number
    - `hasPrev` boolean, required — Whether there is a previous page
    - `hasNext` boolean, required — Whether there is a next page

## Other responses

- `404` — Collection not found

---

[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)
