{"skill":{"slug":"ahrefs-connection","displayName":"Ahrefs Connection","summary":"Connect to Ahrefs API to retrieve real-time SEO data including backlinks, keyword metrics, domain analysis, rank tracking, and site audits for SEO insights.","description":"---\nname: ahrefs-mcp\ndescription: >\n  Access Ahrefs SEO data via the Ahrefs API for comprehensive SEO analysis, keyword research, backlink analysis, site audits, and competitive intelligence. Use when users mention: (1) SEO-related queries about websites, domains, or URLs, (2) Keyword research, rankings, or search volume data, (3) Backlink analysis or link profiles, (4) Domain metrics (DR, UR, traffic), (5) Competitor analysis or site comparison, (6) Rank tracking or SERP analysis, (7) Content gap analysis, (8) Site Explorer data requests. When uncertain if a query is SEO-related, ask if Ahrefs should be used.\n---\n\n# Ahrefs API\n\nAccess real-time Ahrefs SEO data directly through the Ahrefs API to analyze websites, research keywords, track rankings, and make data-driven SEO decisions.\n\n## First-Time Setup\n\nIf this is your first time using the Ahrefs API, read [references/setup.md](references/setup.md) for complete setup instructions. You'll need:\n- An Ahrefs account (Enterprise plan for full API access, or Lite+ for limited free test queries)\n- An API key from your Ahrefs workspace\n\nAfter setup, return here for usage guidance.\n\n## Core Capabilities\n\nAhrefs API provides access to:\n\n1. **Site Explorer** - Domain metrics, backlinks, organic traffic, referring domains\n2. **Keywords Explorer** - Search volume, keyword difficulty, SERP analysis, related keywords\n3. **Rank Tracker** - Position tracking, visibility metrics, competitor rankings (requires pre-configured projects)\n4. **Site Audit** - Technical SEO issues, crawl data, site health (requires pre-configured projects)\n5. **SERP Overview** - Top 100 SERP results for any keyword\n6. **Batch Analysis** - Process up to 100 targets per request\n7. **Brand Radar** - Brand performance stats\n\nFor detailed capability reference, see [references/capabilities.md](references/capabilities.md).\n\n## Authentication\n\nAll API requests require an API key passed via the `Authorization` header:\n```bash\nAuthorization: Bearer YOUR_API_KEY\n```\n\nStore your API key securely. Consider using environment variables:\n```bash\nexport AHREFS_API_KEY=\"your-api-key-here\"\n```\n\n## Usage Workflow\n\n### 1. Understand the Request\n\nIdentify what SEO data is needed:\n- **Domain/URL analysis** → Site Explorer endpoints\n- **Keyword data** → Keywords Explorer endpoints\n- **Position tracking** → Rank Tracker endpoints (requires project)\n- **Technical SEO** → Site Audit endpoints (requires project)\n- **SERP data** → SERP Overview endpoints\n\n### 2. Make API Requests\n\nUse `curl` or similar tools to call the Ahrefs API. Base URL: `https://api.ahrefs.com/v3`\n\n**Example - Get domain overview:**\n```bash\ncurl -X GET \"https://api.ahrefs.com/v3/site-explorer/domain-overview?target=example.com\" \\\n  -H \"Authorization: Bearer $AHREFS_API_KEY\"\n```\n\n**Example - Keyword metrics:**\n```bash\ncurl -X GET \"https://api.ahrefs.com/v3/keywords-explorer/overview?keyword=seo+tools&country=us\" \\\n  -H \"Authorization: Bearer $AHREFS_API_KEY\"\n```\n\n### 3. Process and Present Results\n\n- Parse JSON responses\n- Extract relevant metrics\n- Present data in clear, actionable formats\n- Highlight key insights and opportunities\n- Suggest next steps based on findings\n\n## Common Workflows\n\n### Keyword Research + Cross-Reference\n\n1. User provides keyword list\n2. Make batch API calls to Keywords Explorer\n3. Parse and consolidate metrics (volume, difficulty, CPC)\n4. Present analysis with prioritization recommendations\n\nSee [references/workflows.md](references/workflows.md) for detailed workflow patterns with example API calls.\n\n### Competitive Analysis\n\n1. Identify target domain and competitors\n2. Call Site Explorer for each domain\n3. Compare metrics (DR, organic traffic, referring domains)\n4. Analyze top organic keywords\n5. Identify content gaps\n6. Provide actionable recommendations\n\n### Site Audit Review\n\n**Note:** Requires pre-configured Site Audit project in Ahrefs web interface.\n\n1. Call Site Audit API for project data\n2. Identify critical issues by severity\n3. Prioritize fixes by impact\n4. Provide technical recommendations\n\n## API Limits & Best Practices\n\n### Rate Limiting\n- **60 requests per minute** by default\n- API returns HTTP 429 if limit exceeded\n- Implement exponential backoff for retries\n\n### API Unit Consumption\n- Each request consumes API units from your monthly allowance\n- Cost depends on the number of rows returned (minimum 50 units per request)\n- Track usage in **Account settings → Limits and usage**\n- Enterprise plans include units; additional units can be purchased\n\n### Optimization Tips\n- **Batch requests** when possible (up to 100 targets)\n- **Limit result rows** using `limit` parameter\n- **Select specific columns** with `select` parameter to reduce costs\n- **Cache results** when appropriate\n- **Use date ranges** to limit historical data\n\n### Plan-Specific Access\n- **Enterprise**: Full API access\n- **Lite/Standard/Advanced**: Limited free test queries (check your plan for specifics)\n\n## Error Handling\n\nCommon HTTP status codes:\n- `200 OK` - Success\n- `400 Bad Request` - Invalid parameters\n- `401 Unauthorized` - Invalid or missing API key\n- `403 Forbidden` - Insufficient permissions or plan limits\n- `429 Too Many Requests` - Rate limit exceeded\n- `500 Internal Server Error` - Ahrefs server issue\n\nAlways check response status and handle errors gracefully.\n\n## When API Key is Missing\n\nIf the API key is not configured:\n1. Provide setup instructions from [references/setup.md](references/setup.md)\n2. Guide through API key generation in Ahrefs Account settings\n3. Explain how to securely store the key (environment variables recommended)\n4. Test the connection with a simple API call\n\n## Resources\n\n- **API Documentation**: https://docs.ahrefs.com/docs/api/reference/introduction\n- **API Key Management**: https://app.ahrefs.com/account/api-keys\n- **Pricing & Limits**: https://ahrefs.com/pricing\n- **Limits & Usage Tracking**: https://app.ahrefs.com/account/limits-and-usage/web","tags":{"latest":"1.0.1"},"stats":{"comments":0,"downloads":1030,"installsAllTime":1,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1771089025210,"updatedAt":1778491542212},"latestVersion":{"version":"1.0.1","createdAt":1771089025210,"changelog":"Significant update: Skill now uses the native Ahrefs API instead of Model Context Protocol.\n\n- Updated setup and authentication instructions to use Ahrefs API keys, with guidance for secure storage.\n- Expanded core capabilities to include new endpoints such as SERP Overview, Batch Analysis, and Brand Radar.\n- Revised usage workflow with practical API call examples using curl.\n- Clarified API limits, rate limiting, unit consumption, error handling, and plan-specific access.\n- Provided direct links to official Ahrefs API documentation and key management resources.\n- Removed references to MCP and replaced with Ahrefs API terminology and workflows.","license":null},"metadata":null,"owner":{"handle":"jonathan-sokol","userId":"s179q6xr14e5b4qm995jdyw851884f59","displayName":"jonathan-sokol","image":"https://avatars.githubusercontent.com/u/179392854?v=4"},"moderation":null}