Source-linked skill
Ahrefs Research
Pull Ahrefs data via official MCP or API v3 to ship a competitor gap Kanban, filtered link targets, Reddit-mined topics, and link-insertion URLs.
Opens the skill review in Omnyo for Mac. Needs the next Omnyo for Mac update.
Part of SEO Skills by Ilias Ism
Get all 32 skills in one click
Open-source collection by Ilias Ism in Illyism/seo-skills (MIT license). Install every skill at once in Omnyo or download the whole package.
# Ahrefs Research for Coding Agents
Ahrefs data is only worth the API units if it ends as a file in the repo. Every workflow below terminates in a Markdown roadmap, a CSV, or a scaffolded route. Never stop at "here is what I found".
**When invoking:** On first use, state which connection path you detected and which workflow you are running, then run it. On repeat use, go straight to the output.
## Step 0: Pick the Connection Path
```
Is an Ahrefs tool in your tool list (names mirror v3 paths, e.g. site-explorer-top-pages)?
├── Yes → use the MCP tools. Same params as the REST calls below.
└── No → is $AHREFS_API_KEY set? (run: test -n "$AHREFS_API_KEY" && echo set)
├── Yes → use the `ahrefs` shell helper below (REST v3).
└── No → CSV fallback:
1. Ask the user to export the matching Ahrefs report as CSV (UTF-8).
2. Save to seo/data/ahrefs/<report>-<domain>.csv
3. Parse the CSV columns (URL, Traffic, Top keyword, Value, Referring domains)
and continue the same workflow from the "Filter" step.
```
Why the order: MCP needs zero glue code, REST is scriptable and repeatable, CSV is slow but keeps the workflow alive when the user has a UI seat and no API plan.
### REST helper
Paste into the shell session once:
```bash
ahrefs() { # usage: ahrefs <endpoint> key=value ...
local ep="$1"; shift
local args=(); for kv in "$@"; do args+=(--data-urlencode "$kv"); done
curl -sS --get "https://api.ahrefs.com/v3/$ep" \
-H "Authorization: Bearer $AHREFS_API_KEY" \
-H "Accept: application/json" "${args[@]}"
}
mkdir -p seo/data/ahrefs
TODAY=$(date +%F)
```
### Unit budget rules
- Each call costs `max(50, per_row_cost × rows)` units. `sum_traffic` and `value` cost 10 units per row, `referring_domains` costs 5, `url` and `top_keyword` cost 1.
- Always set `limit`. Default to 100 rows, never above 500 without the user's OK. Why: one unbounded `top-pages` call on a large domain burns a monthly allowance.
- Always set `select` to the exact fields the workflow uses. Extra columns are paid columns.
- Cache every raw response to `seo/data/ahrefs/*.json` and reuse it within 7 days. Why: Ahrefs refreshes traffic estimates slowly, so a re-pull within a week buys nothing.
- To confirm a `where` field name, apply the same filter in the Ahrefs UI and click the `API {}` button. Why: field names differ per endpoint (`traffic` on `organic-competitors`, `sum_traffic` on `top-pages`).
## Workflow A: Competitor Top-Pages Gap Diffing
Three steps, with a review first
- 01Open it in Omnyo with one click
- 02Review the exact files Omnyo screened
- 03Install it for your workspace
omnyo explore marketplace --query "ahrefs research"
Related
See allMore in Marketing & growth
The same Marketplace, inside Omnyo.
Nothing installs, imports or connects until you have reviewed it in Omnyo and confirmed.
Download for Mac- 01Find it here or in Omnyo’s Skill Library
- 02Open it in Omnyo with one click
- 03Review the exact files before anything installs