SEO Metrics API Orchestrator
Fetches a requested metric set (domain authority, backlinks, keyword volume, difficulty) across whichever vendors are c…
Updated
Use this skill
$ npx skills add seoskills.sh/seo-metrics-api-orchestratorAbout this skill
SEO Metrics API Orchestrator is a Tooling Integrations skill for AI agents, published in the seoskills.sh catalog. Reach for it when your work involves ahrefs, Semrush, Screaming Frog, Moz, and Search Console workflows. Install it with one command and it runs inside your own agent, so the work happens in your workflow, not a separate SEO tool.
SKILL.md
SEO Metrics API Orchestrator
AGENT ROLE: Autonomous multi-vendor metrics agent. Route each requested (metric, target) to the vendors that provide it and are configured, coalesce calls that share an endpoint, enforce each vendor's credit budget, and return a unified source-attributed table plus a spend report. Emit the JSON in references/output.schema.json. Never fabricate a value a vendor did not return.
OBJECTIVE
Get the same metric set from every configured vendor under a hard credit budget, attribute each value to its source, compute a cross-vendor consensus, and stay useful (partial + reasons) when a vendor is missing or spent — instead of failing the whole request.
INPUTS
domains(OPTIONAL): comma-separated domains (targets fordomain_authority,backlinks).keywords(OPTIONAL): comma-separated keywords (targets forvolume,difficulty).metrics(OPTIONAL, default all four): subset ofdomain_authority,backlinks,volume,difficulty.budgets(OPTIONAL): JSON object of vendor→credit budget, e.g.{"ahrefs":100,"semrush":50}(default 100 each).max-requests(OPTIONAL, default 1000): global network-call guard.
AUTHENTICATION (multi-vendor; at least one required)
Configure any of, and only those are used:
- Ahrefs:
AHREFS_API_TOKEN(Bearer). - Semrush:
SEMRUSH_API_KEY(optionalSEMRUSH_DB, defaultus). - Moz Links API v2:
MOZ_ACCESS_ID+MOZ_SECRET_KEY(HTTP Basic). - DataForSEO:
DATAFORSEO_LOGIN+DATAFORSEO_PASSWORD(HTTP Basic). IF none is configured THEN STOPerror.code="AUTH_NO_VENDOR_CONFIGURED". A vendor whose creds are absent is simply skipped with reasonunconfigured(never an error).
EXPECTED TOOL CALLS
- Run
scripts/metrics_orchestrator.py --domains example.com --keywords "seo tools" --metrics domain_authority,backlinks,volume,difficulty. - One network call per unique (vendor endpoint, target); Moz
url_metricsand Semrushphrase_thiseach return multiple metrics and are coalesced to a single call per target.
PROCEDURE (deterministic)
STEP 1 — DETECT configured vendors; STOP if none. Validate requested metrics against the route table.
STEP 2 — BUILD the request set: for each metric, for each target of its type, list the supporting vendors in preference order.
STEP 3 — For each (vendor, endpoint-group, target): IF the group was already fetched for this target THEN reuse it (dedup/coalesce — no extra credit). ELSE check the vendor budget: IF spent + cost > budget THEN mark the vendor exhausted and skip (reason budget_exhausted); ELSE call, charging cost credits, with 2^attempt backoff.
STEP 4 — EXTRACT the metric from the group result. Collect one attributed value per vendor that answered.
STEP 5 — For each (metric, target) row: IF ≥1 value THEN status="ok" with sources, per-vendor values, and a consensus mean. ELSE status="unavailable" with the per-vendor reasons.
STEP 6 — EMIT the rows, a per-vendor spend_report (requests, credits spent, remaining, status), the count of coalesced calls saved, and degraded when any vendor was skipped/exhausted/rate-limited or any row is unavailable.
RATE LIMITS & ERROR HANDLING
- Any vendor
429→ backoff2^attempt(max 5); persistent → vendor statusrate_limited, its pending rows degrade (not the whole run). 5xxretry ≤3; DataForSEO402→ reasonpayment_required. Calls are paced (sleep 0.2); effective concurrency 1.- Budgets are enforced BEFORE each network call so a run can never overspend a vendor's credits.
MISSING / INSUFFICIENT DATA
- A vendor that returns no value for a target yields reason
no_value; the value is never invented. - Semrush "NOTHING FOUND" and empty vendor responses degrade that source only.
- A metric with no supplied targets of its type is skipped with a note (e.g.
volumewith no--keywords). - If every vendor for a row is unconfigured/exhausted/failing, the row is
unavailablewith reasons — the run still returnsstatus="partial".
OUTPUT
One JSON object per references/output.schema.json. No prose.
FILES
scripts/metrics_orchestrator.py— vendor routing, call coalescing, credit budgeting, unified table + spend report.references/output.schema.json— output contract.
Not using the CLI? Copy the SKILL.md and paste it straight into ChatGPT, Claude, or any agent.
Embed a badge
Install into your agent
More in Tooling Integrations
firecrawl-agent
Autonomous multi-page extraction into structured JSON. Use when the user wants website data matching a schema — pricing tiers, product listings — beyond a single-page scrape.
firecrawl-seo-audit
Audit a website's SEO with Firecrawl. Use when the user asks for an SEO audit, metadata and heading review, sitemap/site-structure analysis, keyword opportunities, competitor SERP comparison, or prioritized search optimization recommendations.
seo-google
Google SEO APIs: Search Console (Search Analytics, URL Inspection, Sitemaps), PageSpeed Insights v5, CrUX field data with 25-week history, Indexing API v3, and GA4 organic traffic. Provides real Google field data for Core Web Vitals, indexation status, search performance, and organic traffic trends. Use when user says "search console", "GSC", "PageSpeed", "CrUX", "field data", "indexing API", "GA4 organic", "URL inspection", or "real CWV data".
seo-project-setup
Populate a project's shared OpenSEO context — site scope, goals, positioning, competitors, key pages, and preferences — plus MCP checks and Search Console intake.
seo-flow
FLOW framework integration: evidence-led SEO using the Find → Leverage → Optimize → Win loop. Surfaces stage-specific AI prompts from the FLOW knowledge base (41 prompts, CC BY 4.0). Use when user says "FLOW", "FLOW framework", "seo flow", "evidence-led SEO", "find leverage optimize win", or wants stage-specific SEO prompts.
Screaming Frog Warehouse Loader
Normalizes Screaming Frog SEO Spider CSV exports (internal_all, response_codes, directives, all_inlinks) into one stabl…