【模塊 #04】從 Google 搜尋到 X / IG / Threads:我怎麼讓系統自己找「有人想看」的題目?[Module #04] From Google Search Console to X, IG & Threads: How My System Finds Topics People Actually Want
寫文章最怕沒人看。我把 Google Search Console 真實搜尋數據跟 X、IG、Threads 的社群熱度串在一起,讓系統每天半夜自動幫我挑出「最值得寫的題目」。
The hardest part of content is guessing what people care about. I wired Google Search Console data with X, IG, and Threads trends so my system spots high-demand topics every midnight.
這套系統的運作邏輯並非單純抓取熱門關鍵字,而是尋找「需求大於供給」的甜蜜點。我將其拆解為兩條核心數據流:第一條是「存量需求分析」,透過 Google Search Console API 抓取過去 30 天內,曝光次數(Impressions)極高但點擊率(CTR)低於 2% 的關鍵字。這代表用戶正在搜尋這些詞,但現有的內容(包括我的網站)並未精準解決他們的疑問。第二條是「增量情緒分析」,利用爬蟲監測 X (Twitter) 和 Threads 上與我專業領域相關的問句(例如:有人知道...怎麼辦嗎?、為什麼...這麼難用?)。當這兩條線在某個主題上產生交集時,這就是一個「必火」的題目。
在開發這套系統的過程中,我遇到了幾個關鍵挑戰:首先是「數據噪音」,社群上的熱點往往帶有大量情緒但缺乏長效價值,因此必須加入 GSC 的搜尋趨勢作為過濾器。其次是「頻率限制」,頻繁抓取 X 或 Threads 會導致 IP 被封,因此我改用分散式代理伺服器並拉長抓取間隔。最後是「AI 幻覺」,AI 有時會為了迎合題目而編造不存在的技術細節,所以我現在會強制要求 AI 在大綱中標註所有引用來源的真實性。這些工程細節的打磨,才是系統真正能穩定運作的關鍵。
01 // Core Logic: Mining the Intersection of Search Gaps and Social Pulse
The system doesn't just grab trending keywords; it hunts for the 'demand > supply' sweet spot. I split this into two data streams: First, 'Stock Demand Analysis' via GSC API, targeting keywords with high impressions but CTR below 2% over the last 30 days. This indicates users are searching, but existing content—including mine—isn't solving their problem. Second, 'Incremental Sentiment Analysis' using scrapers to monitor questions on X and Threads (e.g., 'Does anyone know how to...?', 'Why is ... so difficult?'). When these two streams intersect on a topic, it becomes a high-priority writing task.
02 // Tech Stack: Building an Automated Topic Radar on a Budget
Direct access to first-party intent data; filters for 'hidden gems' with high impressions but rankings outside the top 10.
Puppeteer / Playwright
Social Monitoring
Threads lacks an open API; automation tools simulate browsing to capture the latest discussion heat for specific keywords.
Gemini 2.5 Flash
Semantic Filtering
Uses massive context windows and low cost to cluster thousands of raw data points and score them by 'conversion potential'.
Cloudflare Workers
Serverless Scheduler
Uses Cron Triggers for zero-cost automation, triggering scripts at midnight without the need for 24/7 server maintenance.
PostgreSQL (Supabase)
Historical Database
Stores keyword performance to distinguish between 'flash-in-the-pan' fads and 'steady growth' trends.
03 // The Scoring Algorithm: How I Rank Topics
Once data is captured, sending it all to the AI is wasteful. I designed a scoring formula: `Topic_Score = (Impression_Weight * log(Impressions)) + (Social_Heat * 1.5) - (Competition_Index * 0.8)`. `Impression_Weight` comes from GSC (the search baseline); `Social_Heat` is the 24-hour engagement on X/Threads (weighted higher for viral potential); finally, we subtract a `Competition_Index`—if the top 3 results are major authority sites, I pivot. Only topics scoring above 80 trigger the AI outline generation phase.
04 // AI Workflow: From Keywords to Structured Outlines
When a topic is selected, Gemini 2.5 Flash takes over. My prompt covers three layers: 1. Pain Point Reconstruction (recreating the user's frustration based on social posts); 2. Knowledge Completion (searching for missing info in current market content); 3. Structured Suggestions (generating titles, core arguments, and code snippet ideas). Instead of waking up to 'what should I write?' anxiety, I get a task list: 'These three topics have data and structure ready; just add your expertise.'
05 // Pitfalls and Lessons Learned
During development, I hit several challenges: First, 'Data Noise'—social trends often have high emotion but low longevity, so GSC search trends are a mandatory filter. Second, 'Rate Limiting'—frequent scraping of X/Threads leads to IP bans, so I switched to distributed proxies and longer intervals. Finally, 'AI Hallucinations'—AI sometimes invents technical details to fit a topic, so I now force it to verify the authenticity of all references in the outline. Polishing these engineering details is what makes the system truly stable.