360 Secure SkillHub
360 安全技能中心

serp-volatility-tracker

以关键词为单位抓取 SERP 快照,记录有序自然结果 URL 与所跟踪 SERP feature 的有无,与上一轮快照对比:用 RBO 计算排名变动、按 feature 增删比例计算 feature 变动,加权得到波动分并分级为 stable/shifting/volatile,输出快照与按波动降序的 changes 列表;首次运行记为 baseline,依赖 SerpApi 与环境变量 SER…

未知作者
热度 0.00
最近更新 2026-10-18 21:43:55
分类:营销依赖:代码执行 / 第三方 API / 读写文件应用场景:市场分析 / 研究 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add seoskills.sh/serp-volatility-tracker
Metadata
name
serp-volatility-tracker
description
Snapshots each keyword's SERP features and top rankings on a schedule and computes a volatility score from period-over-period churn, flagging keywords whose SERP composition is destabilizing before rankings move. Use when the user wants SERP monitoring, ranking stability analysis, or early warning of algorithm/feature shifts on target terms.
metadata
{"title":"SERP Feature Volatility Tracker","category":"keyword-research"}

SERP Feature Volatility Tracker

AGENT ROLE: Autonomous SERP-monitoring agent. Take a current SERP snapshot per keyword, diff it against the prior snapshot, compute volatility, and emit the JSON in references/output.schema.json. This skill is stateful across runs via the previous snapshot input.

OBJECTIVE

Quantify how much each keyword's SERP is changing over time — both organic ranking churn and the presence/absence of SERP features — to surface destabilizing terms early.

INPUTS

  • keywords (REQUIRED string[]).
  • previous (OPTIONAL): the prior run's snapshots array; absent on first run (establishes a baseline).
  • top_n (OPTIONAL, default 10).
  • track_features (OPTIONAL): subset of ["featured_snippet","people_also_ask","ai_overview","local_pack","video","image_pack","shopping","top_stories"]. Default all.
  • location/hl (OPTIONAL): default "United States"/"en".

AUTHENTICATION (SERP API)

  1. REQUIRE env SERP_API_KEY. IF unset THEN STOP error.code="AUTH_MISSING_API_KEY".
  2. Endpoint (SerpApi shape): GET https://serpapi.com/search.json?engine=google&q={kw}&num={top_n}&api_key={key}.

EXPECTED TOOL CALLS

  • Run scripts/volatility.py --keywords keywords.json [--previous previous.json].
  • One SERP fetch per keyword; capture ordered organic URLs + which tracked features are present.

PROCEDURE (deterministic, per keyword)

STEP 1 — SNAPSHOT: fetch SERP; record {ranking: [urls], features: {feature: bool}, captured_at}. STEP 2 — IF no previous snapshot for this keyword THEN status="baseline", volatility null, and return the snapshot for next run. STEP 3 — RANKING CHURN: compute a rank-biased overlap between prior and current top-N (weight higher positions more). rank_volatility = 1 − RBO in [0,1]. STEP 4 — FEATURE CHURN: feature_changes = set of features that appeared or disappeared; feature_volatility = |changes| / |tracked|. STEP 5 — volatility_score = round(0.7*rank_volatility + 0.3*feature_volatility, 3); classify stable (<0.2) | shifting (0.2–0.5) | volatile (>0.5). STEP 6 — EMIT current snapshots (for persistence) + a changes list sorted by volatility desc; note new/lost features explicitly.

RATE LIMITS & ERROR HANDLING

  • SERP API bills per search. 429/quota → backoff 2^attempt (max 5) then STOP error.code="RATE_LIMITED" with partial.
  • 5xx/timeout retry ≤3 then mark keyword status="serp_error"; carry forward its previous snapshot unchanged so history is not lost.
  • Concurrency ≤ 3.

MISSING / INSUFFICIENT DATA

  • First run for any keyword is always baseline (no volatility) — this is expected, not an error.
  • IF the SERP returns fewer than top_n results THEN compare on the intersection length; note partial_serp=true.

OUTPUT

One JSON object per references/output.schema.json. The snapshots array MUST be persisted and passed as previous next run.

FILES

  • scripts/volatility.py — SERP snapshot, RBO ranking churn, feature-diff volatility.
  • references/output.schema.json — output contract.