catalog/repos/ahrefs--ahrefs-api-skills.md

41 lines
1.6 KiB
Markdown
Raw Normal View History

2026-04-07 11:44:56 +08:00
# Ahrefs API 技能集
`SEO工具` `API集成` `Claude Code` `Python SDK`
# Ahrefs API 技能集
[Claude Code](https://docs.anthropic.com/en/docs/claude-code) 专为 [Ahrefs API](https://docs.ahrefs.com/docs/api/v3/) 和 [Python SDK](https://github.com/ahrefs/ahrefs-python) 提供的技能集。
技能集能让你的 AI 编程助手掌握 SDK 的使用模式、可用方法和最佳实践,从而无需猜测即可编写正确的 Ahrefs API 代码。
## 前置条件
安装 [Ahrefs Python SDK](https://github.com/ahrefs/ahrefs-python) 并设置你的 API 密钥:
```sh
pip install git+https://github.com/ahrefs/ahrefs-python.git
export AHREFS_API_KEY="your-api-key"
```
公开接口(爬虫 IP 相关)无需 API 密钥,其他所有接口均需要。
## 安装
```sh
npx skills add ahrefs/ahrefs-api-skills --skill ahrefs-python --global
```
安装后,让 Claude Code 使用 Ahrefs API它将自动掌握 SDK 模式、全部 105 个方法、错误处理及过滤器语法。
## 包含内容
`ahrefs-python` 技能集提供:
- **SDK 使用规范** — 始终使用类型化客户端、正确的响应访问模式、日期格式规范
- **全部 105 个 API 方法** — 站点分析、关键词分析、管理、排名追踪、站点审计、品牌雷达、SERP 概览、批量分析、网站统计、公开接口、订阅信息
- **过滤器语法参考** — BNF 语法及构建查询过滤器的示例
## 相关链接
- [Ahrefs Python SDK](https://github.com/ahrefs/ahrefs-python) — Python 客户端库本体
- [Ahrefs API 文档](https://docs.ahrefs.com/docs/api/v3/) — 官方 API 文档