# Video Hook Analyzer with Transcript Evidence (`danielmichalek/video-hook-analyzer`) Actor

Review video openings with exact transcript references and CSV exports. Send your supplied transcripts for an editorial review.

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

## Pricing

$30.00 / 1,000 video opening review reports

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

## Video Hook Analyzer with Transcript Evidence

### What it does

Review up to 100 supplied video transcripts in one deterministic editorial report. The Actor identifies explicit introduction, call to action, curiosity and absolute wording in an opening window. It compares literal content tokens with a supplied title and later passages, groups repeated openings, and exports a review queue with exact source references.

Every quoted match identifies its input field and zero-based UTF-16 character range. Timestamped segments can come directly from this factory's YouTube Transcript Actor. Processing uses the supplied text, with zero content requests and zero model calls.

### Input

Provide `videos` as an array of 1 to 100 records. Each record accepts an optional unique `id` or `videoId`, an optional `title`, and either `segments` or `text`. Additional YouTube metadata is ignored.

A segment uses `{ "start": 0, "dur": 2, "text": "Opening words" }` in seconds. `duration` is accepted as an alias when it agrees with `dur`. A missing or zero duration is reported as an unknown segment end. When nonempty segments and text are both present, analysis uses the segments. Empty segments can fall back to supplied text.

`windowSeconds` defaults to 3 and accepts 1 to 30. Whole segments starting before the boundary are included. A boundary-spanning segment is explicitly marked. Words are never assigned estimated timestamps. With plain text, `openingWords` selects the first 30 words by default, configurable from 5 to 100. Plain text carries no time-window claim.

Bounds are 2,000,000 UTF-8 input bytes, 50,000 characters and 10,000 words per video, 2,000 characters per segment, 1,000 segments per video, 10,000 total segments and 100,000 total words. The output report is capped at 4 MB. Invalid input fails before report delivery. `maxItems` is fixed at 1.

### Output

The default dataset receives one corpus report. `VIDEO_HOOK_REPORT` contains the same JSON, `VIDEO_HOOK_CSV` contains one spreadsheet row per supplied video, and `REPORT` contains Markdown findings.

Rows expose the opening excerpt, timing coverage, literal title-token matches, literal topic-continuation evidence and exact quoted rule matches. An opening excerpt is limited to 2,000 characters and marks omitted display text. Analysis still uses the bounded supplied passage. The review queue orders videos by the number of explicit editorial cues. Repeated openings are grouped after token normalization.

The same completed input, runtime and pricing can be read again using the same storage with no new delivery. An incomplete or conflicting delivery requires reconciliation. CSV cells are protected against spreadsheet formula execution. Markdown text is escaped.

### Pricing and cost control

The proposed local pilot is 0.03 USD for one bounded report containing up to 100 supplied transcripts. This quote awaits measured Cloud cost qualification and provider configuration. Current paid demand and realized margin are unverified.

One completed physical dataset report corresponds to one `video-hook-report` event when PPE is enabled. Local free runs produce zero named charges. The shared delivery component verifies the charging model, durable delivery marker and physical report before accepting completion. The Actor requests at most 256 MB and runs with zero content requests and a 45-second task limit.

### Limitations and fair use

The reported fields are literal editorial cues. Retention, conversion, visual hooks, audio timing and semantic truth are outside their measured scope. Inflections, synonyms and translations can affect literal comparisons. EN, PL and DE phrase rules are explicit and reviewable in the source.

Supplied caption offsets and durations are treated as customer data. The first supplied segment time does not establish when speech actually began. Segments crossing the opening boundary are included whole. Short later passages are marked insufficient for the continuation comparison.

Use transcripts you are authorized to process. Input and report artifacts remain in the run's normal Apify storage and follow its account retention settings. The Actor's outputs retain relevant source excerpts for review.

### Example

```json
{
  "windowSeconds": 3,
  "maxItems": 1,
  "videos": [
    {
      "id": "cache-demo",
      "title": "Reduce cloud costs with a cache",
      "segments": [
        {
          "start": 0,
          "dur": 2,
          "text": "Welcome back, subscribe before we begin."
        },
        {
          "start": 2,
          "dur": 2,
          "text": "Today we compare a simple cache."
        },
        {
          "start": 4,
          "dur": 10,
          "text": "The cache avoids duplicate network requests. We measure storage and runtime cost for a repeated workload with the same input and compare recorded counters."
        }
      ]
    }
  ]
}
```

The first example produces an introduction cue and a subscription cue with exact segment references. The segment starting at two seconds crosses the requested three-second boundary and is marked accordingly.

### Research and reproducible build

The current category research is dated 10 November 2026. An adjacent media-analysis listing reports 117 monthly users and a 0.03 USD per-video event. This is category evidence. Demand for this supplied-transcript batch product remains a hypothesis. The units differ, so a comparable competitor median is unverified.

The Dockerfile uses Node 22 and `npm ci` with the supplied lockfile. Dependencies are pinned to the factory's accepted Apify 3.7.2 and Cheerio 1.0.0-rc.12 stack. The shared libraries and single-report component have recorded source hashes.

# Actor input Schema

## `videos` (type: `array`):

Supply 1 to 100 video records with unique id or videoId, optional title, and segments or text. Segment timing uses start and dur in seconds.

## `windowSeconds` (type: `integer`):

Include whole supplied segments starting before this many seconds. Crossing segments are explicitly marked.

## `openingWords` (type: `integer`):

Select this many words when a record has plain text and no nonempty segment array.

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

One physical report and at most one report event are delivered for the entire supplied batch.

## Actor input object example

```json
{
  "videos": [
    {
      "id": "cache-demo",
      "title": "Reduce cloud costs with a cache",
      "segments": [
        {
          "start": 0,
          "dur": 2,
          "text": "Welcome back, subscribe before we begin."
        },
        {
          "start": 2,
          "dur": 2,
          "text": "Today we compare a simple cache."
        },
        {
          "start": 4,
          "dur": 10,
          "text": "The cache avoids duplicate network requests. We measure storage and runtime cost for a repeated workload with the same input and compare recorded counters."
        }
      ]
    },
    {
      "id": "zwrot-towaru",
      "title": "Zwrot towaru w sklepie internetowym",
      "text": "Zwrot towaru zaczyna się od numeru zamówienia i daty zakupu. Przygotuj opis produktu oraz potwierdzenie zakupu, potem sprawdź zasady sprzedawcy i zachowaj kopię zgłoszenia. Ten przykład przedstawia dostarczony scenariusz filmu do kontroli redakcyjnej. W dalszej części scenariusza wracamy do numeru zamówienia i sposobu zapisania potwierdzenia. To dane demonstracyjne do przeglądu tekstu."
    },
    {
      "id": "produktvideo",
      "title": "Produktvideo mit klarer Planung",
      "segments": [
        {
          "start": 0,
          "dur": 3,
          "text": "Ein einfacher Trick garantiert immer perfekte Videos."
        },
        {
          "start": 3,
          "dur": 8,
          "text": "Für das Produktvideo planen wir Licht, Ton und drei Aufnahmen. Danach vergleichen wir die Aufnahmen mit der Planung und prüfen die Aussagen im Skript."
        }
      ]
    }
  ],
  "windowSeconds": 3,
  "openingWords": 30,
  "maxItems": 1
}
```

# Actor output Schema

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

No description

## `report` (type: `string`):

No description

## `csv` (type: `string`):

No description

## `markdown` (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 = {
    "videos": [
        {
            "id": "cache-demo",
            "title": "Reduce cloud costs with a cache",
            "segments": [
                {
                    "start": 0,
                    "dur": 2,
                    "text": "Welcome back, subscribe before we begin."
                },
                {
                    "start": 2,
                    "dur": 2,
                    "text": "Today we compare a simple cache."
                },
                {
                    "start": 4,
                    "dur": 10,
                    "text": "The cache avoids duplicate network requests. We measure storage and runtime cost for a repeated workload with the same input and compare recorded counters."
                }
            ]
        },
        {
            "id": "zwrot-towaru",
            "title": "Zwrot towaru w sklepie internetowym",
            "text": "Zwrot towaru zaczyna się od numeru zamówienia i daty zakupu. Przygotuj opis produktu oraz potwierdzenie zakupu, potem sprawdź zasady sprzedawcy i zachowaj kopię zgłoszenia. Ten przykład przedstawia dostarczony scenariusz filmu do kontroli redakcyjnej. W dalszej części scenariusza wracamy do numeru zamówienia i sposobu zapisania potwierdzenia. To dane demonstracyjne do przeglądu tekstu."
        },
        {
            "id": "produktvideo",
            "title": "Produktvideo mit klarer Planung",
            "segments": [
                {
                    "start": 0,
                    "dur": 3,
                    "text": "Ein einfacher Trick garantiert immer perfekte Videos."
                },
                {
                    "start": 3,
                    "dur": 8,
                    "text": "Für das Produktvideo planen wir Licht, Ton und drei Aufnahmen. Danach vergleichen wir die Aufnahmen mit der Planung und prüfen die Aussagen im Skript."
                }
            ]
        }
    ],
    "windowSeconds": 3,
    "openingWords": 30,
    "maxItems": 1
};

// Run the Actor and wait for it to finish
const run = await client.actor("danielmichalek/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 = {
    "videos": [
        {
            "id": "cache-demo",
            "title": "Reduce cloud costs with a cache",
            "segments": [
                {
                    "start": 0,
                    "dur": 2,
                    "text": "Welcome back, subscribe before we begin.",
                },
                {
                    "start": 2,
                    "dur": 2,
                    "text": "Today we compare a simple cache.",
                },
                {
                    "start": 4,
                    "dur": 10,
                    "text": "The cache avoids duplicate network requests. We measure storage and runtime cost for a repeated workload with the same input and compare recorded counters.",
                },
            ],
        },
        {
            "id": "zwrot-towaru",
            "title": "Zwrot towaru w sklepie internetowym",
            "text": "Zwrot towaru zaczyna się od numeru zamówienia i daty zakupu. Przygotuj opis produktu oraz potwierdzenie zakupu, potem sprawdź zasady sprzedawcy i zachowaj kopię zgłoszenia. Ten przykład przedstawia dostarczony scenariusz filmu do kontroli redakcyjnej. W dalszej części scenariusza wracamy do numeru zamówienia i sposobu zapisania potwierdzenia. To dane demonstracyjne do przeglądu tekstu.",
        },
        {
            "id": "produktvideo",
            "title": "Produktvideo mit klarer Planung",
            "segments": [
                {
                    "start": 0,
                    "dur": 3,
                    "text": "Ein einfacher Trick garantiert immer perfekte Videos.",
                },
                {
                    "start": 3,
                    "dur": 8,
                    "text": "Für das Produktvideo planen wir Licht, Ton und drei Aufnahmen. Danach vergleichen wir die Aufnahmen mit der Planung und prüfen die Aussagen im Skript.",
                },
            ],
        },
    ],
    "windowSeconds": 3,
    "openingWords": 30,
    "maxItems": 1,
}

# Run the Actor and wait for it to finish
run = client.actor("danielmichalek/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 '{
  "videos": [
    {
      "id": "cache-demo",
      "title": "Reduce cloud costs with a cache",
      "segments": [
        {
          "start": 0,
          "dur": 2,
          "text": "Welcome back, subscribe before we begin."
        },
        {
          "start": 2,
          "dur": 2,
          "text": "Today we compare a simple cache."
        },
        {
          "start": 4,
          "dur": 10,
          "text": "The cache avoids duplicate network requests. We measure storage and runtime cost for a repeated workload with the same input and compare recorded counters."
        }
      ]
    },
    {
      "id": "zwrot-towaru",
      "title": "Zwrot towaru w sklepie internetowym",
      "text": "Zwrot towaru zaczyna się od numeru zamówienia i daty zakupu. Przygotuj opis produktu oraz potwierdzenie zakupu, potem sprawdź zasady sprzedawcy i zachowaj kopię zgłoszenia. Ten przykład przedstawia dostarczony scenariusz filmu do kontroli redakcyjnej. W dalszej części scenariusza wracamy do numeru zamówienia i sposobu zapisania potwierdzenia. To dane demonstracyjne do przeglądu tekstu."
    },
    {
      "id": "produktvideo",
      "title": "Produktvideo mit klarer Planung",
      "segments": [
        {
          "start": 0,
          "dur": 3,
          "text": "Ein einfacher Trick garantiert immer perfekte Videos."
        },
        {
          "start": 3,
          "dur": 8,
          "text": "Für das Produktvideo planen wir Licht, Ton und drei Aufnahmen. Danach vergleichen wir die Aufnahmen mit der Planung und prüfen die Aussagen im Skript."
        }
      ]
    }
  ],
  "windowSeconds": 3,
  "openingWords": 30,
  "maxItems": 1
}' |
apify call danielmichalek/video-hook-analyzer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,danielmichalek/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/72W0rRj1vntdMkyga/builds/3BSv3h9qqQJmj7ikx/openapi.json
