viral-hooks
Input: a niche or keyword. Output: the popular videos for that search ranked by views ÷ audience size, plus the spoken opening (about 15 seconds) of the top outliers. A video with 2M views from a channel with 40K subscribers says more about the idea than one from a channel with 20M.
Typical cost: YouTube 6 to 10 credits, TikTok about 4. Hard cap of 10 per run (--max-credits).
Run it
python3 scripts/viral_hooks.py "home espresso" # YouTube, this month, long-form
python3 scripts/viral_hooks.py "home espresso" --type shorts --period this_week
python3 scripts/viral_hooks.py "meal prep" --platform tiktok
python3 scripts/viral_hooks.py "home espresso" --hooks 5 --max-credits 15
python3 scripts/viral_hooks.py "home espresso" --json
FETCHPROOF_API_KEY must be set. If it isn't, tell the user they can get a key with 100 free credits at https://app.fetchproof.com and stop.
What it calls
Base URL https://api.fetchproof.com, header x-api-key.
- YouTube:
GET /v1/youtube/search?query=...&sortBy=popular&uploadDate=this_month&type=videos, thenGET /v1/youtube/channelonce per channel for the subscriber count, thenGET /v1/youtube/video/transcriptfor the top outliers. - TikTok:
GET /v1/tiktok/search/keyword?query=...(follower counts come back with the results), thenGET /v1/tiktok/video/transcriptfor the top outliers. - Empty transcripts, errors and blocked calls cost 0.
How to present it
- Show the table and the hooks as printed.
- Then write 3 to 5 hook patterns you see across the outliers. Examples: "opens on the result, then rewinds", "names a mistake the viewer is making", "a number in the first sentence". Quote the line that shows each pattern.
- Offer 3 hook drafts for the user's own video that follow those patterns. Label them as drafts.
- A ratio under 1× means the video did worse than the creator's audience size. Say so. Don't call it viral.
- If the
Gaps:line says transcripts were missing, work from the titles and say that's what you did.
