What is find_viral_template?
find_viral_template is a Hooklayer MCP tool that returns proven viral templates for a niche — hook_pattern + format + average_views + example URLs. Sources: YouTube Data API + Reddit hot + TikTok internal corpus. Includes a quality field that flags when upstream returns hashtag-only patterns instead of structured templates so agents can fall back to analyze_account.steal_map.
Curated structures, not generic ideas. Each template returns the actual hook pattern (e.g. "Mid-Action Drop"), the format (dialogue / screen recording / talking head / b-roll), average views from real videos, and 1-3 example URLs you can verify. Different from "give me 10 hook ideas" — these are extracted from videos that actually went viral.
Quality-gated. If the upstream pipeline degrades and returns hashtag-prefixed strings instead of real templates (a known failure mode), quality.level drops to "degraded" with the reason captured. The provenance block includes a fallback suggestion (use analyze_account on a top creator and extract their steal_map).
Optional view-floor filter. Pass min_views to filter examples below a threshold. Useful when you want only mega-viral templates (>1M views) vs validating templates (>100K). The filter only applies to items that expose a view count — Reddit-sourced items pass through unfiltered to ensure non-empty results.
Inputs & outputs
Endpoint: POST /api/v1/templates
Inputs
nichestringrequiredNiche to search (e.g. "Finance & Business", "Tech & Coding")
min_viewsintegerFilter examples above this view count (only applies to items with view counts)
Output fields
templatesUp to 12 ranked templates with hook_pattern, format, title, avg_views, engagement_rate, why_it_fits, source, url
statstotalFetched and returned counts for transparency
qualitylevel (full | partial | degraded) — flags hashtag-pattern fallback when upstream returns thin data
provenanceupstream_pipeline name, rubric_version, fallback note when quality is degraded
cURL
curl -X GET "https://hooklayer.dev/api/v1/templates?niche=Finance+%26+Business&min_views=500000" \
-H "Authorization: Bearer hl_live_..."Example prompts
Paste any of these into Claude Desktop (with Hooklayer connected) to see the live response.
Niche template hunt
Use Hooklayer find_viral_template for the "Finance & Business" niche with min_views=500000. Show me the templates table with hook_pattern + format + avg_views + the actual example URL for each. Flag quality.level — if it's degraded, fall back to analyze_account on a top creator in the niche.Expected output: Returns 8-12 templates with real example URLs. quality.level full when upstream returned structured data; degraded with the fallback suggestion when upstream slipped to hashtag-only.
Cross-niche template patterns
Call Hooklayer find_viral_template for three different niches: "Tech & Coding", "Fitness & Health", "Beauty & Skincare". For each, identify the top template by avg_views. Then tell me which hook_pattern appears across all 3 niches (universal pattern) and which is niche-specific.Expected output: Shows hook patterns travel across niches (Mid-Action Drop everywhere) while formats are niche-specific (Tech = screen recording dominant, Beauty = GRWM dominant).
Validate degraded fallback
Use Hooklayer find_viral_template for "Niche-That-Probably-Has-Thin-Data". Check the quality field. If degraded, follow the provenance note and call analyze_account on a known creator in that space instead.Expected output: Demonstrates honest tool-health reporting. When upstream fails, the agent visibly falls back instead of returning hashtags pretending to be templates.
Frequently asked
How is this different from analyze_account?
analyze_account is creator-specific — pass a handle, get their formula. find_viral_template is niche-specific — pass a niche, get the best formulas working across multiple creators in that niche. Use find_viral_template when you don't have a specific creator in mind. Use analyze_account when you do.
Why does it sometimes return hashtags instead of templates?
Upstream pipeline degradation. The data sources (YouTube + Reddit + internal corpus) sometimes return thin matches for low-volume niches. When that happens, the upstream falls back to title-as-pattern matching which can produce hashtag-prefixed strings. Hooklayer detects this (quality.level = degraded) and surfaces a fallback suggestion in the provenance block rather than pretending the response is full.
What does min_views actually filter on?
YouTube/TikTok items with explicit view counts. Reddit-sourced items pass through regardless because they have a different engagement metric (upvotes, not views). This design avoids accidentally empty result sets when an unusual niche has Reddit-only data. Read the source field on each template to know which signal produced it.
Are the templates copyable or copyrighted?
Templates describe STRUCTURE (hook_pattern + format) — not specific copyrighted content. Copying a Mid-Action Drop hook pattern is no more infringing than using a 12-bar blues progression. The example URLs are references for inspection — don't copy their specific dialogue or visuals; copy the beat structure and rewrite the surface.
How fresh is the template data?
Same 12-hour cache as trend_pulse — the underlying niche-aggregator pipeline refreshes per-niche on a 12h TTL. quality.level partial fires when the cache is between 12h and 24h. Beyond 24h, the next call triggers a refresh automatically.
Can I get templates filtered by hook type rather than niche?
Not in v1. find_viral_template is niche-scoped; trend_pulse is the closest hook-pattern surface. Workaround: call find_viral_template for several niches, then filter the templates[] array client-side by hook_pattern. v2 will add a hook_pattern query param.
Related tools
Try find_viral_template in 30 seconds.
100 free credits at signup. No card. Works in Claude Desktop, Cursor, n8n, or any MCP client.
