ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何跟踪预算中的人工智能概述引用
教程

如何跟踪预算中的人工智能概述引用

无需昂贵的排名跟踪工具即可监控哪些网站在 Google AI 概述中被引用。使用搜索 API 的 Python 脚本,每次查询 0.005 美元。

获取免费API密钥API文档

谷歌人工智能概述现在出现在大部分信息查询中,并且在其中被引用会带来大量流量。传统的排名跟踪器会收取数百美元来监控 AI 概览的引用情况。您可以使用搜索 API 构建自己的跟踪器,该 API 在其 SERP 响应中返回 AI 概述数据。本教程构建了一个引文监控管道,用于检查您的目标关键字、记录哪些域被引用,并随着时间的推移跟踪您的引文份额。通过 Scavio API 每张支票的费用为 0.005 美元。

前置条件

  • 已安装 Python 3.9+
  • 请求已安装库
  • 来自 scavio.dev 的 Scavio API 密钥
  • 您期望人工智能概述的关键字列表

操作指南

步骤 1: 检查查询是否触发 AI 概述

搜索关键字并检查 SERP 响应是否包含 AI 概述部分。并非所有查询都会触发一个查询,因此此步骤会过滤您的关键字列表。

Python
import requests, os

API_KEY = os.environ['SCAVIO_API_KEY']

def check_ai_overview(query: str) -> dict:
    resp = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY, 'Content-Type': 'application/json'},
        json={'query': query, 'country_code': 'us'})
    data = resp.json()
    ai_overview = data.get('ai_overview', {})
    has_overview = bool(ai_overview and ai_overview.get('text'))
    citations = ai_overview.get('citations', []) if has_overview else []
    return {
        'query': query,
        'has_ai_overview': has_overview,
        'citation_count': len(citations),
        'cited_domains': [c.get('domain', '') for c in citations]
    }

result = check_ai_overview('what is the best crm for startups')
print(f'AI Overview: {result["has_ai_overview"]}, Citations: {result["citation_count"]}')

步骤 2: 批量检查关键词并查找引用模式

浏览您的关键字列表并收集引文数据。确定目标关键字中哪些域被引用最频繁。

Python
import time
from collections import Counter

def batch_citation_check(keywords: list) -> dict:
    results = []
    domain_counts = Counter()
    for kw in keywords:
        data = check_ai_overview(kw)
        results.append(data)
        for domain in data['cited_domains']:
            domain_counts[domain] += 1
        time.sleep(0.3)
    return {
        'total_keywords': len(keywords),
        'with_ai_overview': sum(1 for r in results if r['has_ai_overview']),
        'top_cited_domains': domain_counts.most_common(10),
        'details': results
    }

keywords = [
    'what is the best crm for startups',
    'how to choose a crm 2026',
    'crm software comparison',
    'best free crm tools'
]
report = batch_citation_check(keywords)
print(f'{report["with_ai_overview"]}/{report["total_keywords"]} keywords have AI Overviews')

步骤 3: 跟踪您的域名引用份额

计算与竞争对手相比,您的域名在 AI 概述引用中出现的频率。这是您分享的人工智能概览。

Python
def citation_share(report: dict, your_domain: str) -> dict:
    total_citations = sum(count for _, count in report['top_cited_domains'])
    your_citations = sum(count for domain, count in report['top_cited_domains']
                         if your_domain in domain)
    share = (your_citations / max(total_citations, 1)) * 100
    # Find keywords where you are cited
    your_keywords = [r['query'] for r in report['details']
                     if any(your_domain in d for d in r['cited_domains'])]
    # Find keywords where you are NOT cited
    missing_keywords = [r['query'] for r in report['details']
                        if r['has_ai_overview'] and
                        not any(your_domain in d for d in r['cited_domains'])]
    return {
        'your_domain': your_domain,
        'citation_share': round(share, 1),
        'your_citations': your_citations,
        'total_citations': total_citations,
        'cited_keywords': your_keywords,
        'missing_keywords': missing_keywords
    }

share = citation_share(report, 'yoursite.com')
print(f'Citation share: {share["citation_share"]}% ({share["your_citations"]}/{share["total_citations"]})')
print(f'Missing from: {share["missing_keywords"]}')

步骤 4: 存储历史数据以进行趋势跟踪

保存每日引文数据以跟踪您的 AEO 努力是否随着时间的推移而发挥作用。一个简单的 JSON 文件存储时间序列。

Python
import json
from datetime import date

def save_citation_history(report: dict, your_domain: str) -> None:
    history_file = 'citation_history.json'
    try:
        with open(history_file) as f:
            history = json.load(f)
    except FileNotFoundError:
        history = []
    share = citation_share(report, your_domain)
    history.append({
        'date': date.today().isoformat(),
        'citation_share': share['citation_share'],
        'your_citations': share['your_citations'],
        'total_citations': share['total_citations'],
        'keywords_checked': report['total_keywords'],
        'keywords_with_overview': report['with_ai_overview']
    })
    with open(history_file, 'w') as f:
        json.dump(history, f, indent=2)
    print(f'Saved citation data for {date.today()}')
    if len(history) > 1:
        prev = history[-2]['citation_share']
        curr = share['citation_share']
        delta = curr - prev
        print(f'Trend: {prev}% -> {curr}% ({delta:+.1f}%)')

步骤 5: 计算监控成本

根据关键字计数和检查频率来预算您的 AI 概览监控。每日检查 100 个关键字的费用为 15 美元/月。

Python
def monitoring_budget(num_keywords: int, checks_per_day: int = 1) -> dict:
    daily_credits = num_keywords * checks_per_day
    monthly_credits = daily_credits * 30
    monthly_cost = monthly_credits * 0.005
    return {
        'keywords': num_keywords,
        'daily_checks': checks_per_day,
        'monthly_credits': monthly_credits,
        'monthly_cost': f'${monthly_cost:.2f}',
        'plan': '$30/7K' if monthly_credits <= 7000
            else '$100/28K' if monthly_credits <= 28000
            else '$250/85K',
        'vs_semrush': f'Semrush Position Tracking: $139.95+/mo'
    }

for n in [50, 100, 500]:
    b = monitoring_budget(n)
    print(f'{b["keywords"]} keywords: {b["monthly_cost"]}/mo ({b["plan"]} plan)')
print(f'Comparison: Semrush starts at $139.95/mo for similar tracking')

Python 示例

Python
import os, requests, time, json
from collections import Counter
from datetime import date

API_KEY = os.environ['SCAVIO_API_KEY']

def check_ai_overview(query):
    resp = requests.post('https://api.scavio.dev/api/v1/search',
        headers={'x-api-key': API_KEY, 'Content-Type': 'application/json'},
        json={'query': query, 'country_code': 'us'})
    data = resp.json()
    aio = data.get('ai_overview', {})
    citations = aio.get('citations', []) if aio.get('text') else []
    return {'query': query, 'has_aio': bool(aio.get('text')),
            'domains': [c.get('domain', '') for c in citations]}

def main():
    keywords = ['best crm startups', 'crm comparison 2026', 'free crm tools']
    domain_counts = Counter()
    for kw in keywords:
        result = check_ai_overview(kw)
        print(f'{"+AIO" if result["has_aio"] else "-AIO"} {kw}: {len(result["domains"])} citations')
        for d in result['domains']:
            domain_counts[d] += 1
        time.sleep(0.3)
    print(f'\nTop cited domains:')
    for domain, count in domain_counts.most_common(5):
        print(f'  {domain}: {count}')
    print(f'Cost: ${len(keywords) * 0.005:.3f}')

if __name__ == '__main__':
    main()

JavaScript 示例

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;

async function checkAiOverview(query) {
  const resp = await fetch('https://api.scavio.dev/api/v1/search', {
    method: 'POST',
    headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
    body: JSON.stringify({ query, country_code: 'us' })
  });
  const data = await resp.json();
  const aio = data.ai_overview || {};
  return {
    query,
    hasAio: Boolean(aio.text),
    domains: (aio.citations || []).map(c => c.domain || '')
  };
}

async function main() {
  const keywords = ['best crm startups', 'crm comparison 2026'];
  const domainCounts = {};
  for (const kw of keywords) {
    const r = await checkAiOverview(kw);
    console.log(`${r.hasAio ? '+AIO' : '-AIO'} ${kw}: ${r.domains.length} citations`);
    r.domains.forEach(d => { domainCounts[d] = (domainCounts[d] || 0) + 1; });
  }
  console.log('Top domains:', Object.entries(domainCounts).sort((a,b) => b[1]-a[1]).slice(0,5));
}

main().catch(console.error);

预期输出

JSON
+AIO what is the best crm for startups: 4 citations
+AIO how to choose a crm 2026: 3 citations
+AIO crm software comparison: 5 citations
-AIO best free crm tools: 0 citations

3/4 keywords have AI Overviews
Citation share: 8.3% (1/12)
Missing from: ['crm software comparison']

50 keywords: $7.50/mo ($30/7K plan)
100 keywords: $15.00/mo ($30/7K plan)
500 keywords: $75.00/mo ($100/28K plan)

相关教程

  • 如何使用搜索 API 构建代理机构 AEO 仪表板
  • 如何使用 API 隔夜批量检查 SEO 排名
  • 如何用轻量级替代方案取代 Semrush API 信用流失

常见问题

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

已安装 Python 3.9+. 请求已安装库. 来自 scavio.dev 的 Scavio API 密钥. 您期望人工智能概述的关键字列表. Scavio API密钥注册即送50个免费积分。

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

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

相关资源

Best Of

2026年AEO代理机构最佳冷邮件工具

Read more
Use Case

本地企业的 AEO 内容跟踪

Read more
Best Of

2026 年最佳 AI 生产力应用程序

Read more
Solution

AEO监控技术栈(DIY)

Read more
Glossary

AI引擎优化(AEO)

Read more
Glossary

搜索 API 供应商格局(2026)

Read more

开始构建

无需昂贵的排名跟踪工具即可监控哪些网站在 Google AI 概述中被引用。使用搜索 API 的 Python 脚本,每次查询 0.005 美元。

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

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

产品

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

开发者

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

替代方案

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

工具

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

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策