ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何根据购买意图对 Reddit 主题进行评分
教程

如何根据购买意图对 Reddit 主题进行评分

根据购买和决策意图信号对 Reddit 帖子进行评分。对销售和营销推广的高意图主题进行排名。 Python 价格为 0.005 美元/查询。

获取免费API密钥API文档

并非所有 Reddit 主题都适合外展。询问“最适合我的初创公司的 SERP API 是什么”的帖子比“什么是 SERP API”的购买意愿要高得多。该评分器会在 Reddit 中搜索您的产品类别,根据意图信号对话题进行分类,并输出值得参与的高意图话题的排名列表。每次搜索费用为 0.005 美元。

前置条件

  • Python 3.8+
  • 请求库
  • 来自 scavio.dev 的 Scavio API 密钥
  • 目标产品类别或关键词

操作指南

步骤 1: 定义意图信号模式

为不同级别的购买意图创建模式匹配器。

Python
import os, requests, re

API_KEY = os.environ['SCAVIO_API_KEY']
SH = {'x-api-key': API_KEY, 'Content-Type': 'application/json'}

INTENT_SIGNALS = {
    'high_purchase': {
        'patterns': ['looking for', 'need a', 'want to buy', 'budget for', 'willing to pay',
                     'recommend me', 'what should i use', 'shopping for'],
        'weight': 10
    },
    'comparison': {
        'patterns': ['vs', 'versus', 'compared to', 'alternative to', 'better than',
                     'switch from', 'migrate from'],
        'weight': 8
    },
    'evaluation': {
        'patterns': ['review of', 'experience with', 'thoughts on', 'worth it',
                     'anyone tried', 'opinions on', 'how is'],
        'weight': 6
    },
    'pain_point': {
        'patterns': ['frustrated with', 'problem with', 'struggling with', 'hate',
                     'broken', 'too expensive', 'unreliable'],
        'weight': 7
    },
    'informational': {
        'patterns': ['what is', 'how does', 'explain', 'eli5', 'tutorial', 'guide'],
        'weight': 2
    }
}

print('Intent signal categories configured:')
for cat, data in INTENT_SIGNALS.items():
    print(f'  {cat}: {len(data["patterns"])} patterns, weight {data["weight"]}')

步骤 2: 搜索 Reddit 并评分主题

拉出 Reddit 线程并根据发现的意图信号对每个线程进行评分。

Python
def score_thread(title, snippet):
    text = f'{title} {snippet}'.lower()
    total_score = 0
    matched_intents = []
    for category, data in INTENT_SIGNALS.items():
        for pattern in data['patterns']:
            if pattern in text:
                total_score += data['weight']
                matched_intents.append(category)
                break  # One match per category
    return total_score, list(set(matched_intents))

def search_and_score(query):
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': query, 'platform': 'reddit', 'country_code': 'us'}).json()
    scored = []
    for r in data.get('organic_results', []):
        title = r.get('title', '')
        snippet = r.get('snippet', '')
        score, intents = score_thread(title, snippet)
        scored.append({
            'title': title[:80], 'link': r.get('link', ''),
            'snippet': snippet[:120], 'score': score,
            'intents': intents
        })
    scored.sort(key=lambda x: x['score'], reverse=True)
    return scored

results = search_and_score('serp api recommendation')
for r in results[:5]:
    print(f'  [{r["score"]:2}] {r["title"][:60]} | {r["intents"]}')

步骤 3: 搜索多个查询并聚合

运行多个以意图为中心的查询并合并结果。

Python
def multi_query_score(product, queries=None):
    if not queries:
        queries = [
            f'{product} recommendation',
            f'best {product} for startup',
            f'{product} alternative',
            f'{product} vs',
            f'looking for {product}',
        ]
    all_scored = []
    seen_links = set()
    for query in queries:
        results = search_and_score(query)
        for r in results:
            if r['link'] not in seen_links:
                seen_links.add(r['link'])
                all_scored.append(r)
    all_scored.sort(key=lambda x: x['score'], reverse=True)
    cost = len(queries) * 0.005
    print(f'Scored {len(all_scored)} unique threads from {len(queries)} queries. Cost: ${cost:.3f}')
    return all_scored

scored = multi_query_score('serp api')
print(f'\nHigh intent threads (score >= 8):')
high_intent = [s for s in scored if s['score'] >= 8]
for s in high_intent[:10]:
    print(f'  [{s["score"]:2}] {s["title"][:60]}')
    print(f'       Intents: {", ".join(s["intents"])}')

步骤 4: 生成外展优先级列表

按意图得分和新近度对线程进行排名,以进行外展优先级。

Python
def outreach_list(scored, min_score=6):
    qualified = [s for s in scored if s['score'] >= min_score]
    print(f'\n=== Outreach Priority List ===')
    print(f'Threads above score {min_score}: {len(qualified)}/{len(scored)}')
    print(f'\n{"#":3} {"Score":6} {"Intents":30} {"Thread":50}')
    print('-' * 95)
    for i, s in enumerate(qualified[:20], 1):
        intent_str = ', '.join(s['intents'][:3])
        print(f'{i:3} [{s["score"]:2}]  {intent_str:28} {s["title"][:48]}')
    # Summary stats
    if qualified:
        avg_score = sum(s['score'] for s in qualified) / len(qualified)
        intent_dist = {}
        for s in qualified:
            for intent in s['intents']:
                intent_dist[intent] = intent_dist.get(intent, 0) + 1
        print(f'\nAvg intent score: {avg_score:.1f}')
        print(f'Intent distribution:')
        for intent, count in sorted(intent_dist.items(), key=lambda x: -x[1]):
            print(f'  {intent}: {count} threads')

outreach_list(scored)

Python 示例

Python
import os, requests
SH = {'x-api-key': os.environ['SCAVIO_API_KEY'], 'Content-Type': 'application/json'}

HIGH_INTENT = ['looking for', 'recommend', 'budget for', 'need a', 'best']

def score_reddit(query):
    data = requests.post('https://api.scavio.dev/api/v1/search',
        headers=SH, json={'query': query, 'platform': 'reddit', 'country_code': 'us'}).json()
    for r in data.get('organic_results', [])[:5]:
        text = f"{r.get('title','')} {r.get('snippet','')}".lower()
        score = sum(1 for p in HIGH_INTENT if p in text)
        if score > 0:
            print(f'  [{score}] {r["title"][:60]}')

score_reddit('serp api recommendation')

JavaScript 示例

JavaScript
const SH = { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' };
const HIGH_INTENT = ['looking for', 'recommend', 'budget for', 'need a', 'best'];
async function scoreReddit(query) {
  const data = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST', headers: SH,
    body: JSON.stringify({ query, platform: 'reddit', country_code: 'us' })
  }).then(r => r.json());
  for (const r of (data.organic_results || []).slice(0, 5)) {
    const text = `${r.title || ''} ${r.snippet || ''}`.toLowerCase();
    const score = HIGH_INTENT.filter(p => text.includes(p)).length;
    if (score > 0) console.log(`  [${score}] ${r.title.slice(0, 60)}`);
  }
}
scoreReddit('serp api recommendation').catch(console.error);

预期输出

JSON
Intent signal categories configured:
  high_purchase: 8 patterns, weight 10
  comparison: 7 patterns, weight 8
  evaluation: 7 patterns, weight 6
  pain_point: 7 patterns, weight 7

Scored 42 unique threads from 5 queries. Cost: $0.025

High intent threads (score >= 8):
  [18] Looking for a SERP API alternative to SerpAPI, budget $50/mo
       Intents: high_purchase, comparison
  [16] Need a search API for my AI agent startup, what should I use?
       Intents: high_purchase, evaluation
  [14] Frustrated with SerpAPI pricing, looking for alternatives
       Intents: pain_point, high_purchase

=== Outreach Priority List ===
Threads above score 6: 15/42

相关教程

  • 如何构建 Reddit 市场研究扫描仪
  • 如何构建 Reddit 股票情绪扫描仪
  • 如何构建个人 Reddit 监视器

常见问题

大多数开发者在15到30分钟内完成本教程。您需要一个Scavio API密钥(免费套餐即可)和可用的Python或JavaScript环境。

Python 3.8+. 请求库. 来自 scavio.dev 的 Scavio API 密钥. 目标产品类别或关键词. Scavio API密钥注册即送50个免费积分。

可以。免费套餐注册即送50个积分,完全足够完成本教程并构建一个可运行的原型解决方案。

Scavio提供原生LangChain包(langchain-scavio)、MCP服务器以及适用于任何HTTP客户端的REST API。本教程使用 the raw REST API, 但您可以根据需要适配您选择的框架。

相关资源

Best Of

2026 年股票情绪数据的最佳 Reddit API

Read more
Best Of

2026 年最佳 Reddit API

Read more
Glossary

搜索 API 供应商格局(2026)

Read more
Solution

Reddit

Read more
Solution

Reddit Reddit API

Read more
Comparison

Reddit API / Search API vs Social Listening Tools (Brandwatch, Mention, Sprout Social)

Read more

开始构建

根据购买和决策意图信号对 Reddit 帖子进行评分。对销售和营销推广的高意图主题进行排名。 Python 价格为 0.005 美元/查询。

获取免费API密钥阅读文档
ScavioScavio

面向AI智能体的实时搜索API。搜索所有平台,不仅仅是Google。

产品

  • 功能
  • 定价
  • 控制台
  • 联盟计划

开发者

  • 文档
  • API参考
  • 快速开始
  • MCP集成
  • Python SDK

替代方案

  • Tavily替代方案
  • SerpAPI替代方案
  • Firecrawl替代方案
  • Exa替代方案

工具

  • JSON格式化
  • cURL转代码
  • Token计数器
  • 全部工具

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策