# YouTube Shorts Text Extractor (`rainminer/youtube-shorts-text-extractor`) Actor

Extract on-screen text from public YouTube Shorts—overlays, burned-in captions, stickers, hashtags, watermarks, @mentions—with MM:SS timestamps, text type, screen position, language, and confidence. Visual OCR, not audio transcription. No login needed. Structured segments plus fullText.

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

## Pricing

from $0.37 / 1,000 short processeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.
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 web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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 **YouTube Shorts Text Extractor** is an Apify Actor that reads public YouTube Shorts and returns every piece of visible on-screen text as structured data. Creators and brands burn text, captions, stickers, hashtags, and watermarks directly into their videos — this Actor unlocks that content for search, analysis, and database ingestion without manual review.

This is **visual OCR, not audio transcription**. Speech-to-text tools give you what was *said*; this Actor gives you what was *shown* — the headline card, the price tag, the discount code, the lower-third name badge, the "link in bio" call to action. That text is invisible to every transcript-based tool.

Each Short is processed by AI vision and the results are returned as a structured dataset of text segments — each with its timestamp, type, screen position, language, and confidence rating — plus a combined `fullText` field for quick search and indexing.

***

### Key Features

- **On-screen text only**: Reads text rendered on top of the video, never the audio track.
- **Full coverage**: Captures animated overlays, burned-in captions, sticker labels, 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.
- **Combined `fullText`**: All segments joined into a single newline-separated block, ready for full-text search.
- **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.
- **Flexible URL input**: Accepts `youtube.com/shorts/...`, `youtu.be/...`, and `youtube.com/watch?v=...`.
- **No login required**: Works with any public YouTube Short.

***

### Why Extract Text from YouTube Shorts?

Shorts are a primary publishing surface for businesses, creators, and brands. Product drops, discount codes, event announcements, hiring notices, and pricing updates are routinely shared only as burned-in video text — never structured, never indexed, and never captured by transcript tools. This Actor makes that content machine-readable for:

- **Content intelligence and brand monitoring** tracking what competitors publish on Shorts.
- **Retail and e-commerce** indexing product drops, promo codes, prices, and launch dates.
- **Food and hospitality** capturing daily specials and seasonal menus announced via video.
- **Event aggregators** extracting event names, dates, venues, and lineup text from promo Shorts.
- **Creator and influencer analytics** measuring hook text, captions, and call-to-action patterns.
- **Market research** tracking pricing, offers, and messaging trends across channels.
- **Accessibility tools** converting visual Shorts text to readable formats.

***

### Who Is It For?

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

***

### Input Schema

```json
{
  "shortUrls": [
    "https://www.youtube.com/shorts/0uTo-oe2ecA",
    "https://www.youtube.com/shorts/MJstrGQT79k"
  ],
  "maxItems": 10
}
```

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

| Field                | Type             | Default        | Description                                                                     |
| -------------------- | ---------------- | -------------- | ------------------------------------------------------------------------------- |
| `shortUrls`          | Array of strings | —              | Public YouTube Shorts URLs (`/shorts/...`, `youtu.be/...`, or `/watch?v=...`)   |
| `maxItems`           | Integer          | `10`           | Maximum number of Shorts to process in a single run                             |
| `proxyConfiguration` | Object           | Residential on | Proxy used for downloads — YouTube blocks most datacenter IPs                    |

***

### Output Schema

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

```json
{
  "shortUrl": "https://www.youtube.com/shorts/MJstrGQT79k",
  "videoId": "MJstrGQT79k",
  "duration": 45,
  "textSegments": [
    {
      "text": "Suffolk wildfires ‘stabilising’, say firefighters",
      "timestamp": "00:00",
      "type": "overlay",
      "position": "top",
      "language": "en",
      "confidence": "high"
    },
    {
      "text": "At least 12 fire engines remain on scene.",
      "timestamp": "00:09",
      "type": "caption",
      "position": "bottom",
      "language": "en",
      "confidence": "high"
    }
  ],
  "fullText": "Suffolk wildfires ‘stabilising’, say firefighters\nAt least 12 fire engines remain on scene.",
  "scrapedAt": "2026-08-01T07:16:28.904Z"
}
```

| Field                       | Description                                                                                   |
| --------------------------- | --------------------------------------------------------------------------------------------- |
| `shortUrl`                  | Normalized canonical URL of the Short                                                         |
| `videoId`                   | YouTube 11-character video ID                                                                 |
| `duration`                  | Video length in seconds                                                                       |
| `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                     |
| `fullText`                  | Every segment's text joined with newlines — convenient for search and indexing                |
| `scrapedAt`                 | ISO timestamp of when this Short was processed                                                |

***

### How It Works

1. **Validate inputs** — each URL is checked against accepted YouTube URL patterns, the video ID is extracted, and the URL is normalized to a canonical Shorts form.
2. **Fetch (retriable)** — each Short is retrieved in a dedicated crawler step. Failed fetches are retried automatically with a fresh proxy (up to 5 attempts).
3. **Process** — the video 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 Short containing all its text segments plus the combined `fullText`.

***

### Pricing

This Actor uses pay-per-event pricing:

| Event             | Charged                                                    |
| ----------------- | ---------------------------------------------------------- |
| `short-processed` | Once per Short successfully processed                       |
| `video-second`    | Per second of video processed (rounded up, minimum 1)      |

Shorts that fail to download or contain no on-screen text are not charged.

***

### Notes and Limitations

- **Public Shorts only**: Private, unlisted, and age- or login-gated videos are not supported.
- **Video availability**: Deleted, region-blocked, or expired videos will fail to fetch and are skipped with a warning.
- **Proxy recommended**: YouTube blocks most datacenter IPs. Residential proxy is the default and is strongly recommended.
- **OCR accuracy**: Fast-moving, small-font, or low-contrast text may yield lower confidence extractions.
- **Text-free videos**: Shorts with no burned-in text return no dataset row — this is expected, not an error.
- **Video size**: Very large videos are skipped automatically.
- **Audio not included**: Spoken content is intentionally excluded — only text visually rendered on screen is extracted. Use a transcription Actor if you need speech.

# Actor input Schema

## `shortUrls` (type: `array`):

Public YouTube Shorts URLs to process. Accepts youtube.com/shorts/..., youtu.be/... and youtube.com/watch?v=... formats.

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

Maximum number of Shorts to process in a single run.

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

Proxy used for YouTube Shorts downloads. Failed downloads are retried with a different proxy automatically.

## Actor input object example

```json
{
  "shortUrls": [
    "https://www.youtube.com/shorts/0uTo-oe2ecA",
    "https://www.youtube.com/shorts/MJstrGQT79k"
  ],
  "maxItems": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "shortUrls": [
        "https://www.youtube.com/shorts/0uTo-oe2ecA",
        "https://www.youtube.com/shorts/MJstrGQT79k"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("rainminer/youtube-shorts-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 = {
    "shortUrls": [
        "https://www.youtube.com/shorts/0uTo-oe2ecA",
        "https://www.youtube.com/shorts/MJstrGQT79k",
    ],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

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

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

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

```

## CLI example

```bash
echo '{
  "shortUrls": [
    "https://www.youtube.com/shorts/0uTo-oe2ecA",
    "https://www.youtube.com/shorts/MJstrGQT79k"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call rainminer/youtube-shorts-text-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rainminer/youtube-shorts-text-extractor"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/qXXhBg33r9WFkpAuQ/builds/dZ3StEQbw5Lcge0ad/openapi.json
