---
title: "List Works"
method: GET
path: "/api/works"
tags: ["works"]
---

# List Works

`GET /api/works`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/works`
- Auth: none declared

Paginated list of works.

``q`` does an ILIKE on title_primary / title_sa; ``lang`` keeps only works
that have at least one witness in that language. Witness counts and the set
of covered languages are aggregated in a single follow-up query (no N+1).

作品分页检索：q 模糊匹配标题，lang 过滤含该语言见证本的作品。

## Query parameters

- `q` string, nullable: 标题模糊匹配 (title_primary / title_sa)
- `lang` string, nullable: 按见证本语言过滤，如 lzh、pi、sa
- `page` integer
- `page_size` integer

## Response `200`

Successful Response

- WorkListResponse
  - `total` integer, required
  - `page` integer, required
  - `page_size` integer, required
  - `items` WorkListItem[], required
    - `slug` string, required
    - `title_primary` string, required
    - `title_sa` string, nullable
    - `witness_count` integer
    - `langs` string[]

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
