openclaudia/openclaudia-skills/ahrefs-research
Claude Code and agent skill by openclaudia/openclaudia-skills
- community
Checking that the SKILL.md file is still in the repository.
Manages Ahrefs API usage in Python using `ahrefs-python` library. Use when working with SEO / marketing related tasks or with data including backlinks, keywords, domain ratings, organic traffic, site audits, rank tracking, and brand monitoring. Covers `ahrefs-python` usage including AhrefsClient / AsyncAhrefsClient, typed request/response models, error handling, and all API sections.
Install
npx vskill@latest install openclaudia/openclaudia-skills/ahrefs-researchSKILL.md
Ahrefs Python SDK Skill
Overview
The Ahrefs API provides programmatic access to Ahrefs SEO data. The official Python SDK (ahrefs-python) provides typed request and response models for all endpoints, auto-generated from the OpenAPI spec.
Key capabilities:
- Site Explorer - Backlinks, organic keywords, domain rating, traffic, referring domains
- Keywords Explorer - Keyword research, volumes, difficulty, related terms
- Rank Tracker - SERP monitoring, competitor tracking
- Site Audit - Technical SEO issues, page content, page explorer
- Brand Radar - AI brand mentions, share of voice, impressions
- SERP Overview - Search result analysis
- Batch Analysis - Bulk domain/URL metrics via POST
Installation
Requires Python 3.11+. Dependencies: httpx, pydantic.
API Method Discovery
The SDK has 52 methods across 7 API sections. The built-in search tool is the fastest way to find the right method — it returns matching method signatures, parameters, and return types directly, so there's no need to scan through a large reference.
Python (preferred when already in a Python context):
CLI (preferred when exploring from the terminal):
IMPORTANT RULES
- ALWAYS use the
ahrefs-pythonSDK. DO NOT make rawhttpx/requestscalls to the Ahrefs API. - ALWAYS pass dates as strings in
YYYY-MM-DDformat (e.g."2025-01-15"). - ALWAYS use
selecton list endpoints to request only the columns you need. List endpoints return all columns by default, which wastes API units and increases response size. - USE context managers (
with/async with) for client lifecycle management. - NEVER hardcode API keys in source code. Use the
AHREFS_API_KEYenvironment variable or your preferred secrets mechanism. - The client handles retries (429, 5xx, connection errors) automatically. DO NOT implement your own retry logic on top of the SDK.
Quick Start
SDK Patterns
Client Setup
Async client:
For parallel calls, use asyncio.gather:
Calling Methods
Two calling styles -- both are equivalent:
Method names follow {api_section}_{endpoint}, e.g. site_explorer_organic_keywords, keywords_explorer_overview.
Responses
Methods return typed Data objects directly.
Scalar endpoints return a single data object (or None):
List endpoints return a list of data objects. There is no pagination — set limit to the number of results you need. Use select to request only the columns you need:
Error Handling
All exceptions inherit from ahrefs.AhrefsError.
Common Parameters
Most list endpoints share these parameters:
| Parameter | Type | Description | |
|---|---|---|---|
target | str | Domain, URL, or path to analyze | |
date | str | Date in YYYY-MM-DD format | |
date_from / date_to | str | Date range for history endpoints | |
country | str | Two-letter country code (ISO 3166-1 alpha-2) | |
select | str | Comma-separated columns to return | |
where | str | Filter expression | |
order_by | str | Column and direction, e.g. "volume:desc" | |
limit | int | Max results to return |
Parameters typed as enums in the API reference (CountryEnum, VolumeModeEnum, etc.) accept plain strings — pass country="us" not CountryEnum("us").
The where parameter takes a JSON string. Use json.dumps() to build it:
For full filter syntax (boolean combinators, operators, nested fields), see references/filter-syntax.md.
API Methods
Use search_api_methods("query") or python3 -m ahrefs.api_search "query" to find methods by keyword. Search covers all 52 methods across 7 API sections and returns complete signatures, parameters, and response fields.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/ahrefs-research/SKILL.md
Popularity
- Repository stars
- 426
- Repository forks
- 9
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 15 May 2026, 5 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/openclaudia/openclaudia-skills/ahrefs-research)