Skip to content

tymoshenko-dmytro/claude-marketing-skills / skills/ahrefs

ahrefs

Verified

Pulls Ahrefs data for any domain and runs staged keyword research under a unit budget. Lookups: organic keywords, top pages, backlinks, referring domains, Domain Rating, traffic history, anchors, organic competitors, the SERP for a keyword, units left. Keyword research: expand seed topics, price keywords, pull top-10 SERPs, cluster the keywords one page can rank for, read which page type each SERP rewards, join your Google positions from Search Console, and suggest improve / new article / landing page / skip. Works through the Ahrefs MCP tools (any paid plan from Lite) or an API v3 key for scripts. Use when someone asks for a domain's SEO metrics, a competitor's organic traffic or backlinks, keyword volumes, or what to write about. Triggers: "check in Ahrefs", "organic traffic of X", "backlinks of X", "competitor SEO metrics", "keyword research", "keyword clustering", "what should we write about", "keywords for the German market", "content gap", "how much traffic does X get".

FileKindSize
SKILL.mdskill md11.4 KB
references/unit-costs.mdmarkdown3.9 KB
scripts/ahrefs_api.pyscript12.1 KB
scripts/kw.pyexecutablescript41.8 KB
scripts/seoconf.pyexecutablescript6.8 KB

references/unit-costs.md

View on GitHub
# Ahrefs API units: what actually costs money

Measured on real keyword pulls through the Ahrefs MCP server (tens of thousands of candidate keywords). Prices can change — re-measure on a small batch before a big run, using `subscription-info-limits-and-usage` (free) before and after.

## The cost model

Ahrefs' documented formula: **cost of a call = max(50, per-row cost × rows)**, where a row costs the sum of its selected fields (1 unit by default; some fields 5 or 10). Cached responses and a few endpoint groups (Rank Tracker, management, public) are free, as are test queries on `ahrefs.com`. What that means in practice:

1. **You pay per row and per field, not per keyword sent.** Volume-type fields — `volume`, `global_volume`, `difficulty`, `parent_volume`, `traffic_potential` — cost about **10 units per row each** (11–12 all-in). Selecting two of them doubles the price. Cheap fields (`keyword`, `word_count`, `volume_mobile_pct`) cost about 1.
2. **Keywords with zero volume come back as rows with `volume: 0`** and cost little. In one pull, most of a 57,000-keyword candidate list cost almost nothing because only real demand was billed at full price.
3. **`where` filters on the server and bills only kept rows.** `{"field":"global_volume","is":["gte",30]}` turned a 6-row / 66-unit call into 4 rows / 50 units.
4. **Batching beats the 50-unit floor.** A single keyword pays the 50-unit minimum; in a batch of 2–5 keywords `keywords-explorer-overview` came to ~23–25 units per row.

Plan pulls by *expected rows with data*, not by keywords sent. Select only the volume field you need. Push the floor into `where`. Cache every batch so a re-run never pays twice.

## Where the cost of a call is reported

- **API v3:** response headers. `x-api-units-cost-total-actual` = units consumed; `x-api-units-cost-total` = units the request should consume; `x-api-units-cost-row` = per-row cost; `x-api-rows` = rows returned; `x-api-cache` = `hit` / `miss` / `no_cache` (a cached response costs nothing). `curl -v` shows them. `ahrefs_api.py` and `kw.py` log the first one.
- **MCP:** a second text block in the tool result, `{"apiUsageCosts": {"units-cost-total-actual": N}}`. `kw.py import` reads it when the saved output contains it.
- **Either:** `subscription-info-limits-and-usage` before and after a batch (free).

## MCP transport quirks

All three look the same from outside: `{"error": "internal server error"}`.

1. **A keyword Ahrefs has never indexed fails the WHOLE request.** Zero-volume keywords are fine; a phrase with no index entry at all kills every other keyword in the same call. So do not price invented variants. Price only terms that came back from a discovery pass, and batch in 2–5 so one bad keyword costs one cheap retry.
2. **`keywords-explorer-matching-terms` rejects `where` and `order_by`.** Both fail every time, in any syntax. The workaround is cheaper anyway: discover with `select=keyword` only (~1 unit per row), then price the shortlist through `keywords-explorer-overview`. 100 ideas for ~100 units.
3. **Parallel calls fail.** Five `overview` calls in one message: one succeeded, four failed. Send pricing calls sequentially. `matching-terms` tolerated two at a time.

## The pattern that works

```
discovery   keywords-explorer-matching-terms   select=keyword            ~1 unit/row
   ↓ shortlist by relevance (agent or you)
pricing     keywords-explorer-overview         select=keyword,volume     batches of 2–5, sequential
            where: volume >= <floor>
   ↓ cache every batch to raw/seo/
```

## Other notes

- `keywords` is a **comma-separated string**, not a list.
- MCP keys and API v3 keys are not interchangeable: an MCP key returns 401 on `api.ahrefs.com/v3/...`. Use the MCP server with an MCP key, `scripts/ahrefs_api.py` with an API v3 key.
- Admins can cap monthly units per key — do it for any key an agent uses.
- Keys get rotated. A dead key fails silently with 401 on every path; if everything suddenly returns 401, issue a new key first.
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 323kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 323kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 323kUpdated Claude CodeCodexVerifiedInstall