Use Ahrefs in Sim to retrieve domain and backlink metrics, organic keywords, top pages, and ranking data for SEO research and reports. Connect an Ahrefs API key with access to the endpoints you need. API v3 is available on Lite and higher plans ; API units and per-request row limits depend on the plan.
Analyze domain ratings, backlinks, organic keywords, top pages, and more. Requires an Ahrefs API key with access to the selected endpoints; API v3 is available on Lite and higher plans.
Get the Domain Rating (DR) and Ahrefs Rank for a target domain. Domain Rating shows the strength of a website's backlink profile on a scale from 0 to 100.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain to analyze (e.g., example.com) datestring No Date for historical data in YYYY-MM-DD format (defaults to today) apiKeystring Yes Ahrefs API Key
Parameter Type Description domainRatingnumber Domain Rating score (0-100) ahrefsRanknumber Ahrefs Rank - global ranking based on backlink profile strength
Get a one-call organic and paid search overview for a target domain or URL: organic traffic, organic keywords, paid traffic, paid keywords, and estimated traffic cost.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" countrystring No Country code for traffic data. Example: "us", "gb", "de" modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" datestring No Date to report metrics on, in YYYY-MM-DD format (defaults to today) apiKeystring Yes Ahrefs API Key
Parameter Type Description metricsobject Organic and paid search overview ↳ organicTraffic number Estimated monthly organic traffic ↳ organicKeywords number Number of organic keywords ranked ↳ organicKeywordsTop3 number Number of organic keywords ranking in positions 1-3 ↳ organicCost number Estimated monthly cost to replicate organic traffic via ads (USD) ↳ paidTraffic number Estimated monthly paid search traffic ↳ paidKeywords number Number of paid keywords targeted ↳ paidPages number Number of pages receiving paid traffic ↳ paidCost number Estimated monthly paid search spend (USD)
Get a list of backlinks pointing to a target domain or URL. Returns details about each backlink including source URL, anchor text, and domain rating.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" or "https://example.com/page " modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" historystring No Historical scope: "live" (currently live backlinks), "all_time" (default, includes lost backlinks), or "since:YYYY-MM-DD" (backlinks found since a date). limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description backlinksarray List of backlinks pointing to the target ↳ urlFrom string The URL of the page containing the backlink ↳ urlTo string The URL being linked to ↳ anchor string The anchor text of the link ↳ domainRatingSource number Domain Rating of the linking domain ↳ isDofollow boolean Whether the link is dofollow ↳ firstSeen string When the backlink was first discovered ↳ lastVisited string When the backlink was last checked
Get backlink and referring domain totals for a target domain or URL, both currently live and across all time.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" or "https://example.com/page " modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" datestring No Date to report metrics on, in YYYY-MM-DD format (defaults to today) apiKeystring Yes Ahrefs API Key
Parameter Type Description statsobject Backlink and referring domain totals ↳ liveBacklinks number Number of currently live backlinks ↳ liveReferringDomains number Number of currently live referring domains ↳ allTimeBacklinks number Total backlinks ever discovered, including lost ones ↳ allTimeReferringDomains number Total referring domains ever discovered, including lost ones
Get a list of domains that link to a target domain or URL. Returns unique referring domains with their domain rating, backlink counts, and discovery dates.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" or "https://example.com/page " modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" historystring No Historical scope: "live" (currently live), "all_time" (default, includes lost domains), or "since:YYYY-MM-DD" (domains found since a date). limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description referringDomainsarray List of domains linking to the target ↳ domain string The referring domain ↳ domainRating number Domain Rating of the referring domain ↳ backlinks number Total number of backlinks from this domain to the target ↳ dofollowBacklinks number Number of dofollow backlinks from this domain ↳ firstSeen string When the domain was first seen linking ↳ lastVisited string When the domain was last seen linking (null if never re-crawled)
Get a list of broken backlinks pointing to a target domain or URL. Useful for identifying link reclamation opportunities.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" or "https://example.com/page " modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description brokenBacklinksarray List of broken backlinks ↳ urlFrom string The URL of the page containing the broken link ↳ urlTo string The broken URL being linked to ↳ httpCode number HTTP status code of the broken target URL (e.g., 404, 410) ↳ anchor string The anchor text of the link ↳ domainRatingSource number Domain Rating of the linking domain
Get organic keywords that a target domain or URL ranks for in Google search results. Returns keyword details including search volume, ranking position, and estimated traffic.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" or "https://example.com/page " countrystring No Country code for search results. Example: "us", "gb", "de" (default: "us") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" datestring No Date to report metrics on, in YYYY-MM-DD format (defaults to today) limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description keywordsarray List of organic keywords the target ranks for ↳ keyword string The keyword ↳ volume number Monthly search volume ↳ position number Best ranking position for this keyword ↳ url string The URL that ranks at the best position for this keyword ↳ traffic number Estimated monthly organic traffic ↳ keywordDifficulty number Keyword difficulty score (0-100)
Get domains that compete with a target domain or URL for the same organic keywords, ranked by keyword overlap.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" countrystring No Country code for search results. Example: "us", "gb", "de" (default: "us") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" datestring No Date to report metrics on, in YYYY-MM-DD format (defaults to today) limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description competitorsarray List of organic search competitors ranked by keyword overlap ↳ domain string The competitor domain ↳ domainRating number Domain Rating of the competitor ↳ commonKeywords number Number of keywords the competitor and target both rank for ↳ targetKeywords number Number of keywords the target ranks for ↳ competitorKeywords number Number of keywords the competitor ranks for ↳ traffic number Estimated monthly organic traffic for the competitor
Get the top pages of a target domain sorted by organic traffic. Returns page URLs with their traffic, keyword counts, and estimated traffic value.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain to analyze. Example: "example.com" countrystring No Country code for traffic data. Example: "us", "gb", "de" (default: "us") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match). Example: "domain" datestring No Date to report metrics on, in YYYY-MM-DD format (defaults to today) limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description pagesarray List of top pages by organic traffic ↳ url string The page URL ↳ traffic number Estimated monthly organic traffic ↳ keywords number Number of keywords the page ranks for ↳ topKeyword string The top keyword driving traffic to this page ↳ value number Estimated traffic value in USD
Get detailed metrics for a keyword including search volume, keyword difficulty, CPC, clicks, and traffic potential.
Inputs and outputsParameter Type Required Description keywordstring Yes The keyword to analyze countrystring No Country code for keyword data. Example: "us", "gb", "de" (default: "us") apiKeystring Yes Ahrefs API Key
Parameter Type Description overviewobject Keyword metrics overview ↳ keyword string The analyzed keyword ↳ searchVolume number Monthly search volume ↳ keywordDifficulty number Keyword difficulty score (0-100) ↳ cpc number Cost per click in USD ↳ clicks number Estimated clicks per month ↳ clicksPercentage number Percentage of searches that result in an organic click ↳ parentTopic string The parent topic for this keyword ↳ trafficPotential number Estimated traffic potential if ranking #1 ↳ intents object Search intent flags (informational, navigational, commercial, transactional, branded, local) ↳ informational boolean Query seeks information ↳ navigational boolean Query seeks a specific site or page ↳ commercial boolean Query researches a purchase decision ↳ transactional boolean Query intends to complete a purchase ↳ branded boolean Query references a specific brand ↳ local boolean Query seeks local results
Get a target domain's pages that receive paid search traffic, sorted by estimated paid traffic. Returns page URLs with their paid traffic, keyword counts, and estimated spend.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" countrystring No Country code for traffic data. Example: "us", "gb", "de" (default: "us") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match) datestring No Date to report metrics on, in YYYY-MM-DD format (defaults to today) limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description paidPagesarray List of pages receiving paid search traffic ↳ url string The page URL ↳ traffic number Estimated monthly paid search traffic ↳ keywords number Number of paid keywords the page ranks for ↳ topKeyword string The top keyword driving paid traffic to this page ↳ value number Estimated monthly paid traffic cost in USD ↳ adsCount number Number of unique ads shown for this page
Get the anchor text distribution for a target domain or URL's backlinks, showing how many links and referring domains use each anchor text.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" or "https://example.com/page " modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match) historystring No Historical scope: "live" (currently live), "all_time" (default, includes lost backlinks), or "since:YYYY-MM-DD" (backlinks found since a date) limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description anchorsarray Anchor text distribution for the backlink profile ↳ anchor string The anchor text ↳ backlinks number Total backlinks using this anchor text ↳ dofollowBacklinks number Number of dofollow backlinks using this anchor text ↳ referringDomains number Number of unique referring domains using this anchor text ↳ firstSeen string When a link with this anchor was first found ↳ lastSeen string When a backlink with this anchor was last seen (null if still live)
Get keyword ideas related to a seed keyword: terms the same top-ranking pages also rank for ("also rank for") or also discuss ("also talk about"), with volume, difficulty, and CPC.
Inputs and outputsParameter Type Required Description keywordstring Yes The seed keyword to find related terms for countrystring No Country code for keyword data. Example: "us", "gb", "de" (default: "us") termsstring No Type of related keywords to return: "also_rank_for", "also_talk_about", or "all" (default: "all") viewForstring No Whether to derive related terms from the top 10 or top 100 ranking pages (default: "top_10") limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description relatedTermsarray Related keyword ideas for the seed keyword ↳ keyword string The related keyword ↳ volume number Average monthly search volume ↳ keywordDifficulty number Keyword difficulty score (0-100) ↳ cpc number Cost per click in USD ↳ parentTopic string The parent topic for this keyword ↳ trafficPotential number Estimated traffic potential if ranking #1 ↳ intents object Search intent flags (informational, navigational, commercial, transactional, branded, local) ↳ serpFeatures array SERP features present in the results
Get the historical Domain Rating (DR) trend for a target domain or URL over a date range, grouped daily, weekly, or monthly.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" dateFromstring Yes Start date of the historical period, in YYYY-MM-DD format dateTostring No End date of the historical period, in YYYY-MM-DD format (defaults to today) historyGroupingstring No Time interval for grouping data points: "daily", "weekly", or "monthly" (default: "monthly") apiKeystring Yes Ahrefs API Key
Parameter Type Description domainRatingsarray Historical Domain Rating data points ↳ date string The date of the measurement ↳ domainRating number Domain Rating score (0-100) on this date
Get the historical organic and paid traffic trend for a target domain or URL over a date range: organic traffic/cost and paid traffic/cost at each point in time.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" dateFromstring Yes Start date of the historical period, in YYYY-MM-DD format dateTostring No End date of the historical period, in YYYY-MM-DD format (defaults to today) volumeModestring No Search volume calculation: "monthly" or "average" (default: "monthly") historyGroupingstring No Time interval for grouping data points: "daily", "weekly", or "monthly" (default: "monthly") countrystring No Country code for traffic data. Example: "us", "gb", "de" (default: "us") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match) apiKeystring Yes Ahrefs API Key
Parameter Type Description metricsHistoryarray Historical organic and paid traffic data points ↳ date string Date of the metric entry ↳ organicTraffic number Estimated monthly organic visits ↳ organicCost number Estimated monthly cost to replicate organic traffic via ads (USD) ↳ paidTraffic number Estimated monthly paid search visits ↳ paidCost number Estimated monthly paid search spend (USD)
Get the historical referring domains trend for a target domain or URL over a date range, grouped daily, weekly, or monthly.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" dateFromstring Yes Start date of the historical period, in YYYY-MM-DD format dateTostring No End date of the historical period, in YYYY-MM-DD format (defaults to today) historyGroupingstring No Time interval for grouping data points: "daily", "weekly", or "monthly" (default: "monthly") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match) apiKeystring Yes Ahrefs API Key
Parameter Type Description referringDomainsHistoryarray Historical referring domains count data points ↳ date string The date of the data point ↳ referringDomains number Total number of unique domains linking to the target on this date
Get the historical organic keyword ranking distribution for a target domain or URL over a date range: how many keywords rank in each position bucket at each point in time.
Inputs and outputsParameter Type Required Description targetstring Yes The target domain or URL to analyze. Example: "example.com" dateFromstring Yes Start date of the historical period, in YYYY-MM-DD format dateTostring No End date of the historical period, in YYYY-MM-DD format (defaults to today) historyGroupingstring No Time interval for grouping data points: "daily", "weekly", or "monthly" (default: "monthly") countrystring No Country code for search results. Example: "us", "gb", "de" (default: "us") modestring No Analysis mode: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match) apiKeystring Yes Ahrefs API Key
Parameter Type Description keywordsHistoryarray Historical organic keyword ranking distribution ↳ date string Date of the record ↳ top3 number Keywords ranking in top 3 organic results ↳ top4To10 number Keywords ranking in positions 4-10 ↳ top11To20 number Keywords ranking in positions 11-20 ↳ top21To50 number Keywords ranking in positions 21-50 ↳ top51Plus number Keywords ranking in position 51 and beyond
Get bulk SEO metrics (Domain Rating, backlinks, referring domains, organic traffic, and more) for multiple domains or URLs in a single request. Useful for comparing many competitors at once.
Inputs and outputsParameter Type Required Description targetsstring Yes Comma-separated list of domains or URLs to analyze. Example: "example.com,competitor.com" modestring No Analysis mode applied to every target: domain (entire domain), prefix (URL prefix), subdomains (include all subdomains, default), exact (exact URL match) protocolstring No Protocol applied to every target: "both" (default), "http", or "https" countrystring No Country code for traffic data. Example: "us", "gb", "de" (default: "us") volumeModestring No Search volume calculation: "monthly" or "average" (default: "monthly") apiKeystring Yes Ahrefs API Key
Parameter Type Description resultsarray Bulk metrics for each analyzed target, in submission order ↳ url string The analyzed target URL or domain ↳ index number Index of the target in the submitted list ↳ domainRating number Domain Rating score (0-100) ↳ ahrefsRank number Ahrefs Rank (global ranking) ↳ backlinks number Total backlinks to the target ↳ referringDomains number Unique domains linking to the target ↳ organicTraffic number Estimated monthly organic traffic ↳ organicKeywords number Number of organic keywords ranked (top 100) ↳ paidTraffic number Estimated monthly paid search traffic ↳ error string Error message if this target could not be analyzed
Get crawled pages from an Ahrefs Site Audit project with health and SEO metrics: HTTP status, title, link counts, backlinks, indexability, and traffic. Optionally filter to pages affected by a specific issue.
Inputs and outputsParameter Type Required Description projectIdnumber Yes The Site Audit project ID (found in the project URL in Ahrefs) datestring No Crawl date in YYYY-MM-DDThh:mm:ss format (defaults to the most recent crawl) limitnumber No Maximum number of results to return. Example: 50 (default: 1000) offsetnumber No Number of results to skip, for pagination issueIdstring No Only return pages affected by this issue ID apiKeystring Yes Ahrefs API Key
Parameter Type Description auditPagesarray List of crawled pages with health and SEO metrics ↳ url string The crawled page URL ↳ httpCode number HTTP status code returned by the URL ↳ title array Page title tag(s) ↳ internalLinks number Number of internal outgoing links ↳ externalLinks number Number of external outgoing links ↳ backlinks number Number of incoming external links to the page ↳ compliant boolean Whether the page is indexable (200 status, no canonical/noindex) ↳ traffic number Estimated monthly organic traffic to the page
Get ranking overview metrics for the keywords tracked in an Ahrefs Rank Tracker project: position, search volume, keyword difficulty, and estimated traffic. This endpoint is free and does not consume API units.
Inputs and outputsParameter Type Required Description projectIdnumber Yes The Rank Tracker project ID (found in the project URL in Ahrefs) datestring Yes Date to report rankings for, in YYYY-MM-DD format devicestring Yes Rankings device type: "desktop" or "mobile" dateComparedstring No Comparison date in YYYY-MM-DD format, to compute position/traffic deltas volumeModestring No Search volume calculation: "monthly" or "average" (default: "monthly") limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description overviewsarray Ranking overview for each tracked keyword ↳ keyword string The tracked keyword ↳ position number Top organic search position ↳ volume number Average monthly search volume ↳ keywordDifficulty number Keyword difficulty score (0-100) ↳ url string Top-ranking URL ↳ traffic number Estimated monthly organic visits ↳ serpFeatures array SERP features present in the results ↳ bestPositionKind string Type of the top position (organic, paid, or SERP feature)
Get the full SERP (search engine results page) for a keyword tracked in an Ahrefs Rank Tracker project, including every ranking URL with its position, title, and authority metrics. This endpoint is free and does not consume API units.
Inputs and outputsParameter Type Required Description projectIdnumber Yes The Rank Tracker project ID (found in the project URL in Ahrefs) keywordstring Yes The tracked keyword to retrieve SERP data for countrystring Yes Country code for the tracked keyword. Example: "us", "gb", "de" devicestring Yes Rankings device type: "desktop" or "mobile" topPositionsnumber No Number of top organic positions to return (defaults to all available) datestring No Timestamp to return the last available SERP Overview at, in YYYY-MM-DDThh:mm:ss format locationIdnumber No Location ID of the tracked keyword, if tracked at a specific location languageCodestring No Language code of the tracked keyword apiKeystring Yes Ahrefs API Key
Parameter Type Description positionsarray Every ranking result on the SERP for the tracked keyword ↳ position number Position of the result in the SERP ↳ url string URL of the ranking page ↳ title string Page title ↳ type array The kind of the position: organic, paid, or a SERP feature ↳ domainRating number Domain Rating of the ranking domain ↳ urlRating number URL Rating of the ranking page ↳ backlinks number Total backlinks to the ranking domain ↳ refdomains number Unique referring domains ↳ traffic number Estimated monthly organic search traffic ↳ value number Estimated monthly traffic value (USD) ↳ topKeyword string Highest-traffic keyword ranking for this page ↳ topKeywordVolume number Monthly search volume for the top keyword ↳ updateDate string Date the SERP was last checked
Get competitor rankings for the keywords tracked in an Ahrefs Rank Tracker project: each tracked keyword's volume and difficulty alongside every competitor's position, traffic, and traffic value. This endpoint is free and does not consume API units.
Inputs and outputsParameter Type Required Description projectIdnumber Yes The Rank Tracker project ID (found in the project URL in Ahrefs) datestring Yes Date to report rankings for, in YYYY-MM-DD format devicestring Yes Rankings device type: "desktop" or "mobile" dateComparedstring No Comparison date in YYYY-MM-DD format, to compute position/traffic deltas volumeModestring No Search volume calculation: "monthly" or "average" (default: "monthly") limitnumber No Maximum number of results to return. Example: 50 (default: 1000) apiKeystring Yes Ahrefs API Key
Parameter Type Description competitorKeywordsarray Tracked keywords with competitor ranking data ↳ keyword string The tracked keyword ↳ volume number Average monthly search volume ↳ keywordDifficulty number Keyword difficulty score (0-100) ↳ serpFeatures array SERP features present in the results ↳ competitorsList array Ranking data for each tracked competitor on this keyword ↳ url string The competitor's ranking URL ↳ position number Current ranking position ↳ bestPositionKind string Type of the best position achieved ↳ traffic number Estimated traffic to the competitor ↳ value number Estimated traffic value (USD)
Get aggregate competitor stats for an Ahrefs Rank Tracker project: each competitor's traffic, traffic value, average position, and share of voice across all tracked keywords. This endpoint is free and does not consume API units.
Inputs and outputsParameter Type Required Description projectIdnumber Yes The Rank Tracker project ID (found in the project URL in Ahrefs) datestring Yes Date to report metrics for, in YYYY-MM-DD format devicestring Yes Rankings device type: "desktop" or "mobile" volumeModestring No Search volume calculation: "monthly" or "average" (default: "monthly") apiKeystring Yes Ahrefs API Key
Parameter Type Description competitorsStatsarray Aggregate stats for each tracked competitor ↳ competitor string The competitor's URL ↳ traffic number Estimated monthly organic visits ↳ trafficValue number Estimated monthly organic traffic value (USD) ↳ averagePosition number Average top organic position across tracked keywords ↳ pos1To3 number Keywords ranking in top 3 positions ↳ pos4To10 number Keywords ranking in positions 4-10 ↳ shareOfVoice number Organic traffic share percentage ↳ shareOfTrafficValue number Organic traffic value share percentage