ScavioScavio
产品定价文档
登录开始使用
  1. 首页
  2. 教程
  3. 如何通过 API 监控 AI 概述引用
教程

如何通过 API 监控 AI 概述引用

跟踪哪些页面在 Google AI 概述中被引用。使用 Scavio API 进行 AEO/GEO 监控的 Python 和 JavaScript 示例。

获取免费API密钥API文档

通过启用 include_ai_overview 查询 Google SERP 来监控 AI 概述引用,每查询 0.005 美元。跟踪您的哪些页面被引用、哪些竞争对手的页面出现以及引用模式何时发生变化。

前置条件

  • Scavio API 密钥
  • 要监控的目标关键字列表
  • Python 3.8+ 或 Node.js 18+

操作指南

步骤 1: 检查 AI 概述的关键字

使用 include_ai_overview 进行搜索以获取引文数据。

Python
import requests, os

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

resp = requests.post('https://api.scavio.dev/api/v1/search',
    headers=H,
    json={'query': 'best project management tools 2026',
          'country_code': 'us', 'include_ai_overview': True})

data = resp.json()
aio = data.get('ai_overview', {})
if aio:
    print('AI Overview present')
    for source in aio.get('sources', []):
        print(f"  Cited: {source.get('domain', 'unknown')} - {source.get('title', '')}")
else:
    print('No AI Overview for this query')

步骤 2: 跟踪您的域名引用

过滤引用以找到您自己的域。

Python
my_domain = 'mysite.com'
my_citations = [s for s in aio.get('sources', [])
    if my_domain in s.get('domain', '')]
competitor_citations = [s for s in aio.get('sources', [])
    if my_domain not in s.get('domain', '')]

print(f'My citations: {len(my_citations)}')
print(f'Competitor citations: {len(competitor_citations)}')

Python 示例

Python
import requests, os, json
from datetime import date

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

def monitor_aio(keywords, my_domain):
    report = {'date': date.today().isoformat(), 'keywords': []}
    for kw in keywords:
        data = requests.post('https://api.scavio.dev/api/v1/search',
            headers=H,
            json={'query': kw, 'country_code': 'us',
                  'include_ai_overview': True}).json()
        aio = data.get('ai_overview') or {}
        sources = aio.get('sources', [])
        report['keywords'].append({
            'keyword': kw,
            'has_aio': bool(aio),
            'my_citations': [s for s in sources if my_domain in s.get('domain', '')],
            'competitor_citations': [s['domain'] for s in sources if my_domain not in s.get('domain', '')],
        })
    cited = sum(1 for k in report['keywords'] if k['my_citations'])
    print(f"Cited in {cited}/{len(keywords)} AI Overviews")
    return report

report = monitor_aio(['best crm 2026', 'crm comparison'], 'mysite.com')

JavaScript 示例

JavaScript
const H = {'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json'};
async function monitorAIO(keywords, myDomain) {
  const report = [];
  for (const kw of keywords) {
    const r = await fetch('https://api.scavio.dev/api/v1/search', {
      method: 'POST', headers: H,
      body: JSON.stringify({query: kw, country_code: 'us', include_ai_overview: true})
    }).then(r => r.json());
    const aio = r.ai_overview || {};
    const sources = aio.sources || [];
    report.push({
      keyword: kw, hasAIO: !!r.ai_overview,
      myCitations: sources.filter(s => (s.domain || '').includes(myDomain)),
      competitors: sources.filter(s => !(s.domain || '').includes(myDomain)).map(s => s.domain),
    });
  }
  const cited = report.filter(r => r.myCitations.length > 0).length;
  console.log(`Cited in ${cited}/${keywords.length} AI Overviews`);
  return report;
}
monitorAIO(['best crm 2026'], 'mysite.com');

预期输出

JSON
Daily AI Overview monitoring report showing which keywords trigger AIOs and which domains (yours and competitors) get cited.

相关教程

  • 如何使用 API 构建基于 SERP 的内容简介

常见问题

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

Scavio API 密钥. 要监控的目标关键字列表. Python 3.8+ 或 Node.js 18+. Scavio API密钥注册即送50个免费积分。

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

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

相关资源

Best Of

2026年高性价比AEO追踪API推荐

Read more
Best Of

2026年最佳 AEO 仪表盘构建 API

Read more
Use Case

本地企业的 AEO 内容跟踪

Read more
Comparison

Google Places API vs SERP Local Pack API

Read more
Solution

Sonar API

Read more
Solution

从 Brave Search API 迁移到 Scavio 获得更好覆盖

Read more

开始构建

跟踪哪些页面在 Google AI 概述中被引用。使用 Scavio API 进行 AEO/GEO 监控的 Python 和 JavaScript 示例。

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

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

产品

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

开发者

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

替代方案

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

工具

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

© 2026 Scavio. 保留所有权利。

Featured on TAAFT
服务条款隐私政策