Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

ahrefs-research阿雷夫斯研究

Agent Skill

ahrefs-research 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

624

周安装

26

GitHub Stars

406

下载量

208
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ahrefs-research(阿雷夫斯研究)
来源仓库:https://github.com/openclaudia/openclaudia-skills
仓库路径:skills/ahrefs-research
安装命令:
npx skills add https://github.com/openclaudia/openclaudia-skills --skill ahrefs-research
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/openclaudia/openclaudia-skills --skill ahrefs-research

简介

ahrefs-research 提供 Ahrefs SEO 数据访问能力,支持多维度市场分析。

  • 涵盖反向链接、关键词难度、流量估算与 SERP 监控等内容。
  • 适用于数字营销、内容策略与竞争对手情报收集。
  • 依赖有效 API 凭证,操作前需确认权限与计费状态。
  • 通过关键词、域名或项目 ID 发起查询获取详细报告。

SKILL.md

Ahrefs SEO Research

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

pip3 install git+https://github.com/ahrefs/ahrefs-python.git

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):

from ahrefs.search import search_api_methods

# Returns formatted text with method signatures, parameters, and return types
print(search_api_methods("domain rating"))

# Filter by API section and limit results
print(search_api_methods("backlinks", section="site-explorer", limit=3))

CLI (preferred when exploring from the terminal):

# Ensure python3 points to the interpreter where ahrefs-python is installed:
#   which python3
#   python3 -c "import ahrefs"
python3 -m ahrefs.api_search "domain rating"
python3 -m ahrefs.api_search "backlinks" --section site-explorer --limit 3
python3 -m ahrefs.api_search "batch" --json
python3 -m ahrefs.api_search --sections  # list all API sections

IMPORTANT RULES

  • ALWAYS use the ahrefs-python SDK. DO NOT make raw httpx/requests calls to the Ahrefs API.
  • ALWAYS pass dates as strings in YYYY-MM-DD format (e.g. "2025-01-15").
  • ALWAYS use select on 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_KEY environment 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

import os
from ahrefs import AhrefsClient

with AhrefsClient(api_key=os.environ["AHREFS_API_KEY"]) as client:
    data = client.site_explorer_domain_rating(target="ahrefs.com", date="2025-01-15")
    print(data.domain_rating)  # 91.0
    print(data.ahrefs_rank)    # 3

SDK Patterns

Client Setup

import os
import ahrefs

with ahrefs.AhrefsClient(
    api_key=os.environ["AHREFS_API_KEY"],  # or any secrets source
    base_url="...",          # override API base URL (default: https://api.ahrefs.com/v3)
    timeout=30.0,            # request timeout in seconds (default: 60)
    max_retries=3,           # retries on transient errors (default: 2)
) as client:
    ...

Async client:

import os
from ahrefs import AsyncAhrefsClient

async with AsyncAhrefsClient(api_key=os.environ["AHREFS_API_KEY"]) as client:
    data = await client.site_explorer_domain_rating(target="ahrefs.com", date="2025-01-15")

For parallel calls, use asyncio.gather:

import asyncio

async with AsyncAhrefsClient(api_key=os.environ["AHREFS_API_KEY"]) as client:
    dr_ahrefs, dr_moz = await asyncio.gather(
        client.site_explorer_domain_rating(target="ahrefs.com", date="2025-01-15"),
        client.site_explorer_domain_rating(target="moz.com", date="2025-01-15"),
    )

Calling Methods

Two calling styles -- both are equivalent:

# Keyword arguments (recommended)
data = client.site_explorer_domain_rating(target="ahrefs.com", date="2025-01-15")

# Request objects (full type safety)
from ahrefs.types import SiteExplorerDomainRatingRequest
request = SiteExplorerDomainRatingRequest(target="ahrefs.com", date="2025-01-15")
data = client.site_explorer_domain_rating(request)

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):

data = client.site_explorer_domain_rating(target="ahrefs.com", date="2025-01-15")
print(data.domain_rating)

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:

items = client.site_explorer_organic_keywords(
    target="ahrefs.com",
    date="2025-01-15",
    select="keyword,volume,best_position",
    order_by="volume:desc",
    limit=10,
)
for item in items:
    print(item.keyword, item.volume, item.best_position)

Error Handling

import ahrefs

try:
    data = client.site_explorer_domain_rating(target="example.com", date="2025-01-15")
except ahrefs.AuthenticationError:    # 401
    ...
except ahrefs.RateLimitError as e:    # 429 -- e.retry_after has the delay
    ...
except ahrefs.NotFoundError:          # 404
    ...
except ahrefs.APIError as e:          # other 4xx/5xx -- e.status_code, e.response_body
    ...
except ahrefs.APIConnectionError:     # network / timeout
    ...

All exceptions inherit from ahrefs.AhrefsError.

Common Parameters

Most list endpoints share these parameters:

ParameterTypeDescription
targetstrDomain, URL, or path to analyze
datestrDate in YYYY-MM-DD format
date_from / date_tostrDate range for history endpoints
countrystrTwo-letter country code (ISO 3166-1 alpha-2)
selectstrComma-separated columns to return
wherestrFilter expression
order_bystrColumn and direction, e.g. "volume:desc"
limitintMax 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:

import json
where = json.dumps({"field": "volume", "is": ["gte", 1000]})
items = client.site_explorer_organic_keywords(
    target="ahrefs.com", date="2025-01-15",
    select="keyword,volume", where=where,
)

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.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.5%
按下载量换算72

Claude

27.03%
按下载量换算56

Cursor

20.27%
按下载量换算42

Gemini CLI

8.5%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills