> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.ollang.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get On-Screen Text

> Get the on-screen text (visual translation) rows of an order as JSON

Returns the on-screen text rows of a CC, Subtitle or AI Dubbing order that has visual translation enabled: the text that appears in the video (signs, titles, captions burned into the picture), with its timecodes and translation. Rows are sorted by start time.

These are the same rows as the dashboard's **On-Screen Text (XLSX)** download. To get the spreadsheet itself, use [Export On-Screen Text XLSX](https://api-docs.ollang.com/apis/ollang-api-reference/export-order-on-screen-text-xlsx.md).

```bash cURL theme={null}
curl -X GET "https://api-integration.ollang.com/integration/orders/60b8d6f1e1b9b1d8c6c0d8e1/on-screen-text" \
  -H "X-Api-Key: $OLLANG_API_KEY"
```

```javascript JavaScript theme={null}
const orderId = "60b8d6f1e1b9b1d8c6c0d8e1";

const response = await fetch(
  `https://api-integration.ollang.com/integration/orders/${orderId}/on-screen-text`,
  { headers: { "X-Api-Key": process.env.OLLANG_API_KEY } },
);

const { rows } = await response.json();
```

```python Python theme={null}
import os
import requests

order_id = "60b8d6f1e1b9b1d8c6c0d8e1"

response = requests.get(
    f"https://api-integration.ollang.com/integration/orders/{order_id}/on-screen-text",
    headers={"X-Api-Key": os.environ["OLLANG_API_KEY"]},
)

rows = response.json()["rows"]
```

## Authorizations

This endpoint requires API key authentication. Include your API key in the request header:

* **Header name**: `X-Api-Key`
* **Header value**: Your API key from the Ollang dashboard

## Path Parameters

**orderId** `string` *required*

The unique identifier of a CC, Subtitle or AI Dubbing order with visual translation enabled. The order must belong to the API key's client.

## Response

**orderId** `string`

The order ID.

**orderName** `string`

The order name.

**orderType** `string`

`cc`, `subtitle` or `aiDubbing`.

**targetLanguage** `string`

Target language code, for example `fr`.

**targetLanguageName** `string`

English name of the target language, for example `French`. The XLSX export uses it as the sheet name.

**fileName** `string`

File name the XLSX export uses: `{OrderName}_on-screen-text.xlsx`.

**rows** `object[]`

On-screen text rows, sorted by start time.

**row**

**index** `number`

1-based position after sorting.

**start** `string`

Start time as `HH:MM:SS,mmm`. A value that cannot be read as a time is returned as stored.

**end** `string`

End time as `HH:MM:SS,mmm`.

**original** `string`

On-screen text in the source language.

**translation** `string`

Translated text. Empty when the row isn't translated yet.

```json 200 theme={null}
{
  "orderId": "60b8d6f1e1b9b1d8c6c0d8e1",
  "orderName": "My Video",
  "orderType": "subtitle",
  "targetLanguage": "fr",
  "targetLanguageName": "French",
  "fileName": "My Video_on-screen-text.xlsx",
  "rows": [
    {
      "index": 1,
      "start": "00:00:01,000",
      "end": "00:00:03,500",
      "original": "SALE 50% OFF",
      "translation": "SOLDES -50 %"
    }
  ]
}
```

```json 400 theme={null}
{
  "statusCode": 400,
  "message": "Visual translation is not enabled for this order"
}
```

```json 404 theme={null}
{
  "statusCode": 404,
  "message": "Order does not exist."
}
```

## Errors

An order whose on-screen text hasn't been extracted yet returns `200` with `rows: []`.

| Status | When |
| - | - |
| 400 | Visual translation is off for the order, or the order type isn't CC, Subtitle or AI Dubbing. |
| 401 | The API key is missing or invalid. |
| 404 | The order doesn't exist or belongs to another client. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.