The argument in one line.
By reverse-engineering competitor TikTok videos through automated scraping and AI analysis, you can generate tailored viral script concepts that are 10x more likely to succeed than randomly brainstorming ideas.
Read if. Skip if.
- A TikTok creator or marketer with 0-50k followers who wants to reverse-engineer viral competitor content into tailored script ideas without manually analyzing videos.
- Someone running a content-driven business or agency who has API access to Claude and Gemini and wants to automate competitor analysis at scale across multiple niches.
- A non-technical founder or creator willing to copy-paste API keys and follow setup steps who needs a faster alternative to brainstorming or generic ChatGPT prompts for video hooks.
- You're already using an established content strategy tool or hiring creators to ideate — this is a DIY setup designed for founders building their own systems.
- You don't have access to Claude API and Gemini API keys, or you're unwilling to pay for third-party services like Apify and the LLM credits required to run the tool.
- You're creating long-form content, podcasts, or written content — this system is specifically built for short-form TikTok video concepts and won't transfer directly to other formats.
The full version, fast.
A competitor-mining workflow beats brainstorming when you want TikToks that actually sell, because viral patterns in your niche already encode what the algorithm and audience reward. The mechanism is a Claude-Code-built Next.js app with four tabs: curate a database of niche creators, scrape their recent top videos through Apify, send each clip to Gemini for a hook-retention-CTA breakdown, then have Claude generate three brand-tailored script concepts per winning idea using a config that defines your voice, content pillars, and output format. Sharpen the system by feeding it your full brand context, listing what you physically cannot film, mining competitor comments for unmet questions, and analyzing your own historical posts so the concepts match what your audience and algorithm already reward.
Chat with this breakdown — free.
Sign in and you get 23 free chat messages on us — ask for the hook, quote a framework, find the exact transcript moment, generate a markdown action plan. Bring your own key when you want unlimited.
Create a free account →Where the time goes.

01 · Cold open + proof
States the deliverable, shows the tool already scraping 20M-view competitor videos, names the outcome — 10x viral chances.

02 · Three-part roadmap
Slide deck declares the three parts of the video. Oleg restates it twice — signals the structure clearly upfront.

03 · Self-intro + Authority AI
5-years-in-AI credibility play, mentions his company Authority AI runs 90% automated using these same systems.

04 · Part 1 — Creators tab
UI tour: six beauty/lifestyle creators (Emira, Alix Earle, Lydia Millen, etc.), live demo adding Kendall Jenner by URL, scraping confirmation.

05 · Part 1 — Configs tab
Defines a 'Bella Glow' config: brand description, Gemini analysis prompt (hook/retention/CTA), Claude output prompt (three script variants per concept).

06 · Part 1 — Run Pipeline + Videos
Pipeline params: 20 recent videos per creator, top 3 selected, last 30 days only — to skip stale trends. Output is per-video analysis + tailored concepts.

07 · Part 2 — Install VS Code + Claude Code
Download VS Code, open the project folder he shares, install Claude Code extension. Notes Claude Code requires paid tier ($19/mo minimum).

08 · Part 2 — API keys (Apify / Gemini / Anthropic)
Walks through the .env file. Apify for scraping, Gemini for multimodal video analysis, Anthropic API for concept generation. Each is a separate console + key copy.

09 · Part 2 — npm run dev
Run the dev server, open localhost in browser, app is live. Notes you don't need Claude Code itself to use the app — only to modify it.

10 · Part 3 — Feed brand context
Tip 1: have Claude scrape your own website / LinkedIn / Instagram via Apify so it learns your ICP, products, and funnel before generating concepts.

11 · Part 3 — Declare filming constraints
Tip 2: tell the system what you can't film (solo creator, fixed location, no group shots) so it stops generating un-replicable ideas.

12 · Part 3 — Mine competitor comments
Tip 3: scrape thousands of TikTok comments on viral videos to find gaps / unanswered ICP questions you can address in your own content.

13 · Part 3 — Ingest your own history + CTA
Tip 4: scrape your own TikTok with Apify, learn what worked, feed the patterns back in. End-screen CTA points to a second Claude-Code-marketing video.
Lines worth screenshotting.
- Oleg built a Next.js app entirely via Claude Code that scrapes competitor TikToks through Apify and generates three tailored script concepts per video.
- Using competitor content as raw input for script generation means every output is already calibrated to what the target audience has proven it watches.
- Apify handles the scraping layer so the AI never touches TikTok's API directly, keeping the system within platform terms of service.
- Gemini analyzes the scraped videos and returns structured script concepts, which Claude Code then formats into the Next.js UI.
- Generating three concepts per input video gives the creator a choice rather than a mandate — the curation step stays human.
- The full pipeline (scrape → analyze → generate → display) runs inside a single owned app rather than across four separate SaaS tools.
- Building the dashboard in Next.js means the creator can access their script library from any device without a desktop app installation.
- Using a competitor's top-performing content as training signal for your own scripts is a data advantage that most solo creators ignore.
- Claude Code writing the scaffolding, API integrations, and UI reduces the build time for this kind of tool from weeks to hours.
- The system is content-format-agnostic — the same scrape-analyze-generate pattern applies to YouTube Shorts, Instagram Reels, or LinkedIn video.
- Owning the pipeline means you can add new data sources (Reddit, X, YouTube) without asking a vendor for a new integration.
- Script generation grounded in real competitor data produces more contextually relevant hooks than generation from a blank prompt.
Reverse-Engineer Competitor TikToks Into Scripts That Fit Your Brand
Oleg Melnikov built a Next.js app with Claude Code that scrapes competitor viral videos, analyzes their hooks and retention patterns, and generates three tailored script variants per concept — calibrated to your brand and filming constraints.
- The tool is already live and scraping 20M-view competitor videos before the explanation starts — proof precedes promise
- Ten times viral chances is the stated outcome — the demo is what backs it up
- Add any creator by URL, the system scrapes their account and begins analysis immediately
- The creator roster is the competitive intelligence layer — who you track determines the pattern library you build
- Brand description plus analysis prompt plus output prompt is the three-layer config — each layer can be customized independently
- Gemini analyzes hook, retention, and CTA; Claude generates three script variants per concept — two models, two distinct jobs
- 20 recent videos per creator, top 3 selected, last 30 days only — the pipeline parameters filter for current relevance
- Output is per-video analysis plus tailored concepts — the analysis and the application arrive together
- Scrape your own website, LinkedIn, and Instagram via Apify before generating — the system learns your ICP and product before producing concepts
- Brand context calibration is what separates generic viral templates from concepts that convert for your specific offer
- Tell the system what you cannot film before it generates — this stops concepts that are technically viral but practically unreplicable
- Solo creator, fixed location, no group shots — the constraints turn the system into a practical production tool, not just an idea generator
- Thousands of comments on viral videos surface the questions and gaps the original creator left unanswered
- Unanswered questions are your content opportunities — the comment section is the audience telling you what they still need
Terms worth knowing.
- Apify
- A cloud platform for web scraping and browser automation that provides pre-built scrapers ('actors') for extracting data from websites and social media platforms like TikTok.
- Scraping (web scraping)
- The automated process of extracting structured data from websites or apps — such as video metadata, view counts, or usernames — using software rather than manual browsing.
- Next.js
- A React-based web application framework that enables server-side rendering and static site generation, commonly used to build full-stack web applications with JavaScript.
- Hook (video)
- The first few seconds of a video designed to immediately capture attention and prevent viewers from scrolling away, typically a surprising statement, visual, or question.
- Retention (video)
- The percentage of viewers who continue watching a video over time; high retention signals to platform algorithms that the content is engaging and worth distributing more widely.
- Viral threshold
- An informal view or engagement count above which a piece of content is considered to have spread well beyond an account's typical audience, often used to identify content formats worth replicating.
- Content pillar
- A core topic or theme that a creator or brand consistently produces content around, used to maintain strategic focus and audience relevance across many individual posts.
- Gemini (Google AI)
- Google's family of large language models, integrated into Google products and available via API, capable of analyzing text, images, and long documents.
- API key
- A unique authentication credential that grants a software application permission to access an external service's features or data, typically kept secret to prevent unauthorized use.
Things they pointed at.
Lines you could clip.
“Our chances of going viral and generating sales will be 10x compared to randomly coming up with ideas or asking ChatGPT, hey, what should I film?”
“Even though this tool was built using Cloud Code, don't worry. It is very simple. Even if you have zero experience with it, I'll show you how to set it all up.”
“If you're not specifying that, you will get ideas that you just feel like, that's not for me. I'm wasting my time. At the end of the day, I will say screw the system. I'll do it all manually. And that's not what we want.”
“I cannot randomly make a video about fitness and how to grow huge biceps. Obviously, it's not specifically for you.”
Word for word.
Don't just watch it. Burn it in.
See every word as it's spoken — crank it to 2× and still catch all of it. The same dual-channel trick behind Amazon's Kindle + Audible.
The bait, then the rug-pull.
A clean 12-second open: state the deliverable, show the tool already running with 20M-view scrape results, promise a three-part structure. Then the entire rest of the video is just executing that promise without drift.
Named ideas worth stealing.
3-API Viral Concept Pipeline
- Apify — scrape competitor TikToks
- Gemini — analyze hook/retention/CTA visually + audibly
- Claude (Anthropic API) — generate tailored scripts in your defined output shape
Each API does one job. Apify gets the raw data, Gemini is the only one that 'watches' the video, Claude is the writer. Clean separation of concerns.
Pipeline Filtering Defaults
- 20 most recent videos per creator
- Top 3 by virality
- Past 30 days only
Recency filter is the underrated piece — kills stale trends before Claude even sees them.
AI Context Stack for Personalization
- Brand context (site, LinkedIn, IG via Apify)
- Filming constraints (what you can/can't shoot)
- Audience signal (competitor comments)
- Your own performance history (your TikTok scraped)
Four context layers that turn generic AI ideation into something actually executable for your specific situation.
How they asked for the click.
“Check out the guide in description down below. And if you're interested, here's another video about how to use Cloud Code to solve different marketing tasks, like content creation, cold outreach, and even ads creation. Check it out.”
Soft. The real CTA is the description link to the project folder, which gates Claude Code Pro signups + the three API accounts. The end-screen video pitch is bolted on. He never explicitly says 'subscribe' — the lead magnet does the conversion work.




































































