# Tiktok Video Text Extractor (`rainminer/tiktok-video-text-extractor`) Actor

Extract all visible on-screen text from public TikTok videos — overlays, captions, stickers, hashtags, and watermarks — with timestamps, type, position, and language. Use for content intelligence, brand monitoring, creator analytics, and turning short-form video text into searchable structured data.

- **URL**: https://apify.com/rainminer/tiktok-video-text-extractor.md
- **Developed by:** [rainminer](https://apify.com/rainminer) (community)
- **Categories:** Social media, AI, Videos
- **Stats:** 4 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.90 / 1,000 videos

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

The **TikTok Video Text Extractor** is an Apify Actor that reads public TikTok videos and returns every piece of visible on-screen text as structured data. Creators and brands overlay text, captions, stickers, hashtags, and watermarks directly onto their videos — this Actor unlocks that content for search, analysis, and database ingestion without manual review.

Each video is processed by AI vision and the results are returned as a flat, structured dataset of text segments — each with its timestamp, type, screen position, language, and confidence rating.

---

### Key Features

- **Full on-screen text extraction**: Captures animated overlays, editor captions, TikTok stickers, watermarks, hashtags, and @mentions.
- **Timestamp-aware**: Records the MM:SS timestamp when each text element first appears.
- **Type classification**: Distinguishes overlay, caption, sticker, watermark, hashtag, mention, and other text types.
- **Multilingual**: Detects the ISO 639-1 language code for each segment from the text itself.
- **Position detection**: Classifies text placement as top, center, or bottom of screen.
- **Confidence rating**: High/medium/low rating based on text clarity in the video frame.
- **No login required**: Works with any public TikTok video.

---

### Why Extract Text from TikTok Videos?

TikTok is a primary publishing surface for businesses, creators, and brands. Product drops, event announcements, hiring notices, and pricing updates are routinely shared only as video overlays — never structured or indexed. This Actor makes that content machine-readable for:

- **Content intelligence and brand monitoring** tracking what competitors publish on TikTok.
- **Food and hospitality** capturing daily specials and seasonal menus announced via video.
- **Event aggregators** extracting event names, dates, and lineup text from promotional videos.
- **Retail and e-commerce** indexing product drops, discount codes, and launch dates.
- **Market research** tracking pricing, offers, and messaging trends across accounts.
- **Accessibility tools** converting visual video text to readable formats.

---

### Who Is It For?

- **Marketing and analytics teams** monitoring brand or competitor TikTok content at scale.
- **Product and data teams** building structured datasets from TikTok video content.
- **Developers** integrating TikTok text extraction into discovery or monitoring pipelines.
- **Researchers** studying visual communication trends in short-form video.

---

### Input Schema

```json
{
  "videoUrls": ["https://www.tiktok.com/@tiktok/video/7018846970735028738"],
  "maxItems": 10
}
````

**`videoUrls` is required. All other fields are optional.**

| Field       | Type             | Default | Description                                                       |
| ----------- | ---------------- | ------- | ----------------------------------------------------------------- |
| `videoUrls` | Array of strings | —       | Public TikTok video URLs (`@user/video/...`, `vm.tiktok.com/...`) |
| `maxItems`  | Integer          | `10`    | Maximum number of videos to process in a single run               |

***

### Output Schema

Each dataset item represents one video and all the on-screen text found in it:

```json
{
  "videoUrl": "https://www.tiktok.com/@tiktok/video/7018846970735028738",
  "videoId": "7018846970735028738",
  "duration": 42.5,
  "textSegments": [
    {
      "text": "Summer sale — 50% off today only",
      "timestamp": "00:02",
      "type": "overlay",
      "position": "center",
      "language": "en",
      "confidence": "high"
    }
  ],
  "scrapedAt": "2026-06-01T08:15:42.000Z"
}
```

| Field                       | Description                                                                                   |
| --------------------------- | --------------------------------------------------------------------------------------------- |
| `videoUrl`                  | Normalized canonical URL of the video                                                         |
| `videoId`                   | TikTok numeric video ID or short-link identifier                                              |
| `duration`                  | Video length in seconds (from the downloaded file)                                            |
| `textSegments`              | Array of all on-screen text elements found                                                    |
| `textSegments[].text`       | The visible text content as it appears on screen                                              |
| `textSegments[].timestamp`  | MM:SS when the text first appears — `null` if indeterminate                                   |
| `textSegments[].type`       | `overlay` | `caption` | `sticker` | `watermark` | `hashtag` | `mention` | `other`       |
| `textSegments[].position`   | `top` | `center` | `bottom` — vertical screen position, `null` if it moves                  |
| `textSegments[].language`   | ISO 639-1 language code detected from the text, e.g. `"en"`, `"es"` — `null` if indeterminate |
| `textSegments[].confidence` | `high` | `medium` | `low` — extraction confidence based on text clarity                     |
| `scrapedAt`                 | ISO timestamp of when this video was processed                                                |

***

### How It Works

1. **Validate inputs** — each URL is checked against accepted TikTok video URL patterns and normalized to a canonical form.
2. **Download (retriable)** — each video is fetched via a dedicated crawler step using Apify Proxy. Failed downloads are retried automatically with a different proxy (up to 5 attempts).
3. **Process** — the downloaded file is analyzed by AI vision to extract all visible on-screen text in a single pass.
4. **Structured output** — each text segment is classified by type, position, language, and confidence.
5. **Push to dataset** — one dataset row is pushed per video containing all its text segments.

***

### Notes and Limitations

- **Public videos only**: Private accounts and videos that require login to view are not supported.
- **Video availability**: Deleted or expired videos will fail to download and are skipped with a warning.
- **OCR accuracy**: Fast-moving, small-font, or low-contrast text may yield lower confidence extractions.
- **Rate limiting**: TikTok may rate-limit requests at high volume. Reduce concurrency or add delays between runs if you encounter failures.
- **Video size**: Very large videos are skipped automatically.
- **Audio not included**: Spoken content is intentionally excluded — only text visually rendered on screen is extracted.

# Actor input Schema

## `videoUrls` (type: `array`):

TikTok video URLs to process. Accepts tiktok.com/@user/video/..., vm.tiktok.com/..., and vt.tiktok.com/... formats.

## `maxItems` (type: `integer`):

Maximum number of TikTok videos to process in a single run.

## `proxyConfiguration` (type: `object`):

Apify Proxy is used for TikTok video downloads. Failed downloads are retried with a different proxy automatically.

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.tiktok.com/@soursweetypie/video/7641482629862182162"
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "videoUrls": [
        "https://www.tiktok.com/@soursweetypie/video/7641482629862182162"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/tiktok-video-text-extractor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "videoUrls": ["https://www.tiktok.com/@soursweetypie/video/7641482629862182162"],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("rainminer/tiktok-video-text-extractor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "videoUrls": [
    "https://www.tiktok.com/@soursweetypie/video/7641482629862182162"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call rainminer/tiktok-video-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=rainminer/tiktok-video-text-extractor",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Tiktok Video Text Extractor",
        "description": "Extract all visible on-screen text from public TikTok videos — overlays, captions, stickers, hashtags, and watermarks — with timestamps, type, position, and language. Use for content intelligence, brand monitoring, creator analytics, and turning short-form video text into searchable structured data.",
        "version": "1.0",
        "x-build-id": "hlNHZA8u53s8QK97j"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/rainminer~tiktok-video-text-extractor/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-rainminer-tiktok-video-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/rainminer~tiktok-video-text-extractor/runs": {
            "post": {
                "operationId": "runs-sync-rainminer-tiktok-video-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/rainminer~tiktok-video-text-extractor/run-sync": {
            "post": {
                "operationId": "run-sync-rainminer-tiktok-video-text-extractor",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "videoUrls"
                ],
                "properties": {
                    "videoUrls": {
                        "title": "TikTok video URLs",
                        "type": "array",
                        "description": "TikTok video URLs to process. Accepts tiktok.com/@user/video/..., vm.tiktok.com/..., and vt.tiktok.com/... formats.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "maxItems": {
                        "title": "Max videos to process",
                        "minimum": 1,
                        "maximum": 100,
                        "type": "integer",
                        "description": "Maximum number of TikTok videos to process in a single run.",
                        "default": 10
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Apify Proxy is used for TikTok video downloads. Failed downloads are retried with a different proxy automatically."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
