Backlink Checker and Keyword Research API - Ahrefs SEO Data avatar

Backlink Checker and Keyword Research API - Ahrefs SEO Data

Pricing

from $20.00 / 1,000 domain overview returneds

Go to Apify Store
Backlink Checker and Keyword Research API - Ahrefs SEO Data

Backlink Checker and Keyword Research API - Ahrefs SEO Data

Backlink checker and keyword research with the Ahrefs API v3: Domain Rating, backlinks, referring domains, anchors, organic keywords, top pages, competitors, keyword volume, KD, CPC, keyword ideas and SERP overview. Bring your own Ahrefs API key.

Pricing

from $20.00 / 1,000 domain overview returneds

Rating

0.0

(0)

Developer

Nabeel Hassan

Nabeel Hassan

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 days ago

Last modified

Share

Check backlinks, Domain Rating and organic traffic for any site, and research keyword volume, difficulty and SERPs, with your own Ahrefs API key, exported to clean JSON, CSV or Excel rows.

Works with the Ahrefs API v3 (api.ahrefs.com/v3), the API behind Ahrefs Site Explorer, Keywords Explorer and SERP Overview. Paste a list of domains, URLs or keywords and get deduplicated rows you can schedule, diff over time, or feed into SEO dashboards, link building prospect lists, content planning, client reports, spreadsheets and AI agents. Bring your own API key.

BYOK, not live-tested: every route, parameter, filter field and column comes from Ahrefs' official OpenAPI document (docs.ahrefs.com/openapi.json), and the route paths were confirmed against the live host, but the actor has not been run with a real Ahrefs key.

What it does

  • Domain overview: Domain Rating (DR), Ahrefs Rank, live and all-time backlinks, live and all-time referring domains, organic keywords (all and top 3), organic traffic and traffic value, paid keywords and traffic, in one row per domain or URL.
  • Domain Rating only: bulk DR and Ahrefs Rank checker at the lowest Ahrefs unit cost (one request per target).
  • Backlinks: referring page URL, target URL, title, anchor text, source DR and UR, dofollow or nofollow, link type, first seen, lost date and lost reason. Filter by minimum DR, dofollow only, live or lost links, and grouping (similar links, one per domain, all).
  • Referring domains: each linking domain with its DR, organic traffic, links to the target, dofollow links, new and lost links, spam flag and first and last seen dates.
  • Anchors: anchor text distribution with referring domains, referring pages and links per anchor.
  • Organic keywords: the keywords a site or URL ranks for in a country, with position, ranking URL, search volume, Keyword Difficulty (KD), traffic, CPC and SERP features. Filter by volume, KD and position.
  • Top pages: a site's pages by organic traffic, with traffic value, ranking keywords, top keyword and its position, referring domains and UR.
  • Organic competitors: domains competing for the same keywords, with common keywords, share, DR, traffic and traffic value.
  • Keyword metrics (Keywords Explorer overview): search volume, global volume, KD, CPC, clicks per search, traffic potential, parent topic, search intent and SERP features for up to 1,000 keywords per run.
  • Keyword ideas: matching terms (all or questions, any order or exact phrase) and related terms (also rank for, also talk about) from seed keywords.
  • SERP overview: the top results for each keyword with position, URL, title, result type, DR, UR, backlinks, referring domains, traffic and traffic value.
  • API units and limits: your key's unit allowance, usage and reset date, free of Ahrefs units and free of actor charges.
  • Pay only for results: refused and empty lookups are recorded as a free row that says why, never charged.

How to get an API key

Ahrefs API v3 is included on eligible paid Ahrefs plans (see ahrefs.com/pricing); other paid plans can still run the free test queries. A workspace owner or admin creates a key in Account settings, API keys (app.ahrefs.com/account/api-keys), and can cap the monthly units each key may spend there. Paste the key into the API key field, or set the DATA_API_KEY environment secret. This actor never ships a shared key.

Ahrefs API units: what a run costs you

Ahrefs bills your workspace in API units, separately from this actor. Each request costs max(50, rows x per-row units), where the per-row cost is the sum of the selected and filtered columns (1, 5 or 10 units each). Units are not refunded. The columns this actor selects cost, per row:

ModeUnits per rowRequests
Domain overview50 minimum per request3 per target (about 150 units)
Domain Rating50 minimum1 per target
Backlinks121 per target
Referring domains191 per target
Anchors111 per target
Organic keywords371 per target
Top pages311 per target
Organic competitors271 per target
Keyword metrics581 per 100 keywords
Matching terms, related terms551 per run
SERP overview351 per keyword
API units and limitsfree1

Filters add their column's cost when it is not already selected. maxResults is sent as the Ahrefs limit, so the default of 100 rows keeps a backlinks run near 1,200 units. The run log reports the units Ahrefs says it consumed. Free test queries spend nothing: targets ahrefs.com, yep.com or firehose.com, or the single keywords ahrefs, yep or firehose (Ahrefs caps those at 100 rows).

Input

FieldUsed byWhat it does
modealldomainOverview, domainRating, backlinks, referringDomains, anchors, organicKeywords, topPages, organicCompetitors, keywordMetrics, matchingTerms, relatedTerms, serpOverview or apiUnits
targetsSite Explorer modesDomains or URLs, one per line
keywordsKeywords Explorer, SERP overviewKeywords, one per line
countrymost modesTwo-letter market (default us); all for Site Explorer metrics across countries
scopeSite Explorer modessubdomains (default), domain, prefix or exact
protocolSite Explorer modesboth (default), http or https
dateoverview, DR, keyword and page reportsReport date, YYYY-MM-DD (default today, UTC)
volumeModeoverview, keyword and page reportsmonthly (default) or average
linkHistory, historySincelink reportslive (default), all_time, or since a date
backlinkGroupingbacklinkssimilar_links (default), 1_per_domain or all
dofollowOnly, minDomainRatingbacklinks, referring domainsDofollow only, minimum DR
minVolume, maxDifficultyorganic keywords, keyword ideasMinimum search volume, maximum KD
maxPositionorganic keywordsBest position at or above this
matchingTermsType, matchModematching termsall or questions; terms or phrase
relatedTermsType, relatedViewForrelated termsall, also_rank_for or also_talk_about; top_10 or top_100
topPositionsSERP overviewTop organic positions per keyword
maxResultsallRow ceiling for the run and the Ahrefs limit (default 100)
requestsPerMinuteallPacing (default 50; Ahrefs allows 60 a minute)
apiKeyallYour Ahrefs API v3 key, stored as a secret

Each endpoint only receives the parameters its documentation lists; an input that belongs to another mode is left off with a warning. Reports are ordered so the row cap keeps the strongest rows: backlinks and referring domains by DR, anchors by referring domains, keywords and pages by traffic, competitors by common keywords, keyword ideas by volume.

Example input, the strongest dofollow backlinks to a blog:

{
"mode": "backlinks",
"targets": ["ahrefs.com/blog"],
"scope": "prefix",
"linkHistory": "live",
"backlinkGrouping": "1_per_domain",
"dofollowOnly": true,
"minDomainRating": 50,
"maxResults": 100
}

Example output

An organic keyword row. The common columns come first; every selected Ahrefs field follows unchanged (money in USD cents, as Ahrefs returns it), with USD copies in cpcUsd and trafficValueUsd.

{
"mode": "organicKeywords",
"recordType": "organicKeyword",
"identifier": "ahrefs.com",
"found": true,
"domain": null,
"url": "https://ahrefs.com/backlink-checker",
"keyword": "backlink checker",
"domainRating": null,
"position": 1,
"volume": 45000,
"traffic": 21000,
"difficulty": 87,
"cpcUsd": 4.5,
"trafficValueUsd": null,
"note": null,
"best_position": 1,
"best_position_url": "https://ahrefs.com/backlink-checker",
"keyword_difficulty": 87,
"sum_traffic": 21000,
"cpc": 450,
"serp_features": ["sitelink", "question"],
"keyword_country": "us",
"last_update": "2026-10-11T07:15:00Z"
}

The numbers above are illustrative. A domain overview row adds ahrefs_rank, backlinks_live, backlinks_all_time, refdomains_live, refdomains_all_time, org_keywords, org_keywords_1_3, org_traffic, org_cost, paid_keywords, paid_pages, paid_traffic and paid_cost. Backlink rows carry url_from, url_to, title, anchor, domain_rating_source, url_rating_source, is_dofollow, is_lost, first_seen_link, last_seen, lost_reason and link_type.

FAQ

What is the Ahrefs API?

Ahrefs API v3 is the official REST API of Ahrefs, the SEO platform known for its backlink index and Domain Rating. It gives programmatic access to Site Explorer (backlinks, referring domains, organic keywords, top pages, competitors), Keywords Explorer (keyword metrics and ideas) and SERP Overview, billed in API units on eligible paid plans.

Do I need my own Ahrefs API key?

Yes. Every request goes out with your own key as a bearer token. A run without a key ends straight away with a message that says where to create one, and nothing is charged.

Use the backlinks mode for individual links, the referring domains mode for one row per linking domain, or the domain overview mode for backlink and referring domain totals. Put the domains or URLs in targets, one per line. Set minDomainRating and dofollowOnly to keep only strong, followed links.

How do I check Domain Rating (DR) for a list of sites?

Use the Domain Rating mode. Each domain is one Ahrefs request of 50 units and one row with its DR (0 to 100) and Ahrefs Rank.

How do I get keyword search volume, KD and CPC from Ahrefs?

Use the keyword metrics mode, put up to 1,000 keywords in keywords and pick the country. Each row has volume, global volume, Keyword Difficulty, CPC, clicks per search, traffic potential, parent topic and intent.

How do I find keyword ideas?

Use matching terms for ideas that contain your seed words (or only questions), and related terms for keywords the top-ranking pages also rank for or talk about. Filter by minimum volume and maximum KD.

What does it cost?

Pay per result: 0.02 USD per domain overview, 0.005 USD per Domain Rating, 0.005 USD per backlink, referring domain or anchor, and 0.01 USD per organic keyword, top page, competitor, keyword metrics row, keyword idea or SERP position. Refused and empty lookups and the API units mode are never charged. Ahrefs bills your API units separately, as shown above.

What happens if my key is wrong or out of units?

A rejected key (HTTP 401), a plan without API access (HTTP 403) or a key or workspace with no units left ends the run cleanly with a status message that explains what to change. Rate limits (HTTP 429) are waited out and retried. A target or keyword Ahrefs refuses becomes a free row with Ahrefs' own words, and the run moves on.

Pricing

EventPriceCharged for
domain-overview0.02 USDEach domain overview (DR, backlinks, referring domains, traffic)
domain-rating0.005 USDEach Domain Rating lookup
link-record0.005 USDEach backlink, referring domain or anchor
search-record0.01 USDEach organic keyword, top page, competitor, keyword, keyword idea or SERP position

Keyword map

backlink checker, backlink checker API, Ahrefs API, Ahrefs API v3, Domain Rating checker, DR checker, bulk DR check, referring domains, anchor text, keyword research API, keyword search volume, keyword difficulty, CPC, keyword ideas, SERP API, SERP overview, organic keywords, top pages, competitor analysis, SEO API, link building, traffic estimation.

Terms and data use

Use of the Ahrefs API is governed by the Ahrefs Terms of Service (ahrefs.com/terms). They grant a limited, non-transferable, non-sublicensable licence for your internal business operations, allow automated access only through the Ahrefs API, and forbid reselling or commercially redistributing Ahrefs data without written consent and using it to build a competing product. Run this actor with your own key, for your own organisation's SEO work, and keep the results for that use. This actor is not affiliated with or endorsed by Ahrefs.