trend-scanner
Scrapes social buzz, news feeds, Google Trends, Reddit, and X to surface trending topics in configurable verticals. Use when scanning for whatβs hot, discovering new content opportunities, or feeding the topic scorer.
| Model | Source |
|---|---|
| sonnet | pack: content-pumper |
Full Reference
ββ π trend-scanner ββββββββββββββββββββββββββββββ β Data ingestion layer for the Topic Brain system β β β scrapes the web, scores buzz, feeds memory β ββββββββββββββββββββββββββββββββββββββββββββββββββ
trend-scanner
Section titled βtrend-scannerβSurfaces trending topics from across the web and feeds them into topic-memory. Runs on-demand or on a schedule. Output is a scored, deduplicated array of trend objects ready for topic-scorer and sentiment-mapper.
Scan Sources
Section titled βScan Sourcesβ| Source | Tool | Signal |
|---|---|---|
| Google Trends | WebSearch (trending [vertical] [date]) | Search velocity, breakout queries |
firecrawl (reddit.com/r/<subreddit>/hot) | Upvotes, comment count, post velocity | |
| X / Twitter | WebSearch (site:x.com [vertical] trending) | Mention clusters, retweet signals |
| News aggregators | firecrawl (Google News, AP, Reuters RSS) | Recency, syndication breadth |
| Industry-specific feeds | firecrawl (configured per vertical) | Niche authority signal |
Verticals Config
Section titled βVerticals ConfigβDefault verticals β configurable per project via content-topics.json config block or env var CONTENT_VERTICALS:
| Vertical | Default Sources |
|---|---|
sports | NFL, NBA, MLB, NHL, MLS, UFC, college football/basketball |
tech | HackerNews, TechCrunch, Verge, Product Hunt |
local-news | Local paper RSS, city subreddits, NextDoor signals |
business | Bloomberg, WSJ, CNBC, r/investing, r/entrepreneur |
entertainment | Billboard, Deadline, r/movies, r/television |
Add custom verticals by extending the config block β scanner picks them up automatically.
Output Schema
Section titled βOutput SchemaβEach scan returns an array of trend objects:
[ { "title": "<string>", "source_url": "<string>", "source_platform": "google-trends | reddit | x | news | industry", "buzz_score": 0, "velocity": "rising | stable | falling", "category": "<string>", "verticals": ["<string>"], "discovered_at": "<ISO timestamp>", "raw_signals": { "mentions": 0, "shares": 0, "comments": 0 } }]buzz_score is 0β100. velocity is derived from signal rate-of-change: rising if mentions doubled in last 6h, falling if halved, stable otherwise.
Scan Process
Section titled βScan Processβ- Read config β load verticals from
content-topics.jsonconfig block orCONTENT_VERTICALSenv var - WebSearch per vertical β run targeted queries with current date to force freshness (e.g.,
"NFL trending today 2026-03-01") - Firecrawl top results β scrape the top 2 URLs per vertical for deeper signal extraction (comment counts, share counts, engagement depth)
- Deduplicate β fuzzy title match at 80% similarity threshold; merge duplicates, keep highest buzz_score entry
- Score each trend β calculate buzz_score from raw_signals using the formula below
- Feed topic-memory β for each trend: if topic exists β
update-signals; if new βadd-topicthenupdate-signals
Buzz Score Formula
Section titled βBuzz Score Formulaβbuzz_score = min(100, ( (mentions Γ 0.5) + (shares Γ 0.3) + (comments Γ 0.2)) / normalization_factor)normalization_factor is the max raw signal value observed in the current scan batch β ensures relative scoring within each run.
Rate Limiting
Section titled βRate Limitingβ| Constraint | Limit |
|---|---|
| WebSearch queries per scan | Max 20 |
| firecrawl pages per scan | Max 10 |
| Scan frequency | Min 6h between full scans (respect config.checkIntervalHours) |
| Queries per vertical | Max 4 WebSearch + 2 firecrawl pages |
Abort the scan and log a warning if limits are hit mid-run. Partial results are still valid β write what was collected.
Deduplication
Section titled βDeduplicationβFuzzy title matching using normalized Levenshtein distance:
- Lowercase + strip punctuation before comparing
- Topics within 80% similarity are merged
- On merge: keep highest
buzz_score, unionverticals[], sumraw_signals - Log merged topic pairs for audit trail
Integration
Section titled βIntegrationβ| Skill | Relationship |
|---|---|
topic-memory | Writes via add-topic + update-signals |
topic-scorer | Reads trend-scanner output to calculate composite score |
sentiment-mapper | Reads trending topics to map polarization angles |
topic-brain-pimp | Orchestrates scan cadence and routes output |
content-pumper-pimp | Triggers scans at configured intervals |