optbrew 0.0.0-stage → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +6 -0
- package/.claude-plugin/plugin.json +6 -0
- package/.codex-plugin/plugin.json +13 -0
- package/CHANGELOG.md +50 -0
- package/LICENSE +21 -0
- package/README.ko.md +149 -0
- package/README.md +148 -2
- package/THIRD_PARTY_NOTICES.md +10 -0
- package/bin/optbrew.mjs +4 -0
- package/docs/platforms.md +107 -0
- package/docs/release.md +14 -0
- package/lib/cli.mjs +116 -0
- package/lib/doctor.mjs +45 -0
- package/lib/install.mjs +158 -0
- package/lib/paths.mjs +30 -0
- package/lib/records.mjs +44 -0
- package/lib/reinstall.mjs +92 -0
- package/lib/transaction.mjs +205 -0
- package/lib/update.mjs +189 -0
- package/package.json +39 -4
- package/plugin.json +13 -0
- package/skills/optbrew/LICENSE +21 -0
- package/skills/optbrew/SKILL.md +17 -0
- package/skills/optbrew/THIRD_PARTY_NOTICES.md +10 -0
- package/skills/optbrew/agents/openai.yaml +4 -0
- package/skills/optbrew/bundle-manifest.json +687 -0
- package/skills/optbrew/licenses/firecrawl-seo-audit.txt +15 -0
- package/skills/optbrew/licenses/magnus-seo.txt +21 -0
- package/skills/optbrew/licenses/marketing-search.txt +21 -0
- package/skills/optbrew/licenses/mblode-seo.txt +21 -0
- package/skills/optbrew/licenses/naver-searchadvisor.txt +29 -0
- package/skills/optbrew/licenses/seranking-seo.txt +21 -0
- package/skills/optbrew/modules/firecrawl-seo-audit/GUIDE.md +64 -0
- package/skills/optbrew/modules/magnus-seo/GUIDE.md +79 -0
- package/skills/optbrew/modules/magnus-seo/README.md +45 -0
- package/skills/optbrew/modules/magnus-seo/assets/audit-report-template.md +76 -0
- package/skills/optbrew/modules/magnus-seo/references/aeo-methodology.md +105 -0
- package/skills/optbrew/modules/magnus-seo/references/agent-readable-content.md +28 -0
- package/skills/optbrew/modules/magnus-seo/references/content-and-entity-architecture.md +100 -0
- package/skills/optbrew/modules/magnus-seo/references/content-strategy-seo.md +142 -0
- package/skills/optbrew/modules/magnus-seo/references/discovery-and-freshness.md +47 -0
- package/skills/optbrew/modules/magnus-seo/references/evidence-boundaries.md +75 -0
- package/skills/optbrew/modules/magnus-seo/references/ghost-metadata.md +204 -0
- package/skills/optbrew/modules/magnus-seo/references/implementation-playbook.md +114 -0
- package/skills/optbrew/modules/magnus-seo/references/measurement-and-experimentation.md +47 -0
- package/skills/optbrew/modules/magnus-seo/references/onpage-seo.md +154 -0
- package/skills/optbrew/modules/magnus-seo/references/platform-guidance.md +30 -0
- package/skills/optbrew/modules/magnus-seo/references/schema-markup.md +244 -0
- package/skills/optbrew/modules/magnus-seo/references/source-index.md +36 -0
- package/skills/optbrew/modules/magnus-seo/references/structured-data.md +56 -0
- package/skills/optbrew/modules/magnus-seo/references/technical-seo.md +99 -0
- package/skills/optbrew/modules/magnus-seo/scripts/aeo_audit.py +158 -0
- package/skills/optbrew/modules/magnus-seo/scripts/build_prompt_matrix.py +52 -0
- package/skills/optbrew/modules/magnus-seo/templates/aeo-implementation-plan.md +53 -0
- package/skills/optbrew/modules/magnus-seo/templates/citation-observation-log.md +16 -0
- package/skills/optbrew/modules/magnus-seo/templates/llms.txt.template +15 -0
- package/skills/optbrew/modules/magnus-seo/templates/question-cluster.md +27 -0
- package/skills/optbrew/modules/magnus-seo/templates/robots-ai-crawlers.txt +23 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/GUIDE.md +483 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/agent-readiness.md +57 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/citations-vs-recommendations.md +85 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/content-patterns.md +287 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/content-types.md +71 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/format-volatility.md +98 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/okf.md +104 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/skills/optbrew/modules/marketing-search/skills/ai-seo/references/youtube-ai-citations.md +60 -0
- package/skills/optbrew/modules/marketing-search/skills/analytics/GUIDE.md +303 -0
- package/skills/optbrew/modules/marketing-search/skills/analytics/references/event-library.md +260 -0
- package/skills/optbrew/modules/marketing-search/skills/analytics/references/ga4-implementation.md +300 -0
- package/skills/optbrew/modules/marketing-search/skills/analytics/references/gtm-implementation.md +390 -0
- package/skills/optbrew/modules/marketing-search/skills/content-strategy/GUIDE.md +432 -0
- package/skills/optbrew/modules/marketing-search/skills/content-strategy/references/content-distribution.md +83 -0
- package/skills/optbrew/modules/marketing-search/skills/content-strategy/references/headless-cms.md +194 -0
- package/skills/optbrew/modules/marketing-search/skills/programmatic-seo/GUIDE.md +231 -0
- package/skills/optbrew/modules/marketing-search/skills/programmatic-seo/references/playbooks.md +308 -0
- package/skills/optbrew/modules/marketing-search/skills/schema/GUIDE.md +172 -0
- package/skills/optbrew/modules/marketing-search/skills/schema/references/schema-examples.md +398 -0
- package/skills/optbrew/modules/marketing-search/skills/seo-audit/GUIDE.md +492 -0
- package/skills/optbrew/modules/marketing-search/skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/skills/optbrew/modules/marketing-search/skills/seo-audit/references/international-seo.md +230 -0
- package/skills/optbrew/modules/marketing-search/skills/site-architecture/GUIDE.md +350 -0
- package/skills/optbrew/modules/marketing-search/skills/site-architecture/references/mermaid-templates.md +216 -0
- package/skills/optbrew/modules/marketing-search/skills/site-architecture/references/navigation-patterns.md +305 -0
- package/skills/optbrew/modules/marketing-search/skills/site-architecture/references/site-type-templates.md +293 -0
- package/skills/optbrew/modules/mblode-seo/GUIDE.md +74 -0
- package/skills/optbrew/modules/mblode-seo/references/answer-engines.md +58 -0
- package/skills/optbrew/modules/mblode-seo/references/audit.md +78 -0
- package/skills/optbrew/modules/mblode-seo/references/brief-template.md +47 -0
- package/skills/optbrew/modules/mblode-seo/references/monitoring.md +56 -0
- package/skills/optbrew/modules/mblode-seo/references/nextjs-implementation.md +65 -0
- package/skills/optbrew/modules/mblode-seo/references/research-protocol.md +37 -0
- package/skills/optbrew/modules/mblode-seo/references/sources.md +47 -0
- package/skills/optbrew/modules/mblode-seo/references/validation-evidence.md +21 -0
- package/skills/optbrew/modules/naver-searchadvisor/GUIDE.md +75 -0
- package/skills/optbrew/modules/naver-searchadvisor/NOTICE.md +59 -0
- package/skills/optbrew/modules/naver-searchadvisor/references/INDEX.md +97 -0
- package/skills/optbrew/modules/naver-searchadvisor/scripts/audit.mjs +742 -0
- package/skills/optbrew/modules/naver-searchadvisor/scripts/robots.mjs +77 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-ai-search-share-of-voice/GUIDE.md +94 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-api/GUIDE.md +186 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-api/references/api-surface-map.md +207 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-api/references/auth-and-keys.md +182 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-api/references/integration-patterns.md +283 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-api/references/rate-limits-and-credits.md +235 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-competitor-gap-analysis/GUIDE.md +117 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-content-audit/GUIDE.md +155 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-content-audit/references/cite.md +84 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-content-audit/references/core-eeat.md +147 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-content-audit/templates/verdict.md +63 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-firecrawl/GUIDE.md +141 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-firecrawl/references/preflight.md +73 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-geo/GUIDE.md +159 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/GUIDE.md +393 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/assets/templates/cwv-audit-report.md +48 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/assets/templates/gsc-performance-report.md +44 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/assets/templates/indexation-status-report.md +43 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/auth-setup.md +160 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/cross-skill-integration.md +187 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/ga4-data-api.md +184 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/indexing-api.md +109 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/keyword-planner-api.md +66 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/nlp-api.md +55 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/pagespeed-crux-api.md +204 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/rate-limits-quotas.md +75 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/search-console-api.md +156 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/supplementary-apis.md +99 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-google/references/youtube-api.md +49 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-keyword-niche/GUIDE.md +174 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-page/GUIDE.md +174 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-plan/GUIDE.md +220 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/GUIDE.md +135 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/references/google-rich-results.md +89 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/templates/article.json +23 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/templates/breadcrumb-list.json +18 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/templates/faq-page.json +22 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/templates/local-business.json +32 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-schema/templates/product.json +25 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-sitemap/GUIDE.md +128 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-technical-audit/GUIDE.md +235 -0
- package/skills/optbrew/modules/seranking-seo/skills/seo-technical-audit/references/severity-mapping.md +133 -0
- package/skills/optbrew/references/ai-crawlers.json +21 -0
- package/skills/optbrew/references/ai-crawlers.md +24 -0
- package/skills/optbrew/references/api.md +45 -0
- package/skills/optbrew/references/check-registry.json +28 -0
- package/skills/optbrew/references/evidence.md +9 -0
- package/skills/optbrew/references/intake.md +9 -0
- package/skills/optbrew/references/measurement.md +29 -0
- package/skills/optbrew/references/policies.md +7 -0
- package/skills/optbrew/references/profiles.json +13 -0
- package/skills/optbrew/references/remediations.json +12 -0
- package/skills/optbrew/references/report.md +29 -0
- package/skills/optbrew/references/routing.md +15 -0
- package/skills/optbrew/references/schemas/contract.schema.json +51 -0
- package/skills/optbrew/references/scoring.md +62 -0
- package/skills/optbrew/scripts/adapters/anthropic.mjs +116 -0
- package/skills/optbrew/scripts/adapters/imports.mjs +81 -0
- package/skills/optbrew/scripts/audit.mjs +124 -0
- package/skills/optbrew/scripts/cli.mjs +41 -0
- package/skills/optbrew/scripts/core/bootstrap.mjs +31 -0
- package/skills/optbrew/scripts/core/bundle.mjs +73 -0
- package/skills/optbrew/scripts/core/capabilities.mjs +19 -0
- package/skills/optbrew/scripts/core/collector.mjs +250 -0
- package/skills/optbrew/scripts/core/compare.mjs +47 -0
- package/skills/optbrew/scripts/core/contracts.mjs +144 -0
- package/skills/optbrew/scripts/core/cost-ledger.mjs +95 -0
- package/skills/optbrew/scripts/core/crawlers.mjs +11 -0
- package/skills/optbrew/scripts/core/derive.mjs +168 -0
- package/skills/optbrew/scripts/core/facts.mjs +189 -0
- package/skills/optbrew/scripts/core/findings.mjs +54 -0
- package/skills/optbrew/scripts/core/html.mjs +53 -0
- package/skills/optbrew/scripts/core/metrics.mjs +97 -0
- package/skills/optbrew/scripts/core/protocol.mjs +125 -0
- package/skills/optbrew/scripts/core/report.mjs +742 -0
- package/skills/optbrew/scripts/core/scope.mjs +52 -0
- package/skills/optbrew/scripts/core/score.mjs +71 -0
- package/skills/optbrew/scripts/core/weights.mjs +139 -0
- package/skills/optbrew/source-lock.json +2686 -0
- package/source-lock.json +2686 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Parse a robots.txt file without fetching it. */
|
|
2
|
+
export function parseRobots(text) {
|
|
3
|
+
const groups = [];
|
|
4
|
+
const sitemaps = [];
|
|
5
|
+
let current = null;
|
|
6
|
+
let hasRule = false;
|
|
7
|
+
for (const raw of text.split(/\r?\n/)) {
|
|
8
|
+
const line = raw.replace(/#.*$/, '').trim();
|
|
9
|
+
const colon = line.indexOf(':');
|
|
10
|
+
if (colon < 0) continue;
|
|
11
|
+
const field = line.slice(0, colon).trim().toLowerCase();
|
|
12
|
+
const value = line.slice(colon + 1).trim();
|
|
13
|
+
if (field === 'sitemap') {
|
|
14
|
+
if (value) sitemaps.push(value);
|
|
15
|
+
} else if (field === 'user-agent') {
|
|
16
|
+
if (!value) continue;
|
|
17
|
+
if (!current || hasRule) {
|
|
18
|
+
current = { agents: [], rules: [] };
|
|
19
|
+
groups.push(current);
|
|
20
|
+
hasRule = false;
|
|
21
|
+
}
|
|
22
|
+
current.agents.push(value.toLowerCase());
|
|
23
|
+
} else if ((field === 'allow' || field === 'disallow') && current) {
|
|
24
|
+
hasRule = true;
|
|
25
|
+
// RFC 9309: an empty rule does not restrict access.
|
|
26
|
+
if (value) current.rules.push({ type: field, path: value });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return { groups, sitemaps };
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const unreserved = /^[A-Za-z0-9._~-]$/;
|
|
33
|
+
const hex = n => `%${n.toString(16).padStart(2, '0').toUpperCase()}`;
|
|
34
|
+
|
|
35
|
+
// Compare normalized octets. Keep encoded reserved octets distinct from raw delimiters.
|
|
36
|
+
function normalize(value) {
|
|
37
|
+
let result = '';
|
|
38
|
+
for (let i = 0; i < value.length;) {
|
|
39
|
+
if (value[i] === '%' && /^[0-9a-f]{2}$/i.test(value.slice(i + 1, i + 3))) {
|
|
40
|
+
const byte = parseInt(value.slice(i + 1, i + 3), 16);
|
|
41
|
+
const character = String.fromCharCode(byte);
|
|
42
|
+
result += unreserved.test(character) ? character : hex(byte);
|
|
43
|
+
i += 3;
|
|
44
|
+
} else {
|
|
45
|
+
const point = value.codePointAt(i);
|
|
46
|
+
const character = String.fromCodePoint(point);
|
|
47
|
+
result += point > 127 ? [...Buffer.from(character)].map(hex).join('') : character;
|
|
48
|
+
i += character.length;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function matchRule(rule, path) {
|
|
55
|
+
const anchored = rule.endsWith('$');
|
|
56
|
+
const body = anchored ? rule.slice(0, -1) : rule;
|
|
57
|
+
const pattern = '^' + body.split('*').map(part => normalize(part).replace(/[.*+?^${}()|[\]\\]/g, '\\$&')).join('.*') + (anchored ? '$' : '');
|
|
58
|
+
return new RegExp(pattern).test(path);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** RFC 9309: merge all groups matching the crawler product token. */
|
|
62
|
+
export function robotsVerdict(parsed, agent, path) {
|
|
63
|
+
if (normalize(path).split('?', 1)[0] === '/robots.txt') return { allowed: true, reason: 'robots.txt는 암묵적으로 허용', matched_rules: [] };
|
|
64
|
+
const userAgent = agent.toLowerCase();
|
|
65
|
+
let groups = parsed.groups.filter(group => group.agents.some(name => name !== '*' && userAgent.includes(name)));
|
|
66
|
+
if (!groups.length) groups = parsed.groups.filter(group => group.agents.includes('*'));
|
|
67
|
+
if (!groups.length) return { allowed: true, reason: '해당 로봇에 적용되는 그룹 없음', matched_rules: [] };
|
|
68
|
+
|
|
69
|
+
const normalizedPath = normalize(path);
|
|
70
|
+
const matches = groups.flatMap(group => group.rules).filter(rule => matchRule(rule.path, normalizedPath));
|
|
71
|
+
if (!matches.length) return { allowed: true, reason: '일치하는 규칙 없음', matched_rules: [] };
|
|
72
|
+
const octets = rule => normalize(rule.path.replace(/\$$/, '').replaceAll('*', '')).replace(/%[0-9A-F]{2}/g, '_').length;
|
|
73
|
+
const max = Math.max(...matches.map(octets));
|
|
74
|
+
const matched_rules = matches.filter(rule => octets(rule) === max);
|
|
75
|
+
const winner = matched_rules.find(rule => rule.type === 'allow') ?? matched_rules[0];
|
|
76
|
+
return { allowed: winner.type === 'allow', reason: `${winner.type === 'allow' ? 'Allow' : 'Disallow'}: ${winner.path}`, matched_rules };
|
|
77
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
> Example output: examples/seo-ai-search-share-of-voice-wix-com-20260427/REPORT.md (upstream-only reference; route through optbrew)
|
|
2
|
+
|
|
3
|
+
# AI Search Share of Voice
|
|
4
|
+
|
|
5
|
+
Compare AI-search visibility for a target brand against competitors across every major LLM engine, then analyse the topic clusters each brand owns and where gaps exist.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- SE Ranking MCP server connected.
|
|
10
|
+
- User provides: (a) target domain and its brand name, (b) list of competitor domains and brand names, (c) country (default: `us`), and (d) optionally, which engines to analyse (default: all supported: `ai-overview`, `chatgpt`, `perplexity`, `gemini`, `ai-mode`).
|
|
11
|
+
|
|
12
|
+
## Process
|
|
13
|
+
|
|
14
|
+
1. **Leaderboard snapshot** `DATA_getAiOverviewLeaderboard`
|
|
15
|
+
- Pull the AIO leaderboard for the target domain's category in the target country.
|
|
16
|
+
- Capture mention counts and share percentages per engine, per domain.
|
|
17
|
+
|
|
18
|
+
2. **Heatmap table**
|
|
19
|
+
- Build a table: rows = domains (target + competitors), columns = engines, cells = % share of voice.
|
|
20
|
+
- Highlight the leader per engine and the worst performer.
|
|
21
|
+
|
|
22
|
+
3. **Prompt sampling per domain** `DATA_getAiPromptsByBrand`, `DATA_getAiPromptsByTarget`
|
|
23
|
+
- For each domain (target and each competitor):
|
|
24
|
+
- Pull 10 ChatGPT prompts where the domain appears as a source (link mention).
|
|
25
|
+
- Pull 10 ChatGPT prompts where the brand is mentioned by name.
|
|
26
|
+
- Save query text and the exact sources cited so the user can validate.
|
|
27
|
+
|
|
28
|
+
4. **Topic clustering**
|
|
29
|
+
- Group prompts by theme (e.g., pricing, feature comparison, tutorials, alternatives, reviews).
|
|
30
|
+
- For each brand, note which clusters it dominates and which it is absent from.
|
|
31
|
+
|
|
32
|
+
5. **Gap and recommendation synthesis**
|
|
33
|
+
- Identify 3 to 5 topic clusters where the target underperforms competitors despite having relevant content.
|
|
34
|
+
- Recommend specific actions: new content angles, structured data additions, partnerships with frequently-cited sources, comparison pages, FAQ/How-To schema.
|
|
35
|
+
|
|
36
|
+
## Output format
|
|
37
|
+
|
|
38
|
+
Create a folder `seo-ai-search-share-of-voice-{target-slug}-{YYYYMMDD}/` with:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
seo-ai-search-share-of-voice-{target-slug}-{YYYYMMDD}/
|
|
42
|
+
├── 01-leaderboard.md # raw leaderboard per engine
|
|
43
|
+
├── 02-heatmap.md # visual heatmap table
|
|
44
|
+
├── 03-prompts-{domain}.md # one file per domain with 20 sampled prompts
|
|
45
|
+
├── 04-topic-clusters.md # cluster membership per brand
|
|
46
|
+
└── REPORT.md # executive summary
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
`REPORT.md` follows this shape:
|
|
50
|
+
|
|
51
|
+
```markdown
|
|
52
|
+
# AI Search Share of Voice: {target brand} vs competitors
|
|
53
|
+
|
|
54
|
+
## Summary
|
|
55
|
+
- Target: {target} ({share}% across all engines)
|
|
56
|
+
- Leader: {leader brand} ({share}%)
|
|
57
|
+
- Target rank: {n} of {total}
|
|
58
|
+
|
|
59
|
+
## Heatmap
|
|
60
|
+
|
|
61
|
+
| Domain | AI Overview | ChatGPT | Perplexity | Gemini | AI Mode |
|
|
62
|
+
|---|---|---|---|---|---|
|
|
63
|
+
| {target} | {%} | {%} | {%} | {%} | {%} |
|
|
64
|
+
| {comp1} | ... | ... | ... | ... | ... |
|
|
65
|
+
|
|
66
|
+
## Who owns what
|
|
67
|
+
|
|
68
|
+
### {target brand}
|
|
69
|
+
Strong in: {cluster 1}, {cluster 2}
|
|
70
|
+
Absent from: {cluster 3}, {cluster 4}
|
|
71
|
+
|
|
72
|
+
### {competitor 1 brand}
|
|
73
|
+
...
|
|
74
|
+
|
|
75
|
+
## Topic cluster ownership
|
|
76
|
+
|
|
77
|
+
| Cluster | Leader | Share | Target position | Gap |
|
|
78
|
+
|---|---|---|---|---|
|
|
79
|
+
| Pricing | {brand} | {%} | {n} | {% behind} |
|
|
80
|
+
| Alternatives | {brand} | {%} | {n} | {% behind} |
|
|
81
|
+
| Tutorials | {brand} | {%} | {n} | {% behind} |
|
|
82
|
+
|
|
83
|
+
## Top 5 actions to close gaps
|
|
84
|
+
1. {action with target cluster}
|
|
85
|
+
2. ...
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Tips
|
|
89
|
+
|
|
90
|
+
- Do not hallucinate citation counts. If the API returns zero prompts for a given domain/engine, report zero, do not estimate.
|
|
91
|
+
- For each competitor, validate the brand-name match in the prompt text. Sometimes "Wix" appears in a sentence about "wiktionary" or a person's name. Flag ambiguous matches in the raw-prompt file.
|
|
92
|
+
- `base_domain` scope is the default; do not narrow to `subdomain` unless the user asks.
|
|
93
|
+
- Respect Data API rate limit: 10 requests per second. With 5 domains and 2 prompt queries per engine per domain, pace the loop.
|
|
94
|
+
- The report is not a one-time artefact. Recommend the user re-run monthly and diff results to see ranking momentum.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
> Live with the SE Ranking MCP at `https://api.seranking.com/mcp`. Tool schemas are introspected live; this skill never relies on a frozen snapshot of the API surface.
|
|
2
|
+
|
|
3
|
+
# SE Ranking API Integration Architect
|
|
4
|
+
|
|
5
|
+
Help developers ship real integrations against the SE Ranking SEO Data API and Project API. The deliverable is either a **code recipe** (ready-to-paste cURL / Python / TypeScript / MCP-tool-call sequence) or **live wiring** of Project API state (create projects, add keywords, configure audits, set up AIRT prompts), or both. The skill knows the entire 195-tool surface, the credit and rate-limit cost of every call, and the canonical setup story for every major MCP client.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- **SE Ranking MCP connected** at `https://api.seranking.com/mcp`. Single API key authenticates both `DATA_*` and `PROJECT_*` tools through the unified gateway. If `/mcp` doesn't show `se-ranking`, the skill emits the install command and stops — see `references/auth-and-keys.md`.
|
|
10
|
+
- **(Optional) `WebFetch`** for fetching deep guides at `seranking.com/api/data/*` and `seranking.com/api/project/*` when the request needs prose beyond JSON Schema.
|
|
11
|
+
- User provides: an integration goal in plain language (e.g., "build a rank tracker for client X", "pull all backlinks for these 50 domains into BigQuery weekly", "configure an audit + AIRT prompts for a new project"). The skill interviews only when the goal is ambiguous.
|
|
12
|
+
|
|
13
|
+
## Process
|
|
14
|
+
|
|
15
|
+
1. **Preflight.**
|
|
16
|
+
- Confirm the SE Ranking MCP is reachable. If not, emit:
|
|
17
|
+
```bash
|
|
18
|
+
claude mcp add --transport http se-ranking https://api.seranking.com/mcp
|
|
19
|
+
```
|
|
20
|
+
and stop. See `references/auth-and-keys.md` for OAuth vs. `X-Api-Key` header tradeoffs and headless / CI patterns.
|
|
21
|
+
- Call `DATA_getSubscription` (0 credits). Record `units_left`, plan status, expiration — `units_left` is the figure to forecast against, and it gets printed in the cost forecast in step 5. Optionally also call `DATA_getCreditBalance` for its `{ limit, used }` view — but the two are **not** aliases: they report different remaining-credit numbers that do not reconcile (an ~8.6M gap is normal), so treat `getSubscription.units_left` as the source of truth.
|
|
22
|
+
|
|
23
|
+
2. **Clarify the goal.** Ask 1–3 questions only if the goal is ambiguous. Skip when the user already spelled it out. Useful follow-ups:
|
|
24
|
+
- "Is this a one-off run, a recurring job (daily/weekly), or a long-lived integration in your product?"
|
|
25
|
+
- "Target country / language / device — or worldwide?"
|
|
26
|
+
- "Are we operating on a project you already own in SE Ranking, or just researching domains?"
|
|
27
|
+
|
|
28
|
+
3. **Identify the API surface(s).** Map the goal to one or both of:
|
|
29
|
+
- **Data API** — research-shaped data on any domain, no prior account setup. Credit-billed. See `references/api-surface-map.md` § "Data API surfaces".
|
|
30
|
+
- **Project API** — operations on the user's own SE Ranking projects (rank tracking, audits, AIRT, backlink groups, marketing plan, sub-accounts). Subscription-limit-billed, not credit-billed. Requires Business or Enterprise plan. See `references/api-surface-map.md` § "Project API surfaces".
|
|
31
|
+
- Many real integrations span both — e.g., a rank-tracker setup uses `PROJECT_createProject` + `PROJECT_addKeywords` + `PROJECT_runPositionCheck`, then reports use `DATA_getDomainKeywords` for the same domain.
|
|
32
|
+
|
|
33
|
+
4. **Map to tools / endpoints.** For every step in the integration, name:
|
|
34
|
+
- The MCP tool: `` `DATA_getDomainKeywords` `` or `` `PROJECT_addKeywords` ``.
|
|
35
|
+
- The underlying REST endpoint + HTTP verb (e.g., `GET /v1/domain/keywords`).
|
|
36
|
+
- The credit cost (Data API) or limit consumed (Project API). Source costs from `references/rate-limits-and-credits.md` and the per-endpoint pages at `seranking.com/api/data/*` — MCP tool `description` fields carry input schemas and usage notes but **not** credit costs.
|
|
37
|
+
- If a tool needs an ID the user didn't supply (project ID, search engine ID, geo region name, language code), insert the prerequisite `*list*` or `*available*` call before it. See `references/api-surface-map.md` § "ID resolution".
|
|
38
|
+
|
|
39
|
+
5. **Forecast cost.** Sum credit cost across all Data API calls. For Project API calls, surface plan-limit impact (e.g., "this consumes 1 Site + 50 Keywords + ~500 Audit Pages from your plan"). Compare against:
|
|
40
|
+
- `units_left` from step 1 — if insufficient, surface and stop with the upgrade link.
|
|
41
|
+
- Plan limits if Project API tools are involved — `PROJECT_getUserProfile` returns current usage; flag if the integration would push a limit over.
|
|
42
|
+
|
|
43
|
+
6. **Pick execution mode.** Confirm with the user explicitly:
|
|
44
|
+
- **Code mode** — emit ready-to-paste cURL, Python (`requests`), TypeScript (`fetch`), and MCP-tool-call variants. The developer runs them. Default for read-only research, recurring jobs the user wants to own, and anything they want to deploy outside their Claude session.
|
|
45
|
+
- **Live mode** — execute the integration step by step via MCP. Confirm every mutating call. Default for one-off Project API setup (new project, add keywords, configure audit, set up AIRT prompt group, etc.) where the user wants the state to exist by the end of this conversation.
|
|
46
|
+
- **Hybrid** — wire up the one-time setup live, emit code for the recurring workload (e.g., "I created the project and added the 50 keywords for you; here's the daily-run Python script to pull positions and write them to BigQuery").
|
|
47
|
+
|
|
48
|
+
7. **Execute or emit.**
|
|
49
|
+
- **Code mode** — write `code/curl.sh`, `code/python.py`, `code/typescript.ts`, `code/mcp-calls.md`. Each file is a complete runnable example, not a fragment. Include error handling for `429` (rate limit) and `403` (insufficient credits). See `references/integration-patterns.md` for canonical pattern snippets.
|
|
50
|
+
- **Live mode** — for each *mutating* call (`PROJECT_create*`, `PROJECT_add*`, `PROJECT_delete*`, `PROJECT_update*`, `DATA_createStandardAudit`, `DATA_createAdvancedAudit`, etc.), print a single-line confirmation:
|
|
51
|
+
```
|
|
52
|
+
About to call PROJECT_createProject(domain="acme.com", name="ACME Inc — Rank Tracker", country="us").
|
|
53
|
+
Consumes: 1 "Site" from your subscription. Proceed? [y/N]
|
|
54
|
+
```
|
|
55
|
+
Wait for explicit `y` / `yes`. On anything else, fall back to code mode and emit the equivalent code instead of executing. Read-only calls (`DATA_get*`, `DATA_list*`, `PROJECT_get*`, `PROJECT_list*`) run without confirmation. Log every call to `evidence/03-execution-log.md` with timestamp, args, response status.
|
|
56
|
+
|
|
57
|
+
8. **Synthesise `RECIPE.md`.** Always written, regardless of mode. The deliverable a developer reads to understand what was built or how to build it. See output format below.
|
|
58
|
+
|
|
59
|
+
## Output format
|
|
60
|
+
|
|
61
|
+
Folder `seo-api-{slug}-{YYYYMMDD}/` where `{slug}` is a kebab-case summary of the goal (e.g., `acme-rank-tracker`, `bulk-backlinks-bigquery`).
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
seo-api-{slug}-{YYYYMMDD}/
|
|
65
|
+
├── RECIPE.md (primary deliverable — what was built or how to build it)
|
|
66
|
+
├── code/
|
|
67
|
+
│ ├── curl.sh (cURL one-liners + multi-step bash)
|
|
68
|
+
│ ├── python.py (idiomatic requests-based script)
|
|
69
|
+
│ ├── typescript.ts (fetch + zod-validated responses)
|
|
70
|
+
│ └── mcp-calls.md (MCP-tool-call sequence — same workflow, agent-native)
|
|
71
|
+
└── evidence/
|
|
72
|
+
├── 01-preflight.md (credit balance, subscription status, MCP connectivity check)
|
|
73
|
+
├── 02-cost-forecast.md (per-call cost breakdown, plan-limit deltas, total)
|
|
74
|
+
├── 03-ids-resolved.md (Project API / search-engine IDs, geo codes resolved upfront — omit if none needed)
|
|
75
|
+
└── 04-execution-log.md (every MCP call executed, with args + status — omit in pure code mode where nothing ran)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Top-level: `RECIPE.md` + `code/`. The `evidence/` folder preserves the reasoning trail; auditors lean on `02-cost-forecast.md` and the execution log. `03` and `04` are conditional — a run with no ID lookups and no executed calls (pure code-mode advice) ships just `01` + `02`.
|
|
79
|
+
|
|
80
|
+
`RECIPE.md` follows this shape:
|
|
81
|
+
|
|
82
|
+
```markdown
|
|
83
|
+
# {Integration Title}: {target}
|
|
84
|
+
|
|
85
|
+
> Run dated {YYYY-MM-DD} · Mode: {code | live | hybrid} · Total cost: {n} credits + {plan-limits consumed}
|
|
86
|
+
|
|
87
|
+
## Goal
|
|
88
|
+
|
|
89
|
+
{1–2 sentences. What was asked, what's being shipped.}
|
|
90
|
+
|
|
91
|
+
## API surface map
|
|
92
|
+
|
|
93
|
+
| Step | MCP tool | REST endpoint | Verb | Cost |
|
|
94
|
+
|------|----------|---------------|------|------|
|
|
95
|
+
| 1 | `DATA_getCreditBalance` | `/v1/account/subscription` | GET | 0 credits |
|
|
96
|
+
| 2 | `PROJECT_listProjects` | `/v1/account/projects` | GET | 0 (plan limit: read) |
|
|
97
|
+
| 3 | `PROJECT_createProject` | `/v1/projects` | POST | 1 Site from plan |
|
|
98
|
+
| ... | ... | ... | ... | ... |
|
|
99
|
+
|
|
100
|
+
## Auth & setup
|
|
101
|
+
|
|
102
|
+
{cURL header / Python session / TypeScript fetch wrapper showing exactly how to authenticate. Reference `references/auth-and-keys.md` for OAuth vs. header tradeoffs.}
|
|
103
|
+
|
|
104
|
+
## Cost forecast
|
|
105
|
+
|
|
106
|
+
- Credit cost (Data API): {n} credits ({explanation per call})
|
|
107
|
+
- Plan-limit consumption (Project API): {Sites: n, Keywords: n, Audit Pages: n, AIRT Prompts: n}
|
|
108
|
+
- Your balance at run time: {units_left} credits, {plan limits available}
|
|
109
|
+
- {OK / WARNING: this integration would push X over plan limit}
|
|
110
|
+
|
|
111
|
+
## Recipe
|
|
112
|
+
|
|
113
|
+
### Option A — cURL
|
|
114
|
+
|
|
115
|
+
(complete bash script in `code/curl.sh`)
|
|
116
|
+
|
|
117
|
+
### Option B — Python
|
|
118
|
+
|
|
119
|
+
(complete script in `code/python.py`)
|
|
120
|
+
|
|
121
|
+
### Option C — TypeScript
|
|
122
|
+
|
|
123
|
+
(complete script in `code/typescript.ts`)
|
|
124
|
+
|
|
125
|
+
### Option D — MCP tool calls
|
|
126
|
+
|
|
127
|
+
(agent-native sequence in `code/mcp-calls.md` — for when this integration lives inside another Claude/Cursor/Codex workflow)
|
|
128
|
+
|
|
129
|
+
## Rate limit & retry strategy
|
|
130
|
+
|
|
131
|
+
- Data API: 10 RPS, Project API: 5 RPS. Pace sequentially for batched workflows; small-batch parallelism (≤3 concurrent) is safe.
|
|
132
|
+
- 429 handling: exponential backoff with jitter (1s → 2s → 4s → 8s, ±20% jitter). 5xx: same. Treat 403 "Insufficient funds" as terminal — no retry.
|
|
133
|
+
|
|
134
|
+
## What's running now (live mode only)
|
|
135
|
+
|
|
136
|
+
{Bullet list of MCP calls that were executed, with their outcomes. Pulled from `evidence/04-execution-log.md`.}
|
|
137
|
+
|
|
138
|
+
## What you still need to do
|
|
139
|
+
|
|
140
|
+
{Concrete next steps for the developer. E.g., "Run `python.py` daily via cron at 06:00 UTC", "Open the project at https://online.seranking.com/...", "Add a webhook for rank changes via Settings → Notifications".}
|
|
141
|
+
|
|
142
|
+
## Linked docs
|
|
143
|
+
|
|
144
|
+
- {Direct links to the relevant pages on `seranking.com/api/data/*` and `seranking.com/api/project/*`.}
|
|
145
|
+
|
|
146
|
+
## When to escalate to another skill
|
|
147
|
+
|
|
148
|
+
- `seo-content-brief` — once your integration is pulling keyword data, this skill turns it into editor briefs.
|
|
149
|
+
- `seo-technical-audit` — if the integration involves website audits, this skill interprets the audit output.
|
|
150
|
+
- `seo-drift baseline` — if the integration's job is to track a domain over time, snapshot it first.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Tips
|
|
154
|
+
|
|
155
|
+
- **Single API key authenticates everything.** `API_TOKEN` (or `X-Api-Key` header for headless) covers both `DATA_*` and `PROJECT_*`. The legacy split into separate Data and Project keys is gone — passing both still works as headers for backwards compatibility, but you can use just `X-Api-Key` now. See `references/auth-and-keys.md`.
|
|
156
|
+
- **Rate limits are per-API-key, not per-IP.** All threads / workers / servers sharing one key contribute to the same 10-RPS (Data) or 5-RPS (Project) budget. For production fan-outs, mint multiple keys via the API Dashboard.
|
|
157
|
+
- **Failed requests are free.** 4xx and 5xx never consume credits. Don't over-engineer cost protection for normal error retries.
|
|
158
|
+
- **Project API limits are not credits.** They consume your subscription's "Sites", "Keywords", "Audit Pages", "AIRT Prompts" quotas. Surface plan-limit impact upfront for any mutating call — these limits are stickier than credits because the user has to upgrade their plan to lift them, not just buy a credit pack.
|
|
159
|
+
- **Confirm before mutating.** `PROJECT_create*`, `PROJECT_add*`, `PROJECT_delete*`, `PROJECT_update*`, `DATA_create*Audit`, `DATA_deleteAudit` all permanently modify account state. Always print a one-line summary (tool, args, what gets consumed) and wait for `y`/`yes` before calling.
|
|
160
|
+
- **Use the right ID resolution tool.** Most "I want to operate on project X / keyword Y" requests need an ID lookup first. See `references/api-surface-map.md` § "ID resolution" for the full table. Common cases:
|
|
161
|
+
- Project IDs → `PROJECT_listProjects` (or `PROJECT_listOwnedProjects` / `PROJECT_listSharedProjects` for sub-account setups).
|
|
162
|
+
- Search engine for rank tracking → pass `country_code` directly to `PROJECT_addSearchEngine` (ISO 3166-1 alpha-2). Only fall back to `PROJECT_getAvailableSearchEngines` for regional engines (Catalonia, Turkish-Cypriot Cyprus).
|
|
163
|
+
- SERP locations → `DATA_getSerpLocations`.
|
|
164
|
+
- Languages → `PROJECT_getGoogleLanguages`.
|
|
165
|
+
- Regions for local rank tracking → `PROJECT_getAvailableRegions` (use the verbatim `name` field; abbreviations are rejected).
|
|
166
|
+
- **For exports, poll the status endpoint.** Async endpoints (`/backlinks/export`, `/keywords/export`) return a task ID; subsequent polls of `*ExportStatus` count against the rate limit but cost 0 credits. Start with a 5s poll interval; exponential backoff if the task is large.
|
|
167
|
+
- **Check the MCP tool description before WebFetching docs.** Every MCP tool exposes its full input schema, defaults, and usage notes via the protocol — e.g. `DATA_getDomainCompetitors` documents its own ~60KB response cap. One thing the descriptions do *not* carry: credit costs — for those, use `references/rate-limits-and-credits.md` and the public per-endpoint pages.
|
|
168
|
+
- **Large list endpoints can overflow the MCP transport.** `DATA_getDomainCompetitors` on a popular domain — and `DATA_getDomainKeywords` / `DATA_getAllBacklinks` on big domains — return responses past the MCP client's inline token limit; the result is auto-saved to a file instead. Recover it with a `jq` slice on the saved file, or call the REST endpoint directly (raw REST has no size cap). See `references/api-surface-map.md`.
|
|
169
|
+
- **For "show me Swagger / OpenAPI for the MCP"** — point the developer at MCP Inspector (`npx @modelcontextprotocol/inspector https://api.seranking.com/mcp`) or `mcp-scan`. Both walk the live tool/prompt/resource catalogue. A canonical MCP→OpenAPI converter is on the roadmap; for now the inspector output is the source of truth.
|
|
170
|
+
|
|
171
|
+
## Works well with
|
|
172
|
+
|
|
173
|
+
- **Predecessors:** none — entry point for any API integration question.
|
|
174
|
+
- **Successors (when the integration starts producing data):**
|
|
175
|
+
- `seo-content-brief` — when the integration pulls keyword research that should become editor briefs.
|
|
176
|
+
- `seo-page` — when one URL from the integration needs a keep/refresh/consolidate/kill verdict.
|
|
177
|
+
- `seo-drift baseline` — to snapshot a domain or URL before the integration starts running, so regressions are detectable.
|
|
178
|
+
- `seo-technical-audit` — when the integration involves audit runs and the output needs prioritisation.
|
|
179
|
+
- `seo-ai-search-share-of-voice` — when the integration tracks AIRT visibility and needs a competitive read.
|
|
180
|
+
|
|
181
|
+
## References
|
|
182
|
+
|
|
183
|
+
- `references/auth-and-keys.md` — API key formats, OAuth vs. header, headless / CI patterns, key rotation.
|
|
184
|
+
- `references/rate-limits-and-credits.md` — 10 RPS / 5 RPS, credit billing models, plan-limit consumption, error codes (429, 403), exponential-backoff template.
|
|
185
|
+
- `references/api-surface-map.md` — full routing table (which API owns what) + ID resolution table + decision tree for "which tool do I need".
|
|
186
|
+
- `references/integration-patterns.md` — five canonical recipes copy-paste-ready: rank tracker setup, bulk backlink export, audit pipeline, AIRT visibility tracker, keyword research bulk job.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# API Surface Map
|
|
2
|
+
|
|
3
|
+
The decision tree for "which API and which tool do I need". Pulled from the live MCP server's tool catalogue plus the canonical docs at `seranking.com/api/*`.
|
|
4
|
+
|
|
5
|
+
## Top-level split
|
|
6
|
+
|
|
7
|
+
| API | Owns | Billed against | Required plan |
|
|
8
|
+
|---|---|---|---|
|
|
9
|
+
| **Data API** | Research-shaped data on any domain. No prior account setup. | Credits. | Any with API credits. |
|
|
10
|
+
| **Project API** | Operations on the user's own SE Ranking projects. | Plan limits (Sites / Keywords / Audit Pages / AIRT Prompts). | Business or Enterprise. |
|
|
11
|
+
|
|
12
|
+
**Both APIs share a single API key.** A request lands on Data API or Project API based on its endpoint path (`/v1/backlinks/*` vs `/v1/projects/*`), not based on which key you sent.
|
|
13
|
+
|
|
14
|
+
## Data API surfaces
|
|
15
|
+
|
|
16
|
+
### Backlinks (~30 tools, prefix `DATA_*Backlinks*` / `DATA_*RefDomains*` / `DATA_*Ips*`)
|
|
17
|
+
|
|
18
|
+
Read backlink profile of any domain.
|
|
19
|
+
|
|
20
|
+
- **Summary & metrics:** `DATA_getBacklinksSummary`, `DATA_getBacklinksMetrics`, `DATA_getBacklinksCount`.
|
|
21
|
+
- **Lists:** `DATA_getAllBacklinks`, `DATA_getBacklinksRaw`, `DATA_listNewLostBacklinks`.
|
|
22
|
+
- **Anchors:** `DATA_getBacklinksAnchors`.
|
|
23
|
+
- **Referring domains:** `DATA_getBacklinksRefDomains`, `DATA_getTotalRefDomainsCount`, `DATA_getNewLostRefDomainsCount`, `DATA_listNewLostReferringDomains`.
|
|
24
|
+
- **Referring IPs / subnets:** `DATA_getReferringIps`, `DATA_getReferringIpsCount`, `DATA_getReferringSubnetsCount`.
|
|
25
|
+
- **Authority:** `DATA_getDomainAuthority`, `DATA_getDomainAuthorityHistory`, `DATA_getDistributionOfDomainAuthority`, `DATA_getPageAuthority`, `DATA_getPageAuthorityHistory`, `DATA_getBacklinksAuthority`.
|
|
26
|
+
- **History:** `DATA_getCumulativeBacklinksHistory`, `DATA_getNewLostBacklinksCount`.
|
|
27
|
+
- **Indexed pages:** `DATA_getBacklinksIndexedPages`.
|
|
28
|
+
- **Export (async):** `DATA_exportBacklinksData` → `DATA_getBacklinksExportStatus`.
|
|
29
|
+
|
|
30
|
+
### Domain analysis (~12 tools)
|
|
31
|
+
|
|
32
|
+
Read keyword / traffic / competitor / ad profile of any domain.
|
|
33
|
+
|
|
34
|
+
- **Overview:** `DATA_getDomainOverviewWorldwide` (global), `DATA_getDomainOverviewDatabases` (per-region), `DATA_getDomainOverviewHistory` (12-month).
|
|
35
|
+
- **Keywords:** `DATA_getDomainKeywords` (full list; supports `url` param for per-URL).
|
|
36
|
+
- **Pages:** `DATA_getDomainPages` (top pages by traffic).
|
|
37
|
+
- **Subdomains:** `DATA_getDomainSubdomains`.
|
|
38
|
+
- **Competitors:** `DATA_getDomainCompetitors`, `DATA_getDomainKeywordsComparison`.
|
|
39
|
+
- **Ads:** `DATA_getDomainAdsByDomain`, `DATA_getDomainAdsByKeyword`.
|
|
40
|
+
- **URL-level overview:** `DATA_getUrlOverviewWorldwide`.
|
|
41
|
+
|
|
42
|
+
> **`DATA_getDomainCompetitors` 60KB overflow.** For popular domains the response (up to 500 rows) exceeds the MCP client's inline token limit and is auto-saved to a file rather than returned inline. Recover it with a `jq` slice on the saved file — e.g. `jq -r '.data[:15][] | [.domain, .common_keywords] | @tsv' <saved-file>`. This is an MCP-transport limit only; the raw REST endpoint `GET /v1/domain/competitors` returns the full JSON uncapped. The same overflow can hit other large list endpoints — `DATA_getDomainKeywords`, `DATA_getAllBacklinks` — on big domains.
|
|
43
|
+
|
|
44
|
+
### Keyword research (~7 tools)
|
|
45
|
+
|
|
46
|
+
- `DATA_getRelatedKeywords`, `DATA_getSimilarKeywords`, `DATA_getLongTailKeywords`, `DATA_getKeywordQuestions`.
|
|
47
|
+
- `DATA_exportKeywords` (bulk export).
|
|
48
|
+
|
|
49
|
+
### SERP (~6 tools)
|
|
50
|
+
|
|
51
|
+
Real-time top-100 SERP results.
|
|
52
|
+
|
|
53
|
+
- **Task-based (recommended for batches):** `DATA_getSerpTasks` (list), `DATA_getSerpTaskResults`, `DATA_getSerpTaskAdvancedResults`.
|
|
54
|
+
- **Synchronous:** `DATA_getSerpResults`.
|
|
55
|
+
- **Locations:** `DATA_getSerpLocations`.
|
|
56
|
+
- **HTML dump:** `DATA_getSerpHtmlDump` (raw SERP HTML for diagnostic).
|
|
57
|
+
|
|
58
|
+
### Website audit — on-demand (~6 tools, lives under DATA)
|
|
59
|
+
|
|
60
|
+
For one-off audits of any site (vs. Project-attached audits below).
|
|
61
|
+
|
|
62
|
+
- **Create:** `DATA_createStandardAudit`, `DATA_createAdvancedAudit`.
|
|
63
|
+
- **Status:** `DATA_getAuditStatus`, `DATA_listAudits`.
|
|
64
|
+
- **Report:** `DATA_getAuditReport`, `DATA_getCrawledPages`, `DATA_getIssuesByUrl`, `DATA_getAuditPagesByIssue`.
|
|
65
|
+
- **Manage:** `DATA_updateAuditTitle`, `DATA_recheckAudit`, `DATA_deleteAudit`, `DATA_getAuditHistory`.
|
|
66
|
+
|
|
67
|
+
### AI Search (~10 tools, prefix `DATA_getAiSearch*`)
|
|
68
|
+
|
|
69
|
+
LLM-engine visibility data.
|
|
70
|
+
|
|
71
|
+
- **Overview:** `DATA_getAiSearchOverview`, `DATA_getAiSearchLeaderboard`.
|
|
72
|
+
- **Per-brand / per-target:** `DATA_getAiSearchBrand`, `DATA_getAiSearchPromptsByBrand`, `DATA_getAiSearchPromptsByTarget`.
|
|
73
|
+
- **Page-level:** `DATA_getAiVisibilityPages`, `DATA_getAiVisibilityPrompts`, `DATA_getAiVisibilityResponses`.
|
|
74
|
+
- **Sources / topics / sentiment / models / aliases / scores:** the `DATA_getAiVisibility*` family.
|
|
75
|
+
- **Reports:** `DATA_getAiVisibilityReports`.
|
|
76
|
+
|
|
77
|
+
### Account & system (~4 tools)
|
|
78
|
+
|
|
79
|
+
- `DATA_getSubscription` — plan info. Returns `{ subscription_info: { status, units_limit, units_left, start_date, expiraton_date } }`. **`units_left` is the figure to forecast against** — it matches the official credit-system docs.
|
|
80
|
+
- `DATA_getCreditBalance` — returns `{ limit, used }`. **Not an alias of `getSubscription`:** the two report different remaining-credit figures that do not reconcile against `limit` (an ~8.6M gap observed in testing). Use it as a secondary view only; forecast from `getSubscription.units_left`.
|
|
81
|
+
- `DATA_getUserProfile` — user identity + workspace.
|
|
82
|
+
|
|
83
|
+
## Project API surfaces
|
|
84
|
+
|
|
85
|
+
Project API mutates the user's account. Confirm all `create / add / delete / update` calls before invoking.
|
|
86
|
+
|
|
87
|
+
### Project management (~15 tools)
|
|
88
|
+
|
|
89
|
+
- **List:** `PROJECT_listProjects`, `PROJECT_listOwnedProjects`, `PROJECT_listSharedProjects`.
|
|
90
|
+
- **CRUD:** `PROJECT_createProject`, `PROJECT_updateProject`, `PROJECT_deleteProject`.
|
|
91
|
+
- **Groups:** `PROJECT_listProjectGroups`, `PROJECT_createProjectGroup`, `PROJECT_updateProjectGroup`, `PROJECT_deleteProjectGroup`, `PROJECT_moveProjectsToGroup`.
|
|
92
|
+
- **Sharing:** `PROJECT_shareProject`.
|
|
93
|
+
- **Summary:** `PROJECT_getSummary`, `PROJECT_getSeoPotential`.
|
|
94
|
+
- **Brand:** `PROJECT_getSiteBrand`, `PROJECT_saveSiteBrand`.
|
|
95
|
+
|
|
96
|
+
### Rank tracking — keywords & search engines (~25 tools)
|
|
97
|
+
|
|
98
|
+
- **Keywords CRUD:** `PROJECT_listKeywords`, `PROJECT_addKeywords`, `PROJECT_updateKeyword`, `PROJECT_deleteKeywords`.
|
|
99
|
+
- **Keyword groups:** `PROJECT_listKeywordGroups`, `PROJECT_createKeywordGroup`, `PROJECT_updateKeywordGroup`, `PROJECT_deleteKeywordGroup`, `PROJECT_moveKeywordsToGroup`.
|
|
100
|
+
- **Tags:** `PROJECT_listTags`, `PROJECT_addTag`, `PROJECT_updateTag`, `PROJECT_deleteTag`.
|
|
101
|
+
- **Search engines:** `PROJECT_getSearchEngines`, `PROJECT_addSearchEngine`, `PROJECT_updateSearchEngine`, `PROJECT_deleteSearchEngine`, `PROJECT_getAvailableSearchEngines`, `PROJECT_getAvailableRegions`, `PROJECT_getGoogleLanguages`.
|
|
102
|
+
- **Positions:** `PROJECT_getPositionHistory`, `PROJECT_runPositionCheck`, `PROJECT_setKeywordPosition`, `PROJECT_getKeywordStats`, `PROJECT_getCheckDates`, `PROJECT_getHistoricalDates`.
|
|
103
|
+
- **GSC integration:** `PROJECT_getGoogleSearchConsole`.
|
|
104
|
+
- **Stats:** `PROJECT_getAdsStats`.
|
|
105
|
+
|
|
106
|
+
### Competitors (~7 tools)
|
|
107
|
+
|
|
108
|
+
- `PROJECT_listCompetitors`, `PROJECT_addCompetitor`, `PROJECT_deleteCompetitor`.
|
|
109
|
+
- `PROJECT_getCompetitorPositions`, `PROJECT_getCompetitorSerp10`, `PROJECT_getCompetitorSerp100`, `PROJECT_getAllCompetitorsMetrics`.
|
|
110
|
+
|
|
111
|
+
### Website audit (Project-attached, ~15 tools)
|
|
112
|
+
|
|
113
|
+
For ongoing audits tied to a project. Distinct from on-demand audits via `DATA_*` above.
|
|
114
|
+
|
|
115
|
+
- **Create & manage:** `PROJECT_createAudit`, `PROJECT_recheckAudit`, `PROJECT_deleteAudit`, `PROJECT_updateAuditTitle`, `PROJECT_listAudits`.
|
|
116
|
+
- **Settings:** `PROJECT_getAuditSettings`, `PROJECT_updateAuditSettings`, `PROJECT_resetAuditSettings`.
|
|
117
|
+
- **Sitemaps & source pages:** `PROJECT_listAuditSitemaps`, `PROJECT_addAuditSitemap`, `PROJECT_deleteAuditSitemap`, `PROJECT_listAuditSourcePages`, `PROJECT_addAuditSourcePages`, `PROJECT_deleteAuditSourcePages`.
|
|
118
|
+
- **Reports:** `PROJECT_getAuditReport`, `PROJECT_getAuditHistory`, `PROJECT_getAuditStatus`, `PROJECT_getCrawledPages`, `PROJECT_getIssuesByUrl`, `PROJECT_getAuditPagesByIssue`.
|
|
119
|
+
|
|
120
|
+
### Backlinks (Project-attached, ~10 tools)
|
|
121
|
+
|
|
122
|
+
For monitoring user-owned backlinks (vs. crawling any domain via Data API).
|
|
123
|
+
|
|
124
|
+
- **CRUD:** `PROJECT_listProjectBacklinks`, `PROJECT_addProjectBacklink`, `PROJECT_deleteProjectBacklinks`, `PROJECT_recheckProjectBacklinks`.
|
|
125
|
+
- **Groups:** `PROJECT_listBacklinkGroups`, `PROJECT_createBacklinkGroup`, `PROJECT_renameBacklinkGroup`, `PROJECT_deleteBacklinkGroup`, `PROJECT_moveBacklinksToGroup`.
|
|
126
|
+
- **GSC import:** `PROJECT_runBacklinkGscImport`, `PROJECT_getBacklinkGscImportStatus`, `PROJECT_updateBacklinkImportSettings`.
|
|
127
|
+
- **Stats:** `PROJECT_getBacklinkStats`, `PROJECT_getFoundLinks`.
|
|
128
|
+
- **Disavow:** `PROJECT_listDisavowedBacklinks`, `PROJECT_addDisavowedBacklinks`, `PROJECT_deleteDisavowedBacklink`.
|
|
129
|
+
|
|
130
|
+
### AIRT — AI Result Tracker (~10 tools)
|
|
131
|
+
|
|
132
|
+
- **Prompts:** `PROJECT_listPrompts`, `PROJECT_addPrompts`, `PROJECT_deletePrompts`, `PROJECT_transferPrompts`.
|
|
133
|
+
- **Prompt groups:** `PROJECT_listPromptGroups`, `PROJECT_createPromptGroup`, `PROJECT_updatePromptGroup`, `PROJECT_deletePromptGroup`, `PROJECT_deleteAllPromptsInGroup`, `PROJECT_movePromptsToGroup`, `PROJECT_changePromptGroupOrder`.
|
|
134
|
+
- **LLM engines:** `PROJECT_listLlmEngines`, `PROJECT_getLlmEngine`, `PROJECT_createLlmEngine`, `PROJECT_updateLlmEngine`, `PROJECT_deleteLlmEngine`.
|
|
135
|
+
- **Status & results:** `PROJECT_getLlmStatus`, `PROJECT_getLlmStatistics`, `PROJECT_getPromptAnswer`, `PROJECT_getPromptsRankings`.
|
|
136
|
+
|
|
137
|
+
### Marketing plan (~3 tools)
|
|
138
|
+
|
|
139
|
+
- `PROJECT_getMarketingPlan`, `PROJECT_addPlanTask`, `PROJECT_updatePlanTask`, `PROJECT_setPlanTaskStatus`, `PROJECT_deletePlanTask`.
|
|
140
|
+
|
|
141
|
+
### Sub-accounts (~5 tools)
|
|
142
|
+
|
|
143
|
+
- `PROJECT_listSubAccounts`, `PROJECT_createSubAccount`, `PROJECT_updateSubAccount`, `PROJECT_deleteSubAccount`, `PROJECT_getSubAccountDetails`.
|
|
144
|
+
|
|
145
|
+
### Account & profile (~3 tools)
|
|
146
|
+
|
|
147
|
+
- `PROJECT_getUserProfile`, `PROJECT_getAdsStats`.
|
|
148
|
+
|
|
149
|
+
## ID resolution — the lookup-first pattern
|
|
150
|
+
|
|
151
|
+
Most Project API operations need an ID. The skill should call the appropriate `*list*` or `*available*` tool first when the user didn't supply it.
|
|
152
|
+
|
|
153
|
+
| User said… | Lookup tool | Returns | Pass to |
|
|
154
|
+
|---|---|---|---|
|
|
155
|
+
| "for my project on acme.com" | `PROJECT_listProjects` | List of projects + `project_id` | `project_id` to any per-project tool |
|
|
156
|
+
| "track in the US" | (none — pass `country_code: "us"` directly) | — | `PROJECT_addSearchEngine` resolves automatically |
|
|
157
|
+
| "track in Catalonia" | `PROJECT_getAvailableSearchEngines` | `id` for regional engine | `search_engine_id` to `PROJECT_addSearchEngine` |
|
|
158
|
+
| "in Spanish" | `PROJECT_getGoogleLanguages` | Language code list | `language_code` to rank-tracking tools |
|
|
159
|
+
| "in Barcelona" | `PROJECT_getAvailableRegions` | Region records with verbatim `name` | `region_name` to rank-tracking tools (use exact name — abbreviations rejected) |
|
|
160
|
+
| "for keyword group X" | `PROJECT_listKeywordGroups` | Group IDs + names | `group_id` to `PROJECT_moveKeywordsToGroup` etc. |
|
|
161
|
+
| "for our backlink group X" | `PROJECT_listBacklinkGroups` | Group IDs + names | `group_id` to backlink group tools |
|
|
162
|
+
| "for AIRT prompt group X" | `PROJECT_listPromptGroups` | Group IDs + names | `group_id` to prompt group tools |
|
|
163
|
+
| "for SERP in {city}" | `DATA_getSerpLocations` | Locations + codes | `location` to SERP tools |
|
|
164
|
+
| "audit X" | `DATA_listAudits` / `PROJECT_listAudits` | Audit IDs | `audit_id` to report/recheck/delete |
|
|
165
|
+
|
|
166
|
+
## Quick decision tree
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
"I want to research a domain I don't own"
|
|
170
|
+
→ Data API
|
|
171
|
+
backlinks → DATA_getBacklinks*
|
|
172
|
+
keywords → DATA_getDomainKeywords / getDomainOverviewWorldwide
|
|
173
|
+
competitors → DATA_getDomainCompetitors
|
|
174
|
+
SERP for a keyword → DATA_getSerpResults / SerpTask
|
|
175
|
+
one-off audit → DATA_createStandardAudit
|
|
176
|
+
LLM visibility → DATA_getAiSearch*
|
|
177
|
+
|
|
178
|
+
"I want to track/manage state on my own SE Ranking projects"
|
|
179
|
+
→ Project API (needs Business/Enterprise plan)
|
|
180
|
+
create project → PROJECT_createProject
|
|
181
|
+
add keywords to track → PROJECT_addKeywords (after PROJECT_addSearchEngine)
|
|
182
|
+
daily ranks → PROJECT_runPositionCheck / PROJECT_getPositionHistory
|
|
183
|
+
project audit → PROJECT_createAudit
|
|
184
|
+
backlink monitoring → PROJECT_addProjectBacklink (with PROJECT_runBacklinkGscImport for bulk)
|
|
185
|
+
AIRT prompts → PROJECT_addPrompts (with PROJECT_createLlmEngine if a custom engine)
|
|
186
|
+
competitors → PROJECT_addCompetitor + PROJECT_getCompetitorPositions
|
|
187
|
+
|
|
188
|
+
"I want to integrate SE Ranking into another tool"
|
|
189
|
+
→ Both, usually
|
|
190
|
+
e.g., "weekly client report"
|
|
191
|
+
use PROJECT_getPositionHistory + DATA_getDomainCompetitors + DATA_getBacklinksSummary
|
|
192
|
+
pipe into Looker / Sheets / your dashboard
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## Built-in MCP prompts (server-shipped recipes)
|
|
196
|
+
|
|
197
|
+
The MCP server ships 5 built-in prompts (via the `prompts/list` capability) — encoded recommended tool sequences for common workflows. **Prefer these when the user's ask matches**:
|
|
198
|
+
|
|
199
|
+
| Prompt | What it does | Args |
|
|
200
|
+
|---|---|---|
|
|
201
|
+
| `serp-analysis` | Compare SERPs across two locations for a keyword | `keyword`, `location1`, `location2`, optional `language`, optional `device` |
|
|
202
|
+
| `backlink-gap` | Find backlink opportunities vs. competitors | `my_domain`, `competitors` (comma-separated), optional `min_domain_trust` |
|
|
203
|
+
| `domain-traffic-competitors` | Traffic + top competitors for a domain | `domain` |
|
|
204
|
+
| `keyword-clusters` | Build intent-grouped keyword clusters | `market`, `seed_keywords` |
|
|
205
|
+
| `ai-share-of-voice` | LLM-engine visibility vs. competitors | `domain`, `competitors`, optional `country`, `llm_engines` |
|
|
206
|
+
|
|
207
|
+
These prompts are accessible via any spec-compliant MCP client. In Claude Code: `/mcp` shows them; calling `mcp__claude_ai_SE_Ranking__<prompt-name>` (varies by client) executes.
|