Skip to content

LARIkoz/ahrefs-api-knowledge-base

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ahrefs API v3 — knowledge base for AI agents

A queryable knowledge base over the complete Ahrefs API v3 reference — 146 endpoints + 7 guides, one clean Markdown page each, with every query parameter, allowed value, response field, and per-field unit cost.

Built as an eidetic topic base: attach it to your project over MCP and ask, in plain language, “which endpoint, which params, what does it cost?” — instead of scrolling 146 doc pages or guessing parameters and burning API units on trial and error.

Useful for Claude Code / Cursor / any MCP or RAG agent that needs to build correct, cost-aware Ahrefs API calls: backlinks, referring domains, Domain Rating, organic keywords, keyword difficulty & volume, SERP, rank tracking, site audit, Brand Radar (AI-search visibility), GSC, and web analytics.

Layout

docs/
  HOME.md                      # hub: all 146 endpoints grouped, with method · path · unit signal
  api/<group>/<endpoint>.md    # one page per endpoint (params, allowed values, response schema, cost)
  guides/                      # limits-consumption, parameters, filter-syntax, free-test-queries, …
.eidetic-base.json             # manifest (attach-ready)
skill/SKILL.md                 # agent usage guide (auth, cost model, params, endpoint map)

Use it as an eidetic base

git clone https://github.com/LARIkoz/ahrefs-api-knowledge-base.git ~/eidetic-bases/ahrefs-base
# point eidetic at it, then:
python3 ~/.claude/memory-system/bin/base.py index  ahrefs
python3 ~/.claude/memory-system/bin/base.py attach ahrefs --scope project --run
# now ask:  ahrefs_search "referring domains of a domain with anchor text"

Don't use eidetic? The docs/ tree is plain Markdown — drop it into any RAG / vector store.

The Ahrefs cost model (TL;DR — full detail in docs/guides/limits-consumption.md)

units = max(50, per_row_cost × rows) · base 50 units/request · a field costs 1 / 5 / 10 units · cache hits cost 0 · Rank Tracker / Management / Public endpoints are free · every response returns an x-api-units-cost-total header so you can preview cost. Site Explorer is free against the ahrefs.com / wordcount.com test targets.

Agent skill

skill/SKILL.md is a drop-in Claude Code skill that teaches an agent the Ahrefs API essentials — auth, the units cost model, free test targets, common parameters, and the endpoint map. Install it:

mkdir -p ~/.claude/skills/ahrefs && cp skill/SKILL.md ~/.claude/skills/ahrefs/

Attribution & license

Documentation content is mirrored from the public Ahrefs API docs (https://docs.ahrefs.com/en/api) and is © Ahrefs Pte. Ltd. — see NOTICE. This is an unofficial, community convenience mirror for AI tooling; not affiliated with or endorsed by Ahrefs. To request removal, open an issue.

The repository structure, the skill/SKILL.md guide, and the HOME.md hub are original work, released under the MIT License.

About

Ahrefs API v3 as a queryable knowledge base for AI agents — all 146 endpoints + 7 guides, the units cost model, and a drop-in Claude skill. MCP / RAG / eidetic ready. Backlinks, keywords, SERP, rank tracking, Brand Radar.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages