Vexaloom Labs

Ahrefs Domain Rating, Backlinks & Traffic Lookup

Look up a domain's public Ahrefs Domain Rating, linking-website count, global rank, and estimated organic traffic, with a mode to fetch just authority or just backlink metrics.

Input schema

Input fields, types, required flags, descriptions, defaults, and prefills come from the published definition. Prefill examples are distinct from defaults.

FieldTypeRequiredDescription
modestringrequiredWhat to fetch. `domain` returns the full public profile; `competitors` returns one row per competitor; `topWebsites` returns the AhrefsTop ranking without needing domains. Legacy values `full`, `authority_only` and `backlinks_only` are accepted and mapped to `domain`, `authority` and `backlinks`.
domainsarrayoptionalDomains or full URLs (mode=domain/authority/backlinks/traffic/competitors). `www` and non-`www` forms are both tried. Duplicates are removed.
includeHistorybooleanoptionalInclude monthly traffic, traffic-value and linking-website history (mode=domain/authority/backlinks/traffic).
Show all input fields
FieldTypeRequiredDescription
modestringrequiredWhat to fetch. `domain` returns the full public profile; `competitors` returns one row per competitor; `topWebsites` returns the AhrefsTop ranking without needing domains. Legacy values `full`, `authority_only` and `backlinks_only` are accepted and mapped to `domain`, `authority` and `backlinks`.
domainsarrayoptionalDomains or full URLs (mode=domain/authority/backlinks/traffic/competitors). `www` and non-`www` forms are both tried. Duplicates are removed.
includeHistorybooleanoptionalInclude monthly traffic, traffic-value and linking-website history (mode=domain/authority/backlinks/traffic).
includeKeywordsbooleanoptionalInclude the top 5 keywords table (mode=domain/traffic).
includeCountriesbooleanoptionalInclude the top 5 traffic countries (mode=domain/traffic).
includeCompetitorsbooleanoptionalInclude the top 5 competing websites on the profile (mode=domain).
maxItemsintegeroptionalHard cap on emitted rows across all requested domains or ranking pages.
topWebsitesCountrystringoptional(mode=topWebsites) Country ranking. `worldwide` uses the global top 1000; any other value uses that country's top 100.
topWebsitesCategorystringoptional(mode=topWebsites) Category filter. Combine with a country for that country's category ranking.
topWebsitesRankingstringoptional(mode=topWebsites) Position ranking or the monthly trending up/down list.
topWebsitesPageintegeroptional(mode=topWebsites) Starting global ranking page (1 = ranks 1-100, 10 = ranks 901-1000). Country, category and trending rankings expose one page only.

Download the published input schema

View complete JSON
{
  "description": "Look up public AhrefsTop profiles, competitor rows and top-website rankings.",
  "properties": {
    "domains": {
      "description": "Domains or full URLs (mode=domain/authority/backlinks/traffic/competitors). `www` and non-`www` forms are both tried. Duplicates are removed.",
      "editor": "stringList",
      "prefill": [
        "wikipedia.org"
      ],
      "title": "Domains",
      "type": "array"
    },
    "includeCompetitors": {
      "default": true,
      "description": "Include the top 5 competing websites on the profile (mode=domain).",
      "prefill": false,
      "title": "Include competitors",
      "type": "boolean"
    },
    "includeCountries": {
      "default": true,
      "description": "Include the top 5 traffic countries (mode=domain/traffic).",
      "prefill": false,
      "title": "Include countries",
      "type": "boolean"
    },
    "includeHistory": {
      "default": true,
      "description": "Include monthly traffic, traffic-value and linking-website history (mode=domain/authority/backlinks/traffic).",
      "prefill": false,
      "title": "Include history",
      "type": "boolean"
    },
    "includeKeywords": {
      "default": true,
      "description": "Include the top 5 keywords table (mode=domain/traffic).",
      "prefill": false,
      "title": "Include keywords",
      "type": "boolean"
    },
    "maxItems": {
      "default": 50,
      "description": "Hard cap on emitted rows across all requested domains or ranking pages.",
      "maximum": 1000,
      "minimum": 1,
      "prefill": 1,
      "title": "Max items",
      "type": "integer"
    },
    "mode": {
      "default": "domain",
      "description": "What to fetch. `domain` returns the full public profile; `competitors` returns one row per competitor; `topWebsites` returns the AhrefsTop ranking without needing domains. Legacy values `full`, `authority_only` and `backlinks_only` are accepted and mapped to `domain`, `authority` and `backlinks`.",
      "editor": "select",
      "enum": [
        "domain",
        "authority",
        "backlinks",
        "traffic",
        "competitors",
        "topWebsites",
        "full",
        "authority_only",
        "backlinks_only"
      ],
      "enumTitles": [
        "Full domain profile",
        "Authority (DR and linking sites)",
        "Backlinks (link summary and history)",
        "Traffic (rank, traffic, keywords, countries)",
        "Competitors (one row per competitor)",
        "Top websites ranking",
        "Legacy: full profile",
        "Legacy: authority only",
        "Legacy: backlinks only"
      ],
      "prefill": "domain",
      "title": "Mode",
      "type": "string"
    },
    "topWebsitesCategory": {
      "default": "all",
      "description": "(mode=topWebsites) Category filter. Combine with a country for that country's category ranking.",
      "editor": "select",
      "enum": [
        "all",
        "arts-and-entertainment",
        "autos-and-vehicles",
        "beauty-and-fitness",
        "books-and-literature",
        "business",
        "computers-and-electronics",
        "finance",
        "food-and-drink",
        "games",
        "health",
        "hobbies-and-leisure",
        "home-and-garden",
        "internet-and-telecom",
        "jobs-and-education",
        "law-and-government",
        "news",
        "social-networks",
        "people-and-society",
        "pets-and-animals",
        "real-estate",
        "reference",
        "science",
        "shopping",
        "sports",
        "travel-and-transportation"
      ],
      "enumTitles": [
        "All categories",
        "Entertainment",
        "Vehicles",
        "Beauty & Fitness",
        "Books & Literature",
        "Business & Industrial",
        "Computers & Electronics",
        "Finance",
        "Food & Drink",
        "Games",
        "Health",
        "Hobbies & Leisure",
        "Home & Garden",
        "Internet & Telecom",
        "Jobs & Education",
        "Law & Government",
        "News",
        "Online Communities",
        "People & Society",
        "Pets & Animals",
        "Real Estate",
        "Reference",
        "Science",
        "Shopping",
        "Sports",
        "Travel"
      ],
      "prefill": "all",
      "title": "Top websites category",
      "type": "string"
    },
    "topWebsitesCountry": {
      "default": "worldwide",
      "description": "(mode=topWebsites) Country ranking. `worldwide` uses the global top 1000; any other value uses that country's top 100.",
      "editor": "select",
      "enum": [
        "worldwide",
        "afghanistan",
        "albania",
        "algeria",
        "andorra",
        "angola",
        "antigua-and-barbuda",
        "argentina",
        "armenia",
        "australia",
        "austria",
        "azerbaijan",
        "bahamas",
        "bahrain",
        "bangladesh",
        "belarus",
        "belgium",
        "belize",
        "benin",
        "bhutan",
        "bolivia",
        "bosnia-and-herzegovina",
        "botswana",
        "brazil",
        "brunei-darussalam",
        "bulgaria",
        "burkina-faso",
        "burundi",
        "cambodia",
        "cameroon",
        "canada",
        "cape-verde",
        "central-african-republic",
        "chad",
        "chile",
        "colombia",
        "congo",
        "congo-democratic-republic",
        "costa-rica",
        "cote-divoire",
        "croatia",
        "cyprus",
        "czech-republic",
        "denmark",
        "djibouti",
        "dominican-republic",
        "ecuador",
        "egypt",
        "el-salvador",
        "estonia",
        "ethiopia",
        "fiji",
        "finland",
        "france",
        "gabon",
        "gambia",
        "georgia",
        "germany",
        "ghana",
        "gibraltar",
        "greece",
        "greenland",
        "guadeloupe",
        "guatemala",
        "guernsey",
        "guyana",
        "haiti",
        "honduras",
        "hong-kong",
        "hungary",
        "iceland",
        "india",
        "indonesia",
        "iraq",
        "ireland",
        "isle-of-man",
        "israel",
        "italy",
        "jamaica",
        "japan",
        "jersey",
        "jordan",
        "kazakhstan",
        "kenya",
        "kuwait",
        "kyrgyzstan",
        "lao-peoples-democratic-republic",
        "latvia",
        "lebanon",
        "lesotho",
        "libyan-arab-jamahiriya",
        "liechtenstein",
        "lithuania",
        "luxembourg",
        "madagascar",
        "malawi",
        "malaysia",
        "maldives",
        "mali",
        "malta",
        "mauritius",
        "mexico",
        "moldova",
        "mongolia",
        "montenegro",
        "morocco",
        "mozambique",
        "myanmar",
        "namibia",
        "nepal",
        "netherlands",
        "new-zealand",
        "nicaragua",
        "niger",
        "nigeria",
        "north-macedonia",
        "norway",
        "oman",
        "pakistan",
        "palestine",
        "panama",
        "papua-new-guinea",
        "paraguay",
        "peru",
        "philippines",
        "poland",
        "portugal",
        "puerto-rico",
        "qatar",
        "romania",
        "russian-federation",
        "rwanda",
        "saint-vincent-and-grenadines",
        "saudi-arabia",
        "senegal",
        "serbia",
        "seychelles",
        "sierra-leone",
        "singapore",
        "slovakia",
        "slovenia",
        "somalia",
        "south-africa",
        "korea",
        "spain",
        "sri-lanka",
        "suriname",
        "sweden",
        "switzerland",
        "taiwan",
        "tajikistan",
        "tanzania",
        "thailand",
        "timor-leste",
        "togo",
        "trinidad-and-tobago",
        "tunisia",
        "turkey",
        "turkmenistan",
        "uganda",
        "ukraine",
        "united-arab-emirates",
        "united-kingdom",
        "united-states",
        "uruguay",
        "uzbekistan",
        "venezuela",
        "vietnam",
        "virgin-islands-us",
        "zambia",
        "zimbabwe"
      ],
      "enumTitles": [
        "Worldwide",
        "Afghanistan",
        "Albania",
        "Algeria",
        "Andorra",
        "Angola",
        "Antigua And Barbuda",
        "Argentina",
        "Armenia",
        "Australia",
        "Austria",
        "Azerbaijan",
        "Bahamas",
        "Bahrain",
        "Bangladesh",
        "Belarus",
        "Belgium",
        "Belize",
        "Benin",
        "Bhutan",
        "Bolivia",
        "Bosnia And Herzegovina",
        "Botswana",
        "Brazil",
        "Brunei Darussalam",
        "Bulgaria",
        "Burkina Faso",
        "Burundi",
        "Cambodia",
        "Cameroon",
        "Canada",
        "Cape Verde",
        "Central African Republic",
        "Chad",
        "Chile",
        "Colombia",
        "Congo",
        "Congo, Democratic Republic of the",
        "Costa Rica",
        "Cote D'Ivoire",
        "Croatia",
        "Cyprus",
        "Czech Republic",
        "Denmark",
        "Djibouti",
        "Dominican Republic",
        "Ecuador",
        "Egypt",
        "El Salvador",
        "Estonia",
        "Ethiopia",
        "Fiji",
        "Finland",
        "France",
        "Gabon",
        "Gambia",
        "Georgia",
        "Germany",
        "Ghana",
        "Gibraltar",
        "Greece",
        "Greenland",
        "Guadeloupe",
        "Guatemala",
        "Guernsey",
        "Guyana",
        "Haiti",
        "Honduras",
        "Hong Kong",
        "Hungary",
        "Iceland",
        "India",
        "Indonesia",
        "Iraq",
        "Ireland",
        "Isle of Man",
        "Israel",
        "Italy",
        "Jamaica",
        "Japan",
        "Jersey",
        "Jordan",
        "Kazakhstan",
        "Kenya",
        "Kuwait",
        "Kyrgyzstan",
        "Lao People's Democratic Republic",
        "Latvia",
        "Lebanon",
        "Lesotho",
        "Libyan Arab Jamahiriya",
        "Liechtenstein",
        "Lithuania",
        "Luxembourg",
        "Madagascar",
        "Malawi",
        "Malaysia",
        "Maldives",
        "Mali",
        "Malta",
        "Mauritius",
        "Mexico",
        "Moldova",
        "Mongolia",
        "Montenegro",
        "Morocco",
        "Mozambique",
        "Myanmar",
        "Namibia",
        "Nepal",
        "Netherlands",
        "New Zealand",
        "Nicaragua",
        "Niger",
        "Nigeria",
        "North Macedonia",
        "Norway",
        "Oman",
        "Pakistan",
        "Palestine, State of",
        "Panama",
        "Papua New Guinea",
        "Paraguay",
        "Peru",
        "Philippines",
        "Poland",
        "Portugal",
        "Puerto Rico",
        "Qatar",
        "Romania",
        "Russian Federation",
        "Rwanda",
        "Saint Vincent And Grenadines",
        "Saudi Arabia",
        "Senegal",
        "Serbia",
        "Seychelles",
        "Sierra Leone",
        "Singapore",
        "Slovakia",
        "Slovenia",
        "Somalia",
        "South Africa",
        "Korea",
        "Spain",
        "Sri Lanka",
        "Suriname",
        "Sweden",
        "Switzerland",
        "Taiwan",
        "Tajikistan",
        "Tanzania",
        "Thailand",
        "Timor-Leste",
        "Togo",
        "Trinidad And Tobago",
        "Tunisia",
        "Turkey",
        "Turkmenistan",
        "Uganda",
        "Ukraine",
        "United Arab Emirates",
        "United Kingdom",
        "United States",
        "Uruguay",
        "Uzbekistan",
        "Venezuela",
        "Vietnam",
        "Virgin Islands, U.S.",
        "Zambia",
        "Zimbabwe"
      ],
      "prefill": "worldwide",
      "title": "Top websites country",
      "type": "string"
    },
    "topWebsitesPage": {
      "default": 1,
      "description": "(mode=topWebsites) Starting global ranking page (1 = ranks 1-100, 10 = ranks 901-1000). Country, category and trending rankings expose one page only.",
      "maximum": 10,
      "minimum": 1,
      "prefill": 1,
      "title": "Top websites page",
      "type": "integer"
    },
    "topWebsitesRanking": {
      "default": "ranking",
      "description": "(mode=topWebsites) Position ranking or the monthly trending up/down list.",
      "editor": "select",
      "enum": [
        "ranking",
        "trending_up",
        "trending_down"
      ],
      "enumTitles": [
        "Ranking",
        "Trending up",
        "Trending down"
      ],
      "prefill": "ranking",
      "title": "Top websites ranking type",
      "type": "string"
    }
  },
  "required": [
    "mode"
  ],
  "schemaVersion": 1,
  "title": "Ahrefs Domain Rating, Backlinks & Traffic Lookup Input",
  "type": "object"
}

Output schema

Published result links and storage locations. This schema is not an exhaustive contract for every field in a dataset record.

FieldTypeRequiredDescription
resultsstringoptionalDataset containing website profiles, competitor rows and top-website ranking rows.

Download the published output schema

View complete JSON
{
  "actorOutputSchemaVersion": 1,
  "description": "One dataset of public AhrefsTop website profiles, competitor rows and top-website rankings, including Domain Rating, traffic, traffic value, keyword counts, top keywords, countries, competitors, similar sites and monthly history.",
  "properties": {
    "results": {
      "description": "Dataset containing website profiles, competitor rows and top-website ranking rows.",
      "template": "{{links.apiDefaultDatasetUrl}}/items",
      "title": "Ahrefs results",
      "type": "string"
    }
  },
  "title": "Ahrefs Domain Rating, Backlinks & Traffic Lookup Output"
}

Dataset schema

Published dataset views and any declared field definitions. A view can select only a subset of the returned record fields.

Download the published dataset schema

View complete JSON
{
  "actorSpecification": 1,
  "views": {
    "overview": {
      "display": {
        "component": "table",
        "properties": {}
      },
      "title": "Ahrefs results",
      "transformation": {
        "fields": [
          "type",
          "domain",
          "sourceDomain",
          "rank",
          "domainRating",
          "organicTraffic"
        ]
      }
    }
  }
}

Key-value schema

Published key-value store definitions, when provided by this build.

This definition is not present in the default published build. See the published README for available documentation.

Published README

Read the full published documentation

Scrape AhrefsTop website profiles — the public pages Ahrefs publishes at ahrefs.com/websites/<domain> — for Domain Rating, linking websites, search traffic, traffic value, keyword counts, top keywords, countries, competitors, similarly ranked sites and monthly history. Six modes cover full profiles, lean authority/backlink/traffic subsets, nine competitor cards per domain, and the AhrefsTop global, country and category rankings. No Ahrefs account, cookie or API key is needed.

What this actor does

  • Six modes: domain, authority, backlinks, traffic, competitors, topWebsites
  • Full public profile: Domain Rating, linking websites and their monthly change, site title and description, global/country/category ranks and changes, organic traffic, traffic value, keyword count and the data month
  • Deeper sections: top 5 keywords, top 5 traffic countries, top 5 competing websites, similarly ranked sites, and monthly traffic/value plus linking-website history (typically 10+ years)
  • Competitor rows: one flat row per competitor card with description, ranks, traffic, traffic value, pages and Domain Rating
  • Rankings: the global top 1000 (100 rows per page), country and category top 100 lists, combined country + category lists, and monthly trending up/down
  • Safe inputs and output: www and non-www hosts are both tried, duplicate domains are removed, every request is capped by maxItems, and empty fields are omitted instead of written as null

Output per website record

Used by domain, authority, backlinks and traffic. Each mode returns its own subset.

  • type — always ahrefs_website_stats
  • domain — the normalised domain or host you requested
  • resolvedDomain — the exact host AhrefsTop served
  • sourceUrl — the public Ahrefs page the record came from
  • scrapedAt — ISO 8601 collection timestamp
  • notFound — true when AhrefsTop has no page for either host form
  • fetchError — a short failure reason (HTTP 403, HTTP 429, timeout, network) when no page could be read; no metrics are invented
  • domainRating — Domain Rating (0–100)
  • linkingWebsites / linkingWebsitesText — distinct linking websites, numeric and as displayed
  • referringDomainsDelta / referringDomainsDeltaDirection — month-over-month change and increase/decrease
  • siteTitle, siteDescription — the site name and description shown on the profile
  • descriptionMeta — the description from the page's structured metadata
  • globalRank / globalRankChange — worldwide traffic rank and its monthly move
  • countryRank, countryRankCountry / countryRankChange — country rank, country name and move
  • category, categoryRank / categoryRankChange — category name, rank and move
  • organicTraffic, organicTrafficText / organicTrafficChange — estimated monthly organic visits, display text and change
  • trafficValueUsd, trafficValueText / trafficValueChangeUsd — estimated monthly traffic value in USD and its change
  • organicKeywords / organicKeywordsText — estimated organic keyword count
  • asOf, trafficMonth, dataMonth — snapshot month (display), traffic month and machine-readable YYYY-MM data month
  • topKeywordCountry, topKeywords[] — country used for the keyword table; each keyword has keyword, volume, volumeChange, traffic, trafficChange, position and positionChange
  • topCountries[] — country, visits, visitsChange, share (percent)
  • topCompetitors[] — domain, traffic, trafficChange, pages
  • similarlyRanked[] — domain, traffic, trafficChange, rank, rankChange; only when the requested site is actually in the worldwide top 1000
  • trafficHistoryMonthly[] — month, organicTraffic, trafficValueUsd
  • linkingWebsitesHistory[] — month, linkingWebsites

Mode subsets: authority returns identity, Domain Rating/linking websites and their history; backlinks returns the same link-focused subset; traffic returns ranks, traffic, keywords, countries and traffic history; domain returns everything.

Output per competitor record

Used by competitors. One row per competitor card, up to 10 per requested domain.

  • type — always ahrefs_competitor
  • sourceDomain — the domain whose competitor page was read
  • domain — the competitor domain
  • sourceUrl, scrapedAt
  • notFound / fetchError — only when the source page could not be read
  • siteDescription — the competitor's description
  • globalRank, globalRankChange
  • countryRank, countryRankCountry, countryRankChange
  • category, categoryRank, categoryRankChange
  • organicTraffic, organicTrafficChange
  • trafficValueUsd, trafficValueChangeUsd
  • pages
  • domainRating

Output per top-website record

Used by topWebsites. One row per ranked or trending website.

  • type — always ahrefs_top_website
  • sourceUrl, scrapedAt
  • rank, rankChange
  • domain
  • category
  • organicTraffic, organicTrafficText, organicTrafficChange
  • rankingScope — the requested scope: global, the country slug, the category slug, or country/category (for example united-states, reference, united-states/reference); on a country page, trending rows are country-level (see Limitations)
  • rankingType — ranking, trending_up or trending_down
  • rankingPage — 1–10 for the global ranking, 1 for country/category and trending
  • notFound / fetchError — only when the ranking page could not be read

Input

Field Type Default Description
mode string domain domain (full profile), authority (DR + linking sites), backlinks (link summary + history), traffic (ranks/traffic/keywords/countries), competitors (one row per competitor), topWebsites (AhrefsTop rankings). Legacy values full, authority_only and backlinks_only are still accepted and mapped
domains array – Domains or full URLs for every mode except topWebsites. www and non-www are both tried; duplicates are removed
includeHistory boolean true Include monthly traffic/value and linking-website history (mode=domain/authority/backlinks/traffic)
includeKeywords boolean true Include the top 5 keywords (mode=domain/traffic)
includeCountries boolean true Include the top 5 traffic countries (mode=domain/traffic)
includeCompetitors boolean true Include the top 5 competitors on the profile (mode=domain)
maxItems integer 50 Hard cap on rows across all requested domains or ranking pages (1–1000)
topWebsitesCountry string worldwide Country ranking (mode=topWebsites). worldwide uses the global top 1000
topWebsitesCategory string all Category ranking (mode=topWebsites); combine with a country for that country's category list
topWebsitesRanking string ranking ranking, trending_up or trending_down (mode=topWebsites)
topWebsitesPage integer 1 Starting global ranking page from 1 to 10 (mode=topWebsites); country/category/trending expose one page

Example: full profile with every section

{
  "mode": "domain",
  "domains": ["wikipedia.org", "www.nhs.uk"],
  "maxItems": 2
}
{
  "mode": "authority",
  "domains": ["stripe.com", "github.com", "openai.com"],
  "includeHistory": true,
  "maxItems": 3
}

Example: nine competitor rows per domain

{
  "mode": "competitors",
  "domains": ["wikipedia.org"],
  "maxItems": 9
}
{
  "mode": "topWebsites",
  "topWebsitesCountry": "united-states",
  "topWebsitesCategory": "reference",
  "topWebsitesRanking": "ranking",
  "maxItems": 100
}
{
  "mode": "topWebsites",
  "topWebsitesRanking": "trending_up",
  "maxItems": 10
}

Use cases

  • SEO audits — pull a client's Domain Rating, traffic, traffic value, keyword count and rank movement in one request
  • Link-building prospecting — compare linking-website counts and trends across a candidate list before outreach
  • Competitor benchmarking — export nine competitor cards per domain with traffic, traffic value, pages and DR
  • Market research — download the global top 1000 or a country/category top 100 for lead scoring and segmentation
  • Portfolio monitoring — schedule repeat runs and track monthly search traffic, traffic value and referring-site history
  • Content and keyword research — see the exact keywords a site earns the most traffic from, with volume, position and monthly change

Limitations

  • Ranking caps: the global ranking exposes ranks 1–1000 (ten pages of 100). Country, category and combined country + category rankings expose up to 100 rows; combined lists can be shorter when the source has fewer matches (for example, United States + Reference has 3). Trending exposes 10 rows per direction.
  • Country trending: on a country page the trending lists are country-level; the category filter applies only to the ranking table. On the worldwide page, category trending is category-specific.
  • Conditional ranks: global rank is printed only for sites in the worldwide top 1000 (>1000 is omitted). Country, category and keyword-count fields appear only when the source publishes them.
  • Stale data on quiet sites: some low-traffic profiles stop updating. dataMonth reports the real latest month rather than implying the data is current.
  • Public profile surface only: detailed backlink rows, top pages, keyword ideas, keyword difficulty/SERP, broken links, XML sitemaps and AI visibility are not included. Ahrefs' free tools for those require a Cloudflare Turnstile challenge, and the official free API requires an API key.
  • Third-party estimates: traffic, traffic value and keyword figures are Ahrefs' estimates, not analytics from the site owner.

FAQ

Do I need an Ahrefs subscription or API key? No. The actor reads the same public website profiles and rankings that any visitor can see on AhrefsTop. There is no login, cookie or token.

What is AhrefsTop? It is Ahrefs' public ranking site. Opening ahrefs.com/websites/<domain> redirects there; the actor reads the destination page directly.

Why are some fields missing from a record? Ahrefs only prints some values conditionally. A site outside the global top 1000 has no globalRank, a site without a country rank has no countryRank, and some profiles have no keyword count. Empty fields are omitted, never filled with null or a sentinel.

Why is dataMonth older than this month for some domains? Ahrefs stops refreshing profiles it considers inactive. The field shows the latest month the source actually publishes, so you can judge freshness instead of assuming the numbers are current.

How many rows can topWebsites return? Up to 1000 for the global ranking (start at page 1 and use maxItems up to 1000), up to 100 for a country, category or combined country + category list (combined lists can be shorter), and up to 10 for trending up or trending down.

Can I combine a country and a category? Yes. Set both topWebsitesCountry and topWebsitesCategory; the actor reads the combined list, which is capped by the source at 100 rows.

Do www and non-www domains both work? Yes. The actor tries the exact host first and falls back to the other form only when the first returns no page. resolvedDomain tells you which host was used.

How fresh is the data? Ahrefs updates these profiles monthly. scrapedAt records when you collected the row, while asOf, trafficMonth and dataMonth describe the source month.

Is this affiliated with Ahrefs? No. This is an independent actor that reads publicly available AhrefsTop pages. It is not endorsed by or affiliated with Ahrefs.

Python quickstart

Use a schema-derived input and the Python standard library to start a run. An Apify account and token are required for execution.

Open the step-by-step Python guide →

Source build 1er5MI6BnUASyOt8P. Documentation is regenerated from the default published build; private drafts are not included.