# Ahrefs API on SandBase

> Read Ahrefs Site Explorer metrics for any domain: Domain Rating, Ahrefs Rank, organic keywords, organic traffic and traffic value, and paid keywords.

Source: https://www.sandbase.ai/apis/ahrefs

- Endpoints: 38
- Call: `POST https://api.sandbase.ai/v1/api/{vendor}/{endpoint}` with `Authorization: Bearer $SANDBASE_API_KEY` and the parameters as a JSON body
- Billing: pay per call from one SandBase balance; no provider account or subscription needed

## Endpoints

- [Ahrefs Ahrefs Domain Rating](https://www.sandbase.ai/apis/ahrefs/domain-rating.md): $0.08 per call
  Return the Ahrefs Domain Rating (0-100 authority score) and Ahrefs Rank for a target domain on a given date. 4xx/5xx are not charged.
- [Ahrefs Ahrefs Site Metrics](https://www.sandbase.ai/apis/ahrefs/metrics.md): $0.08 per call
  Return core Site Explorer metrics for a target domain on a given date: organic and paid keyword counts, top-3 keyword count, organic traffic, and traffic value. 4xx/5xx are not charged.
- [Ahrefs Batch Analysis Batch Analysis](https://www.sandbase.ai/apis/ahrefs/batch-analysis-batch-analysis.md): From $0.013545 per call
  Get Domain Rating, backlinks, and traffic metrics for up to 100 targets at once.
- [Ahrefs Keywords Explorer Matching Terms](https://www.sandbase.ai/apis/ahrefs/keywords-explorer-matching-terms.md): From $0.01419 per call
  Find keyword ideas containing seed terms, with volume and difficulty.
- [Ahrefs Keywords Explorer Overview](https://www.sandbase.ai/apis/ahrefs/keywords-explorer-overview.md): From $0.02709 per call
  Get volume, difficulty, traffic potential, intent, and CPC for up to 100 keywords.
- [Ahrefs Keywords Explorer Related Terms](https://www.sandbase.ai/apis/ahrefs/keywords-explorer-related-terms.md): From $0.01419 per call
  Find keywords related to seed terms, with volume and difficulty.
- [Ahrefs Keywords Explorer Search Suggestions](https://www.sandbase.ai/apis/ahrefs/keywords-explorer-search-suggestions.md): From $0.00774 per call
  Get autocomplete-style keyword suggestions for seeds, with volume and CPC.
- [Ahrefs Keywords Explorer Volume By Country](https://www.sandbase.ai/apis/ahrefs/keywords-explorer-volume-by-country.md): From $0.007095 per call
  Split a keyword's search volume across countries.
- [Ahrefs Keywords Explorer Volume History](https://www.sandbase.ai/apis/ahrefs/keywords-explorer-volume-history.md): From $0.00129 per call
  Track a keyword's monthly search volume over time in one country.
- [Ahrefs Serp Overview Serp Overview](https://www.sandbase.ai/apis/ahrefs/serp-overview-serp-overview.md): From $0.0129 per call
  Get the top organic results for a keyword with ratings, backlinks, and traffic.
- [Ahrefs Site Explorer Ai Responses Count](https://www.sandbase.ai/apis/ahrefs/site-explorer-ai-responses-count.md): From $0.087075 per call
  Count how often eight AI assistants cite a target in generated answers.
- [Ahrefs Site Explorer All Backlinks](https://www.sandbase.ai/apis/ahrefs/site-explorer-all-backlinks.md): From $0.00645 per call
  List a target's backlinks with anchors, source ratings, and link attributes.
- [Ahrefs Site Explorer Anchors](https://www.sandbase.ai/apis/ahrefs/site-explorer-anchors.md): From $0.005805 per call
  Break down a target's backlinks by anchor text with referring-domain counts.
- [Ahrefs Site Explorer Backlinks Stats](https://www.sandbase.ai/apis/ahrefs/site-explorer-backlinks-stats.md): From $0.00774 per call
  Get a target's live and all-time backlink and referring-domain totals.
- [Ahrefs Site Explorer Broken Backlinks](https://www.sandbase.ai/apis/ahrefs/site-explorer-broken-backlinks.md): From $0.005805 per call
  List backlinks pointing at a target's broken (non-200) pages.
- [Ahrefs Site Explorer Crawled Pages](https://www.sandbase.ai/apis/ahrefs/site-explorer-crawled-pages.md): From $0.00645 per call
  List a target's pages known to the crawler with URL Rating and HTTP codes.
- [Ahrefs Site Explorer Domain Rating](https://www.sandbase.ai/apis/ahrefs/site-explorer-domain-rating.md): From $0.00129 per call
  Get a target's Domain Rating (0-100 link authority) and its global rank.
- [Ahrefs Site Explorer Domain Rating History](https://www.sandbase.ai/apis/ahrefs/site-explorer-domain-rating-history.md): From $0.00129 per call
  Track a target's Domain Rating over time, one row per date bucket.
- [Ahrefs Site Explorer Keywords History](https://www.sandbase.ai/apis/ahrefs/site-explorer-keywords-history.md): From $0.00387 per call
  Track a target's ranking keyword counts by position bucket over time.
- [Ahrefs Site Explorer Linked Anchors External](https://www.sandbase.ai/apis/ahrefs/site-explorer-linked-anchors-external.md): From $0.003225 per call
  Break down a target's outbound external links by anchor text.
- [Ahrefs Site Explorer Linked Anchors Internal](https://www.sandbase.ai/apis/ahrefs/site-explorer-linked-anchors-internal.md): From $0.00258 per call
  Break down a target's internal links by anchor text.
- [Ahrefs Site Explorer Linkeddomains](https://www.sandbase.ai/apis/ahrefs/site-explorer-linkeddomains.md): From $0.00258 per call
  List domains a target links out to, with link and page counts.
- [Ahrefs Site Explorer Metrics](https://www.sandbase.ai/apis/ahrefs/site-explorer-metrics.md): From $0.02838 per call
  Get a target's organic and paid keywords, traffic, and cost estimates.
- [Ahrefs Site Explorer Metrics By Country](https://www.sandbase.ai/apis/ahrefs/site-explorer-metrics-by-country.md): From $0.014835 per call
  Split a target's organic and paid keywords and traffic by country.
- [Ahrefs Site Explorer Metrics History](https://www.sandbase.ai/apis/ahrefs/site-explorer-metrics-history.md): From $0.013545 per call
  Track a target's organic and paid traffic estimates over time.
- [Ahrefs Site Explorer Organic Competitors](https://www.sandbase.ai/apis/ahrefs/site-explorer-organic-competitors.md): From $0.00903 per call
  Find domains competing with a target in organic search, with keyword overlap.
- [Ahrefs Site Explorer Organic Keywords](https://www.sandbase.ai/apis/ahrefs/site-explorer-organic-keywords.md): From $0.01548 per call
  List keywords a target ranks for with position, volume, and traffic estimates.
- [Ahrefs Site Explorer Outlinks Stats](https://www.sandbase.ai/apis/ahrefs/site-explorer-outlinks-stats.md): From $0.00258 per call
  Get a target's outbound link totals: external, internal, and dofollow counts.
- [Ahrefs Site Explorer Pages By Backlinks](https://www.sandbase.ai/apis/ahrefs/site-explorer-pages-by-backlinks.md): From $0.00516 per call
  List a target's pages ordered by backlink and referring-domain counts.
- [Ahrefs Site Explorer Pages By Internal Links](https://www.sandbase.ai/apis/ahrefs/site-explorer-pages-by-internal-links.md): From $0.001935 per call
  List a target's pages ordered by incoming internal link counts.
- [Ahrefs Site Explorer Pages By Traffic](https://www.sandbase.ai/apis/ahrefs/site-explorer-pages-by-traffic.md): From $0.03612 per call
  Bucket a target's pages into organic-traffic ranges with totals per range.
- [Ahrefs Site Explorer Pages History](https://www.sandbase.ai/apis/ahrefs/site-explorer-pages-history.md): From $0.00129 per call
  Track how many of a target's pages rank in organic search over time.
- [Ahrefs Site Explorer Paid Pages](https://www.sandbase.ai/apis/ahrefs/site-explorer-paid-pages.md): From $0.008385 per call
  List a target's paid-search landing pages with traffic and ad counts.
- [Ahrefs Site Explorer Refdomains](https://www.sandbase.ai/apis/ahrefs/site-explorer-refdomains.md): From $0.00387 per call
  List domains linking to a target with Domain Rating and link counts.
- [Ahrefs Site Explorer Refdomains History](https://www.sandbase.ai/apis/ahrefs/site-explorer-refdomains-history.md): From $0.00387 per call
  Track a target's referring-domain count over time.
- [Ahrefs Site Explorer Top Pages](https://www.sandbase.ai/apis/ahrefs/site-explorer-top-pages.md): From $0.014835 per call
  List a target's pages by estimated organic traffic and top keyword.
- [Ahrefs Site Explorer Total Search Volume History](https://www.sandbase.ai/apis/ahrefs/site-explorer-total-search-volume-history.md): From $0.007095 per call
  Track total search volume of keywords a target ranks for over time.
- [Ahrefs Site Explorer Url Rating History](https://www.sandbase.ai/apis/ahrefs/site-explorer-url-rating-history.md): From $0.00129 per call
  Track a target URL's rating over time, one row per date bucket.

## Use it through SandBase

- Base URL: `https://api.sandbase.ai/v1`, with `Authorization: Bearer $SANDBASE_API_KEY`.
- Language models use the OpenAI-compatible `POST /v1/chat/completions`; media models use `POST /v1/run`; data APIs use `POST /v1/api/{vendor}/{endpoint}`.
- AI agents can connect through the SandBase MCP server or CLI: https://www.sandbase.ai/skill.md
- Every model and API page has a Markdown twin at the same URL plus `.md`. Full index: https://www.sandbase.ai/llms.txt
