# Viral Format Miner — TikTok Outlier Videos to Script Briefs (`growth-installations/viral-format-miner`) Actor

Search TikTok by keyword or hashtag, find videos that beat their creator's follower count, read their subtitles and turn each winner into a reusable format brief: hook, structure, pacing, CTA, sound and a fill-in script template.

- **URL**: https://apify.com/growth-installations/viral-format-miner.md
- **Developed by:** [Growth Installations](https://apify.com/growth-installations) (community)
- **Categories:** Social media, Marketing
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $300.00 / 1,000 format briefs

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

## Viral Format Miner — TikTok Outlier Videos to Script Briefs

Stop guessing what to post. Give it a few TikTok search terms or hashtags for your niche. It pulls up to 100 videos per
term, keeps the recent ones, and ranks them by **how far each video beat its creator's follower count** (a 3K-follower
account with 790K views beats a 1M-follower account with 1M views). The top outliers become **format briefs** you can
hand to a creator or editor:

- **Hook** — the first ~3 seconds of speech (from TikTok's own subtitles) or the caption opener, and its **hook type**
  (POV, question, warning, list, hot take, tutorial, before/after, story, routine, review, statement)
- **Format** (talking/voiceover, visual + text, slideshow), length bucket, **words per second**, talk ratio
- **CTA** used (follow, comment, save, share, link in bio, part 2) and **sound** (original vs trending)
- **AI brief**: format name, why it works (with the numbers), fill-in **hook formula**, beat-by-beat **structure**,
  a 30–60 word **script template** and **3 remix ideas** for your niche (switch off for rule-based briefs)

A run summary (key-value store `SUMMARY`) shows the niche's top hook types, formats, lengths, CTAs, hashtags and trending
sounds.

### Input

```json
{ "searchQueries": ["roof repair"], "hashtags": [], "videosPerSearch": 60, "maxAgeDays": 120, "minViews": 10000, "maxBriefs": 20 }
```

### Pricing (pay per event)

| Event | Price |
|---|---|
| Niche scan (per search term or hashtag, up to 100 videos) | $1.50 |
| Format brief (per outlier video) | $0.30 |

2 search terms + 20 briefs = **$9.00**. The run never goes over your "max charge per run": it writes only as many briefs
as the cap covers after the scan fees, and stops with a clear message if the cap can't cover the scans plus one brief.

### Sample output (real run, "roof repair", Nov 2026)

```json
{"rank": 1, "url": "https://www.tiktok.com/@worstdamnroofer/video/7696636894616096030", "author": "worstdamnroofer",
 "fans": 3243, "views": 791300, "views_per_follower": 244, "outlier_score": 76.8, "format": "visual + text",
 "hook": "Basic slate roof repair on this beautiful Vermont blend slate roof.",
 "format_name": "Satisfying Roof Repair ASMR",
 "hook_formula": "Satisfying [Specific Niche Task] on this beautiful [Specific Item/Location].",
 "structure": ["0-10s: Close-up of the damaged area, showing the problem clearly.", "10-60s: Detailed, step-by-step visual of the repair process...", "120-135s: Reveal of the completed, pristine repair, with a final satisfying shot."],
 "remix_ideas": ["Satisfying Gutter Cleaning ASMR...", "Detailed Chimney Flashing Repair...", "Seamless Skylight Installation..."]}
{"rank": 2, "url": "https://www.tiktok.com/@roofing.by.luis/video/7662940253187001630", "author": "roofing.by.luis",
 "fans": 1115, "views": 494900, "views_per_follower": 443.86, "format_name": "Satisfying Repair Reveal",
 "hook_formula": "Watch a [Niche Professional] finish a [Specific Task] the right way!"}
```

### Notes

- Public TikTok data only, via `clockworks/tiktok-scraper` (search + TikTok's own subtitles). Ads and sponsored posts are skipped.
- Videos without subtitles fall back to the caption for the hook (`hook_source: "caption"`).
- CLI: `python cli.py --items-json tests/fixtures/search_skincare.json --max-age-days 400 --out runs/briefs.json`

# Actor input Schema

## `searchQueries` (type: `array`):

TikTok searches for your niche, e.g. "skincare routine". Each term is one niche scan.

## `hashtags` (type: `array`):

Optional hashtags (without #). Each hashtag is one niche scan.

## `videosPerSearch` (type: `integer`):

How many videos to pull per term before ranking.

## `maxAgeDays` (type: `integer`):

Ignore videos older than this.

## `minViews` (type: `integer`):

Ignore videos below this view count.

## `maxBriefs` (type: `integer`):

How many top outliers to turn into briefs (one charge each).

## `aiBriefs` (type: `boolean`):

Use AI to write the format name, hook formula, beat structure, script template and remix ideas. Off = rule-based briefs.

## Actor input object example

```json
{
  "searchQueries": [
    "skincare routine"
  ],
  "hashtags": [],
  "videosPerSearch": 60,
  "maxAgeDays": 120,
  "minViews": 10000,
  "maxBriefs": 20,
  "aiBriefs": true
}
```

# Actor output Schema

## `briefs` (type: `string`):

No description

## `summary` (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 = {
    "searchQueries": [
        "skincare routine"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("growth-installations/viral-format-miner").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 = { "searchQueries": ["skincare routine"] }

# Run the Actor and wait for it to finish
run = client.actor("growth-installations/viral-format-miner").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 '{
  "searchQueries": [
    "skincare routine"
  ]
}' |
apify call growth-installations/viral-format-miner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,growth-installations/viral-format-miner"
        }
    }
}
```

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/5FeHa1zLFMYASac8O/builds/1z5CNIjd2cACvaIST/openapi.json
