# Shorts, Reels & TikTok Transcript + Hook Analyzer (`ariadev/short-video-hook-analyzer`) Actor

Transcripts + hook analysis for YouTube Shorts, Instagram Reels and TikTok. Get transcripts of YouTube Shorts plus hook analysis: first-3-second hook text, hook type, words per second, CTA detection, keywords. Search by keyword, channel or URLs. No API key.

- **URL**: https://apify.com/ariadev/short-video-hook-analyzer.md
- **Developed by:** [AriaDev](https://apify.com/ariadev) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $15.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Short Video Transcript & Hook Analyzer

Paste a YouTube Short, TikTok video or Instagram Reel (or search a YouTube niche / channel) and get:

- the **full transcript** — YouTube's own captions when they exist, TikTok's public subtitle track when the page exposes one, otherwise a local Whisper transcript of the public video file (Instagram Reels always use Whisper)
- the **hook**: the words spoken in the first 3 seconds
- a **hook type** (question, shock, listicle, story, how-to, callout, statement)
- **word count**, **words per second**, **CTA detection** and **keyword extraction**

No YouTube API key. No login. No paid LLM — hook analysis is deterministic regex and counting, so results are stable and cheap.

This is **not** another transcript-only scraper. Plenty of Actors already dump captions. This one is built for creators, agencies and AI agents that want to know *why* a short video opens the way it does, at a lower price than script-extractor tools that charge $75 / 1,000.

### What you get for each video

| Field | Meaning |
|---|---|
| `hookText` | Speech in the first 3 seconds (word-timed when YouTube provides offsets) |
| `hookType` / `hookTypes` | Primary type plus every type that matched |
| `hookWordsPerSecond` | Delivery speed of the hook |
| `wordsPerSecond` / `wordCount` | Pace of the whole transcript |
| `ctaDetected`, `ctaTypes`, `ctaPhrases` | Subscribe / follow / link in bio / promo code / watch-till-the-end, etc. |
| `ctaInHook` / `ctaInClose` | Whether the CTA sits in the opening 3s or the last 5s |
| `keywords` | Unigrams and bigrams from the transcript, boosted if they also appear in the title |
| `structure.hook` / `.body` / `.close` | The transcript split into opening, middle and close |
| `transcript` + `transcriptSegments` | Full text and timed phrases (`startMs`, `endMs`, `text`) |
| `transcriptSource` | `manual_captions`, `auto_captions`, `embedded_captions`, or `whisper` |
| `views`, `durationSeconds`, `publishedAt`, `channelName` | Public metadata |

### Inputs

Provide **at least one** of:

1. **Video URLs** — YouTube Shorts or watch links, TikTok video URLs, Instagram Reel URLs
2. **Keyword** — YouTube Shorts search, e.g. `ai tools`, `morning routine`
3. **Channel** — `@handle`, channel URL or `UC…` id (Shorts tab)

Useful options:

- `onlyWithTranscript` (default on) — videos without a transcript are not saved and not charged
- `preferredLanguage` (default `en`) — caption language preference (YouTube / TikTok tracks) and Whisper language hint
- `whisperModel` (default `tiny`) — local faster-whisper model for Instagram and for TikTok videos that have no subtitle track. YouTube never uses Whisper.
- `maxDurationSeconds` (default 180) — YouTube Shorts can be up to 3 minutes
- `uploadedWithin` — filter search/channel results by publish date
- Proxy with automatic fallback: datacenter first, then RESIDENTIAL after 3 player/caption bot-checks (YouTube) or a login-wall / WAF / empty page (Instagram, TikTok). Video files are downloaded on direct/datacenter first. TikTok reuses the SSR session (cookies + User-Agent + Referer) and only retries the page-fetch route if the CDN returns 403.
- `probe` — diagnostic mode: tries each Instagram/TikTok fetch method on every route (especially RESIDENTIAL), writes `PROBE.json` to the Key-Value Store, and does **not** push dataset items (no $0.015 charge)

### Platform support

| Platform | Transcript without login | Notes |
|---|---|---|
| **YouTube Shorts** | Yes | Innertube player (ANDROID, then IOS / TV embedded / MWEB / WEB+visitorData) → signed `timedtext`. If a datacenter IP is bot-checked, the Actor retries via RESIDENTIAL and sticks to it after 3 failures. Whisper is not used. |
| **TikTok** | Yes, when the public page is reachable | Caption-first: `subtitleInfos` / `cla_info` from the SSR page or `<script id="api-data">` (residential helps when the page is a reflow shell). If no track is present, `playAddr` / bitrate `PlayAddr` / `downloadAddr` is downloaded with the SSR session cookies and User-Agent (direct first, then the page-fetch route) and transcribed with local faster-whisper. No login is used. |
| **Instagram Reels** | Yes, when a public video URL is reachable | Instagram has no public caption track. The Actor tries embed / embed-captioned / HTML / `?__a=1&__d=dis` (RESIDENTIAL for these small pages), then downloads the public MP4 without RESIDENTIAL and transcribes it with local faster-whisper. No cookies and no paid STT API. |

Keyword and channel discovery is YouTube-only.

### How hook types are decided

Rules run on the hook text only, with no LLM:

- **question** — a `?` or a leading *who / what / why / how / is / do / can…*
- **listicle** — “5 AI tools”, “top 10”, “three ways”…
- **how_to** — “how to”, “here’s how”, “let me show you”
- **story** — “story time”, “this happened”, “so I…”, “when I was”
- **callout** — “stop scrolling”, “POV”, “if you’re…”, “don’t skip”
- **shock** — “insane”, “nobody”, “you won’t believe”, heavy `!`, etc.
- **statement** — a normal declarative opening
- **other** — too short to classify

A hook can match more than one type; `hookType` is the strongest match.

### Pricing

**$0.015 per result** ($15 per 1,000), billed as the built-in pay-per-event item (`apify-default-dataset-item`).

Only items written to the dataset are charged. With the default `onlyWithTranscript=true`, caption-less videos cost nothing.

There is no extra LLM or paid-Whisper bill. YouTube captions stay a few lightweight HTTP calls. For Instagram Reels and caption-less TikTok videos, a local `tiny` (CPU, int8) Whisper run on a 60s clip measured about 5 seconds and ~370 MB RSS on one thread — on a 2 GB Apify box that is well under a tenth of a cent, plus a small residential HTML fetch (the video file is pulled through RESIDENTIAL only if a direct download of a session-bound playAddr returns 403). That stays clearly under the $0.015 price.

### Example input

```json
{
  "keyword": "ai tools",
  "maxResults": 10,
  "preferredLanguage": "en",
  "onlyWithTranscript": true,
  "maxDurationSeconds": 180
}
```

Or pass exact links:

```json
{
  "videoUrls": [
    "https://www.youtube.com/shorts/X42HmlCL7tY",
    "https://www.instagram.com/reel/CigMSGeD4Hd/",
    "https://www.tiktok.com/@scout2015/video/6718335390845095173"
  ]
}
```

To verify which Instagram / TikTok fetch method works on Apify (after you deploy), run a probe. It writes `PROBE.json` to the Key-Value Store and does not charge per result:

```json
{
  "probe": true,
  "videoUrls": [
    "https://www.instagram.com/reel/CigMSGeD4Hd/",
    "https://www.instagram.com/reel/DX7lzTOJ1p6/",
    "https://www.tiktok.com/@scout2015/video/6718335390845095173"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": ["RESIDENTIAL"]
  },
  "autoProxyFallback": true
}
```

### Limitations and fair use

- Auto-captions and Whisper are ASR. They miss words, especially in noisy, musical or non-English audio. Hook types inherit that noise. YouTube's own caption track is preferred when it exists.
- Some creators disable captions; YouTube videos without a track are skipped when `onlyWithTranscript` is on. Instagram and caption-less TikTok videos still go through Whisper when the public file is reachable.
- This Actor reads **public** caption tracks, public page metadata and public media URLs. It does not bypass logins, captchas or paywalls, and it does not use cookies. Video files are only downloaded when a public URL is already exposed by the page or embed.
- Use the data in line with YouTube / TikTok / Instagram terms and applicable privacy law. The output is for research, content analysis and ideation, not for republishing someone else's script as your own.

### Related

If you are looking for young YouTube channels that are starting to blow up (and optionally their public business contact), use [YouTube Rising Channels & Creator Lead Finder](https://apify.com/ariadev/youtube-rising-channels-finder).

# Actor input Schema

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

YouTube Shorts or watch URLs, TikTok video URLs, or Instagram Reel URLs. YouTube uses official captions (unchanged). TikTok uses public caption tracks when the page exposes them, otherwise a local Whisper transcript of the public video file. Instagram Reels have no public caption track, so the public video file is transcribed with local Whisper. No login and no paid speech-to-text API.

## `keyword` (type: `string`):

Search YouTube for recent Shorts in this niche (e.g. "morning routine", "ai tools", "skin care"). Combined with Max results and the upload-date filter.

## `channel` (type: `string`):

A channel URL, @handle or UC… id. The Actor opens the channel's Shorts tab and analyses the most recent ones.

## `uploadedWithin` (type: `string`):

Applied to Shorts discovered via keyword or channel when a publish date is available. Direct URLs are not filtered.

## `maxResults` (type: `integer`):

Hard cap on items written to the dataset (and charged). Default is 10 so a Store auto-test stays cheap.

## `maxVideosToScan` (type: `integer`):

How many Shorts to discover before analysis (default 12, enough for the result cap without a long auto-test). Videos that have no captions can be skipped without being charged when 'Only keep videos with a transcript' is on.

## `maxDurationSeconds` (type: `integer`):

Drop search/channel videos longer than this. YouTube Shorts can be up to 3 minutes. 0 = no limit. Direct URLs are still analysed even if they are longer.

## `preferredLanguage` (type: `string`):

ISO code such as en, es, id, hi. Manual captions in this language are preferred, then auto-captions, then English, then any available track.

## `onlyWithTranscript` (type: `boolean`):

When on, videos with no transcript (captions or Whisper) are not saved and not charged. Turn off to also store metadata-only rows.

## `platforms` (type: `array`):

Limit which platforms are processed. Keyword and channel discovery is YouTube-only.

## `whisperModel` (type: `string`):

Local faster-whisper model used when Instagram has no caption track, or when a TikTok video has no subtitleInfos. Runs on CPU (int8). tiny is enough for hooks and stays well under $0.015 in compute. YouTube never uses Whisper.

## `probe` (type: `boolean`):

Diagnostic only. Tries each Instagram and TikTok page method on every connection route (especially Apify RESIDENTIAL) and writes a report to Key-Value Store record PROBE.json. Nothing is pushed to the dataset, so you are not charged $0.015 per item. Use this once after deploy to see which method works on Apify. If videoUrls is empty, built-in public examples are used.

## `country` (type: `string`):

Two-letter country code used for YouTube search, e.g. US, GB, IN, ID, BR.

## `language` (type: `string`):

Keep "en" so numbers and dates are parsed correctly. Captions themselves follow Preferred caption language.

## `maxConcurrency` (type: `integer`):

How many videos are analysed in parallel.

## `autoProxyFallback` (type: `boolean`):

If the selected proxy gets blocked, automatically try a direct connection and then Apify RESIDENTIAL proxy.

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

Apify Proxy (datacenter, default) is tried first. If YouTube bot-checks the player or caption fetch three times, the Actor switches to RESIDENTIAL for the rest of the run and retries alternate Innertube clients. Instagram and TikTok page/HTML fetches also fall back to RESIDENTIAL. Video files are downloaded on a direct or datacenter route first. TikTok media reuses the cookies and User-Agent from the page fetch; if the CDN still returns 403, the file may be retried on the same route that loaded the page (a last-resort exception, to avoid $8/GB residential traffic when possible).

## Actor input object example

```json
{
  "videoUrls": [
    "https://www.youtube.com/shorts/X42HmlCL7tY"
  ],
  "keyword": "ai tools",
  "uploadedWithin": "any",
  "maxResults": 10,
  "maxVideosToScan": 12,
  "maxDurationSeconds": 180,
  "preferredLanguage": "en",
  "onlyWithTranscript": true,
  "platforms": [
    "youtube",
    "tiktok",
    "instagram"
  ],
  "whisperModel": "tiny",
  "probe": false,
  "country": "US",
  "language": "en",
  "maxConcurrency": 4,
  "autoProxyFallback": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `hooks` (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.youtube.com/shorts/X42HmlCL7tY"
    ],
    "keyword": "ai tools",
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("ariadev/short-video-hook-analyzer").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.youtube.com/shorts/X42HmlCL7tY"],
    "keyword": "ai tools",
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("ariadev/short-video-hook-analyzer").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 '{
  "videoUrls": [
    "https://www.youtube.com/shorts/X42HmlCL7tY"
  ],
  "keyword": "ai tools",
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call ariadev/short-video-hook-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,ariadev/short-video-hook-analyzer"
        }
    }
}
```

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/TB3AbY3R1xsgldEgF/builds/IYNIgcsQagryKf6Nq/openapi.json
