ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何监控 Google 和 YouTube 上的品牌提及
教程

如何监控 Google 和 YouTube 上的品牌提及

使用 Scavio API 构建品牌提及监控系统。自动在 Google 新闻、自然搜索结果和 YouTube 上跟踪您的品牌名称。

获取免费API密钥API文档

品牌监控对于声誉管理、公关响应和竞争情报至关重要。了解您的品牌何时在 Google 新闻、自然搜索结果和 YouTube 中被提及,有助于您快速响应报道并衡量营销活动的影响。本教程构建了一个多平台品牌监控脚本,用于查询 Google 和 YouTube 的品牌提及情况、删除重复结果并发送新提及的每日摘要。

前置条件

  • Python 3.8 或更高版本
  • 请求已安装库
  • Scavio API 密钥
  • 要跟踪的品牌名称和可选竞争对手名称

操作指南

步骤 1: 定义要监控的品牌

设置要跟踪的品牌名称和变体列表。包括常见的拼写错误或相关的产品名称。

Python
BRANDS = ["Scavio", "scavio.dev", "Scavio API"]
MONITOR_COMPETITORS = ["SerpAPI", "Bright Data"]

步骤 2: 获取 Google 提及

向 Google 查询每个品牌名称,并收集有机结果和新闻结果作为提及候选者。

Python
def google_mentions(brand: str) -> list[dict]:
    data = search_google(brand)
    mentions = data.get("organic_results", [])
    mentions += data.get("news_results", [])
    return [{"source": "google", "title": m.get("title"), "link": m.get("link"), "date": m.get("date")} for m in mentions]

步骤 3: 获取 YouTube 提及

在 YouTube 上搜索每个品牌名称并收集视频标题和 URL 作为提及。

Python
def youtube_mentions(brand: str) -> list[dict]:
    r = requests.post(
        "https://api.scavio.dev/api/v1/search",
        headers={"x-api-key": API_KEY},
        json={"platform": "youtube", "query": brand}
    )
    r.raise_for_status()
    videos = r.json().get("videos", [])
    return [{"source": "youtube", "title": v.get("title"), "link": v.get("url"), "date": v.get("published_at")} for v in videos]

步骤 4: 合并和重复数据删除

合并 Google 和 YouTube 提及内容、按 URL 删除重复内容并按日期排序。

Python
def collect_mentions(brand: str) -> list[dict]:
    mentions = google_mentions(brand) + youtube_mentions(brand)
    seen = {}
    for m in mentions:
        if m["link"] not in seen:
            seen[m["link"]] = m
    return list(seen.values())

Python 示例

Python
import os
import requests

API_KEY = os.environ.get("SCAVIO_API_KEY", "your_scavio_api_key")
ENDPOINT = "https://api.scavio.dev/api/v1/search"
BRANDS = ["Scavio", "Scavio API"]

def search(platform: str, query: str, extra: dict = {}) -> dict:
    body = {"platform": platform, "query": query, **extra} if platform != "google" else {"query": query, "country_code": "us"}
    r = requests.post(ENDPOINT, headers={"x-api-key": API_KEY}, json=body)
    r.raise_for_status()
    return r.json()

def monitor(brand: str) -> list[dict]:
    g = search("google", brand)
    y = search("youtube", brand)
    mentions = []
    for m in g.get("organic_results", [])[:5]:
        mentions.append({"src": "google", "title": m.get("title"), "url": m.get("link")})
    for v in y.get("videos", [])[:5]:
        mentions.append({"src": "youtube", "title": v.get("title"), "url": v.get("url")})
    return mentions

if __name__ == "__main__":
    for brand in BRANDS:
        print(f"\n=== {brand} ===")
        for m in monitor(brand):
            print(f"[{m['src']}] {m['title']}")

JavaScript 示例

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY || "your_scavio_api_key";
const ENDPOINT = "https://api.scavio.dev/api/v1/search";
const BRANDS = ["Scavio", "Scavio API"];

async function search(platform, query) {
  const body = platform === "google" ? { query, country_code: "us" } : { platform, query };
  const res = await fetch(ENDPOINT, {
    method: "POST",
    headers: { "x-api-key": API_KEY, "Content-Type": "application/json" },
    body: JSON.stringify(body)
  });
  return res.json();
}

async function monitor(brand) {
  const [g, y] = await Promise.all([search("google", brand), search("youtube", brand)]);
  const mentions = [];
  (g.organic_results || []).slice(0, 5).forEach(m => mentions.push({ src: "google", title: m.title, url: m.link }));
  (y.videos || []).slice(0, 5).forEach(v => mentions.push({ src: "youtube", title: v.title, url: v.url }));
  return mentions;
}

async function main() {
  for (const brand of BRANDS) {
    console.log(`\n=== ${brand} ===`);
    const m = await monitor(brand);
    m.forEach(item => console.log(`[${item.src}] ${item.title}`));
  }
}
main().catch(console.error);

预期输出

JSON
=== Scavio ===
[google] Scavio Review: Real-Time Search API for AI Agents
[google] Scavio vs SerpAPI: Which Is Better in 2026?
[youtube] I Built an AI Agent with Scavio - Full Tutorial
[youtube] Scavio API vs Bright Data Comparison

相关教程

  • 如何通过 Scavio API 获取 Google 新闻结果
  • 如何使用搜索 API 自动进行竞争对手分析

常见问题

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

Python 3.8 或更高版本. 请求已安装库. Scavio API 密钥. 要跟踪的品牌名称和可选竞争对手名称. Scavio API密钥注册即送50个免费积分。

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

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

相关资源

Best Of

最佳 Google Maps 商业数据 API(2026 年 5 月)

Read more
Best Of

Google I/O 2026 AI模式变化后最佳搜索API

Read more
Solution

API YouTube

Read more
Glossary

Google Maps Places API成本

Read more
Comparison

Scavio vs Apify (YouTube actors)

Read more
Comparison

Google CSE (Paid Tier) vs Third-Party SERP API (Scavio, SerpApi, Serper)

Read more

开始构建

使用 Scavio API 构建品牌提及监控系统。自动在 Google 新闻、自然搜索结果和 YouTube 上跟踪您的品牌名称。

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

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

产品

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

开发者

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

替代方案

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

工具

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

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策