# List library transcripts

> Returns the transcripts in your library, newest added first by default.

Source: https://diko.app/en/api-docs/reference/list-library-transcripts

Library · `GET /library/transcripts`

- **Base URL:** https://api.diko.app/api/v1
- **Required scope:** `library:read`
- **Rate-limit policy:** `read`, `account`
- **Authentication:** `Authorization: Bearer dk_live_...`

List items have `summary.text` set to null and no `chapters`; fetch one transcript to get them.

## Parameters

| Name | In | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|---|
| `source_type` | query | `string` | no | – | – | Only transcripts from this source. Allowed values: `youtube`, `upload`. |
| `archived` | query | `string` | no | `false` | – | Return active (`false`), archived (`true`) or all (`all`) items. Allowed values: `false`, `true`, `all`. |
| `added_after` | query | `string` | no | – | ≤ 64 characters | Only items added after this moment (exclusive). RFC 3339 date or date-time. Compared in milliseconds, like the timestamps in responses, so passing back a returned timestamp never returns that same item again. |
| `added_before` | query | `string` | no | – | ≤ 64 characters | Only items added before this moment (exclusive). RFC 3339 date or date-time. Compared in milliseconds, like the timestamps in responses, so passing back a returned timestamp never returns that same item again. |
| `q` | query | `string` | no | – | ≤ 200 characters | Search in the title. |
| `order` | query | `string` | no | `desc` | – | Sort direction. Allowed values: `desc`, `asc`. |
| `limit` | query | `integer` | no | `20` | 1–100; format: int32 | Page size, from 1 to 100. Default 20. Follow `has_more`, not the page size. |
| `cursor` | query | `string` | no | – | ≤ 1024 characters | Opaque cursor from `next_cursor` of the previous page. Cursors are tied to the user, route, sort order and filters. |

## Response

### 200

A page of library transcripts, sorted by `added_at`.

- `RateLimit`: The most restrictive policy that applied: `"name";r=<requests left>;t=<seconds>`, where `t` is the number of seconds until one more request is allowed (0 when the quota is full). Absent when no rate limiter ran for the request.
- `RateLimit-Policy`: The rate-limit policies that applied to the request, one `"name";q=<burst>;w=<seconds>` item per policy, for example `"read";q=10;w=2, "account";q=20;w=2`: `q` is the burst quota and `w` the seconds in which an empty quota refills. Sent on every authenticated response; absent when no rate limiter ran for the request, for example when it was rejected before the key was checked.
- `Request-Id`: ID of this request (`req_` prefix), the same as `request_id` in an error body. It is also sent as `X-Request-ID`. Quote it when you contact support.
- `X-Client-Request-Id`: Your own `X-Client-Request-Id` request header, echoed back. It is sent only when the value you sent has 1-128 characters from A-Z a-z 0-9 . _ : -.
- `X-RateLimit-Limit`: Burst quota of the most restrictive policy (`q` in `RateLimit-Policy`). Absent when no rate limiter ran.
- `X-RateLimit-Remaining`: Requests left in the most restrictive policy (`r` in `RateLimit`). Absent when no rate limiter ran.
- `X-RateLimit-Reset`: Seconds until one more request is allowed in the most restrictive policy (`t` in `RateLimit`; 0 when the quota is full). It is a number of seconds, not a timestamp. Absent when no rate limiter ran.

Content type: `application/json`

- `object` (string, required): Always `list`.
- `data` (array<object>, required): The items of this page.
  - `id` (string, required, 6–64 characters, pattern: ^trn_[A-Za-z0-9_-]+$): Public ID (`trn_` prefix).
  - `object` (string, required): Always `library_transcript`.
  - `title` (string, required): Title.
  - `source_type` (string, required): Where the transcript comes from. Allowed values: `youtube`, `upload`.
  - `youtube_video_id` (string | null, required): YouTube video ID. Null for uploads.
  - `url` (string | null, required, format: uri): Source URL. Null for uploads.
  - `channel` (string | null, required): Channel name, if known.
  - `language` (string | null, required): Language code, for example `lt`.
  - `duration_ms` (integer | null, required, 0–9007199254740991, format: int64): Duration in milliseconds.
  - `transcription_method` (string | null, required): How the text was produced: from captions or by speech recognition. Providers are not named. Allowed values: `captions`, `speech_recognition`.
  - `summary` (object, required): Summary state and text.
    - `status` (string, required): Summary status. Allowed values: `pending`, `ready`, `failed`, `unavailable`.
    - `text` (string | null, required): Summary text. Null in list items and until the summary is ready.
  - `chapters` (array<object>, optional): Chapters. Only in the single-transcript response.
    - `title` (string, required): Chapter title.
    - `start_ms` (integer, required, 0–9007199254740991, format: int64): Chapter start in milliseconds.
  - `categories` (array<string>, required): Categories assigned in Diko.
  - `added_at` (string, required, ≤ 24 characters, format: date-time): When the transcript was added to your library.
  - `archived` (boolean, required): Whether the item is archived.
  - `segment_count` (integer, required, 0–2147483647, format: int32): Number of transcript segments.
  - `revision` (string, required): Opaque token that changes whenever any segment changes.
  - `web_url` (string, required, format: uri): Link in the Diko app.
- `has_more` (boolean, required): Whether more items follow. Keep paging while this is true.
- `next_cursor` (string | null, required, ≤ 1024 characters): Cursor for the next page, or null when `has_more` is false.

```json
{
  "object": "list",
  "data": [
    {
      "id": "trn_ZFF3NHc5V2dYY1E",
      "object": "library_transcript",
      "title": "Kaip veikia transkribavimas",
      "source_type": "youtube",
      "youtube_video_id": "dQw4w9WgXcQ",
      "url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
      "channel": "Diko",
      "language": "lt",
      "duration_ms": 212000,
      "transcription_method": "captions",
      "summary": {
        "status": "ready",
        "text": null
      },
      "categories": [
        "Technologijos"
      ],
      "added_at": "2026-10-11T09:30:00.000Z",
      "archived": false,
      "segment_count": 120,
      "revision": "r_6f6f4bb9762915b561878fd1e1fa7f56",
      "web_url": "https://studio.diko.app/library/dQw4w9WgXcQ"
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

## Examples

**cURL**

```bash
curl "https://api.diko.app/api/v1/library/transcripts?limit=20" \
  -H "Authorization: Bearer $DIKO_API_KEY"
```

**Python**

```python
import os

import requests

response = requests.get(
    "https://api.diko.app/api/v1/library/transcripts",
    headers={"Authorization": f"Bearer {os.environ['DIKO_API_KEY']}"},
    params={"limit": 20},
    timeout=30,
)
response.raise_for_status()
print(response.json())
```

**TypeScript**

```typescript
const response = await fetch("https://api.diko.app/api/v1/library/transcripts?limit=20", {
  headers: {
    Authorization: `Bearer ${process.env.DIKO_API_KEY}`,
  },
})
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`)
console.log(await response.json())
```

## Errors

This endpoint can return these errors. Every code is described in the error catalog.

| HTTP | Code | Meaning | Retry? |
|---|---|---|---|
| 400 | [`invalid_parameter`](https://diko.app/en/api-docs/errors.md#invalid_parameter) | A path, query or body parameter has an invalid value, a required field is missing or a field is unknown (unknown fields are rejected). `error.param` names the parameter. | no |
| 400 | [`invalid_cursor`](https://diko.app/en/api-docs/errors.md#invalid_cursor) | The `cursor` is corrupted or was issued for another user, route, sort order or set of filters. | no |
| 401 | [`missing_api_key`](https://diko.app/en/api-docs/errors.md#missing_api_key) | The request has no `Authorization` header. | no |
| 401 | [`invalid_api_key`](https://diko.app/en/api-docs/errors.md#invalid_api_key) | The header is unusable (a scheme other than `Bearer`, an empty key or more than one `Authorization` header) or the key is unknown or malformed (wrong structure or checksum). The response is identical in all these cases. | no |
| 401 | [`api_key_expired`](https://diko.app/en/api-docs/errors.md#api_key_expired) | The key has expired. | no |
| 401 | [`api_key_revoked`](https://diko.app/en/api-docs/errors.md#api_key_revoked) | The key was revoked: manually, after a rotation grace period ended, because of a leak or because the account was disabled. | no |
| 401 | [`api_key_disabled`](https://diko.app/en/api-docs/errors.md#api_key_disabled) | The key is temporarily disabled. | no |
| 402 | [`subscription_required`](https://diko.app/en/api-docs/errors.md#subscription_required) | The account has no active paid access. | no |
| 403 | [`ip_not_allowed`](https://diko.app/en/api-docs/errors.md#ip_not_allowed) | The key has an IP allowlist and the request IP is not on it, or it cannot be determined reliably. | no |
| 403 | [`account_disabled`](https://diko.app/en/api-docs/errors.md#account_disabled) | The account is disabled. | no |
| 403 | [`email_not_verified`](https://diko.app/en/api-docs/errors.md#email_not_verified) | The account e-mail address is not verified. | no |
| 403 | [`api_access_suspended`](https://diko.app/en/api-docs/errors.md#api_access_suspended) | A Diko administrator suspended API access for this account. | no |
| 403 | [`plan_required`](https://diko.app/en/api-docs/errors.md#plan_required) | The plan does not include the API. `error.details.required_plans` lists `verslas`. | no |
| 403 | [`insufficient_scope`](https://diko.app/en/api-docs/errors.md#insufficient_scope) | The key lacks the scope this endpoint needs. `error.details` contains `required_scopes` and `granted_scopes`. | no |
| 429 | [`rate_limit_exceeded`](https://diko.app/en/api-docs/errors.md#rate_limit_exceeded) | A rate-limit policy was exceeded. `error.details.policy` names it. | yes, after Retry-After |
| 500 | [`internal_error`](https://diko.app/en/api-docs/errors.md#internal_error) | An internal server error. | conditionally |
| 503 | [`service_unavailable`](https://diko.app/en/api-docs/errors.md#service_unavailable) | The service is temporarily busy, for example because of database load. | yes, after Retry-After |
