Skip to main content

Rank::Ahrefs - Ahrefs Backlink Checker scraper

Overview

Scraper overview

Ahrefs scraper is one of the most popular tools for SEO specialists for tasks related to backlink research, traffic estimation, and analysis of competitors' search queries. With it, you can obtain complete information about domain rating, the number of backlinks, and referring domains. Using the Ahrefs scraper, you can perform mass multi-threaded competitor analysis.

Saving results is possible in the form and structure you need, thanks to the built-in powerful templating engine Template Toolkit which allows applying additional logic to the results and outputting data in various formats, including JSON, SQL, and CSV.

Collected data

Data is collected from the page https://ahrefs.com/ru/backlink-checker.

To work, you need to connect the captcha solving service Util::TurnstileUtil::Turnstile.

  • Domain and URL rating
  • The number of backlinks and the percentage of dofollow backlinks
  • The number of referring domains and the percentage of dofollow among them
  • List of TOP100 backlinks
    • Link to the page
    • Page title
    • DR
    • Url
    • Anchor of the link
    • Redirect code
    • Array of JSON objects with redirect data
Collected data

Use cases

  • Obtaining aggregate information about the domain
  • Estimating the number of backlinks
  • Domain assessment

Queries

As queries, you need to specify a list of domains, for example:

a-parser.com
yandex.ru
google.com
vk.com
facebook.com
youtube.com

Output results examples

A-Parser supports flexible formatting of results thanks to the built-in templating engine Template Toolkit, which allows it to output results in any form, as well as in structured formats, such as CSV or JSON

Default output

Result format:

$query: $rating\n

The result will display the domain and its rating:

a-parser.com: 39
yandex.ru: 94
vk.com: 95
facebook.com: 100
youtube.com: 99
google.com: 98

Output of main domain data in CSV table

Result format:

$query, $url_rating $rating, $bl, $bl_dofollow, $domains, $domains_dofollow

Example of result:

a-parser.com, 21, 35, 218702, 96, 569, 53

Result format:

[% FOREACH backlink IN backlinks;
tools.CSVline(backlink.page,backlink.title,backlink.dr,backlink.url,backlink.anchor,backlink.redirect_code);
END %]

Example of result:

https://in-scale.ru/blog/rassylka-telegram/,"Рассылка в телеграмм - как сделать массово + 9 лучших программ",54,https://a-parser.com/?ref=21341,A-Parser,0
https://coba.tools/seo/monitoring-pozitsiy,"Онлайн сервисы и программы для проверки позиций сайта в поиске",31,https://a-parser.com/,"Перейти на сайт",0
https://pricecontrol.biz/9-prepyatstvij-pri-parsinge-sajtov/,"Парсинг цен конкурентов 2023 от Price Control",16,https://a-parser.com/,https://a-parser.com/,0
https://www.unisender.com/ru/blog/idei/parsery-dlya-sbora-dannyh-s-sajtov/,"Как быстро собрать данные с сайтов",76,https://a-parser.com/,A-Parser,0
https://www.ashmanov.com/education/articles/poiskovye-podskazki-yandeks/,"Продвижение сайта подсказками в Яндекс",68,https://a-parser.com/parsers/,A-parser,0
https://www.calltouch.ru/blog/luchshie-servisy-i-boty-dlya-parsinga-telegram/,"Парсер Телеграм-канала: обзор лучших сервисов и ботов для сбора и обработки данных чатов, постов и пользователей | Calltouch.Блог",72,https://a-parser.com/parsers/,A-Parser,0
https://seonomad.net/ru/seotools/tekst-ru,"Текст Ру. Описание, отзывы, аналоги",24,https://a-parser.com/?ref=29414,A-parser,0
tip

In the Result Format, the Template Toolkit templating engine is used to output elements of the $backlinks array in a FOREACH loop.

Dump results to JSON

Общий формат результата:

[% IF notFirst;
",\n";
ELSE;
notFirst = 1;
END;

obj = {};
obj.items = [];

FOREACH item IN p1.backlinks;
obj.items.push({
dr = item.dr
page = item.page
title = item.title
});
END;

obj.json %]

Начальный текст:

[

Конечный текст:

]

Example of result:

[{
"items": [
{
"page": "https://forum.compucoin.org/showthread.php?tid=612923&pid=1137290",
"dr": 34,
"title": "GypeKetarert wsvpz"
},
{
"page": "https://forum.compucoin.org/showthread.php?tid=612923&pid=1137290",
"dr": 34,
"title": "GypeKetarert wsvpz"
},
{
"page": "https://forum.compucoin.org/showthread.php?tid=612923&pid=1137290",
"dr": 34,
"title": "GypeKetarert wsvpz"
},
{
"page": "https://forum.compucoin.org/showthread.php?tid=612923&pid=1137290",
"dr": 34,
"title": "GypeKetarert wsvpz"
}
]
}]
tip

To make the "Start text" and "End text" options available in the Task Editor, you need to activate "More options".

Possible settings

ParameterDefault ValueDescription
Util::Turnstile presetdefaultSelection of the Util::TurnstileUtil::Turnstile preset for bypassing captchas. It is necessary to preconfigure the scraper Util::TurnstileUtil::Turnstile - specify your access key and other parameters, after which select the created preset here.
Turnstile pass proxyPassing the proxy to the captcha solving service. More details.
Do not search for sitekeyAn experimental option that disables the search for the captcha sitekey, which in turn speeds up the task start. In case of problems such as an invalid sitekey, this option should be disabled.
Mode*.domain/*Choice of domain type, there are two types of URL and *.domain/*. URL - exact address, *.domain/* - domain with all its subdomains