Bots-Scrapers
Elite Member
- Jan 2, 2014
- 4,042
- 1,074
There exists plenty DR/PA checker online also bulk option available for free!
Just google it.
Just google it.
There are not plenty for sure as far as DR is concern. whatever available are not good for parallel requests. Perhaps you have tested any good?There exists plenty DR/PA checker online also bulk option available for free!
Just google it.
Neat. How'd you build it? Is it using a paid account under the hood, or you find a free endpoint that could be used for metrics?
PM link?
Yes, using paid account.Neat. How'd you build it? Is it using a paid account under the hood, or you find a free endpoint that could be used for metrics?
PM link pleaseWell, I just published one on RapidAPI.
For checking DR and Ahrefs rank of domains.
Domain Rating for wordcount.com: {'domain_rating': {'domain_rating': 47.0, 'ahrefs_rank': 916071}}
Traffic / Keywords for wordcount.com: {'metrics': {'org_keywords': 7822, 'paid_keywords': 0, 'org_keywords_1_3': 774, 'org_traffic': 323520, 'org_cost': 1349248, 'paid_traffic': 0, 'paid_cost': None, 'paid_pages': 0}}
Domain Rating for ahrefs.com: {'domain_rating': {'domain_rating': 91.0, 'ahrefs_rank': 940}}
Traffic / Keywords for ahrefs.com: {'metrics': {'org_keywords': 241199, 'paid_keywords': 374, 'org_keywords_1_3': 14969, 'org_traffic': 2934674, 'org_cost': 261697237, 'paid_traffic': 1319, 'paid_cost': 193120, 'paid_pages': 4}}
import http.client
import json
import csv
import logging
from datetime import datetime
# Set up logging
logging.basicConfig(filename='error.log', level=logging.ERROR)
# Define Ahrefs API key
API_KEY = 'api key here'
headers = {
'Accept': "application/json, application/xml",
'Authorization': f"Bearer {API_KEY}"
}
# Get current date
current_date = datetime.now().strftime('%Y-%m-%d')
# Open URLs file
with open('sites.txt', 'r') as f:
urls = [line.strip() for line in f.readlines()]
# Define the output data
data = [['site', 'DR', 'Traffic', 'Keywords']]
# For each URL, get data from Ahrefs API
for url in urls:
try:
conn = http.client.HTTPSConnection("api.ahrefs.com")
# Get domain rating
conn.request("GET", f"/v3/site-explorer/domain-rating?target={url}&date={current_date}", headers=headers)
res = conn.getresponse()
domain_rating_data = json.loads(res.read())
domain_rating = domain_rating_data.get('domain_rating', {}).get('domain_rating', 0)
print(f"Domain Rating for {url}: {domain_rating_data}")
# Get traffic
conn.request("GET", f"/v3/site-explorer/metrics?target={url}&date={current_date}", headers=headers)
res = conn.getresponse()
traffic_data = json.loads(res.read())
traffic = traffic_data.get('metrics', {}).get('org_traffic', 0)
# Get keywords
conn.request("GET", f"/v3/site-explorer/metrics?target={url}&date={current_date}", headers=headers)
res = conn.getresponse()
keywords_data = json.loads(res.read())
keywords = keywords_data.get('metrics', {}).get('org_keywords', 0)
print(f"Traffic / Keywords for {url}: {traffic_data}")
data.append([url, domain_rating, traffic, keywords])
except Exception as e:
logging.error(f"Error processing URL {url}: {str(e)}")
# Save data to csv file
try:
with open('output.csv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerows(data)
except Exception as e:
logging.error(f"Error while writing to csv file: {str(e)}")
# Save data to txt file
try:
with open('output.txt', 'w') as f:
writer = csv.writer(f, delimiter='\t')
writer.writerows(data)
except Exception as e:
logging.error(f"Error while writing to txt file: {str(e)}")
Thanks!I guess this is the one: https://rapidapi.com/ayushsomanime/api/ahrefs-dr-rank-checker
Still seems pretty stable, but rapidapi offerings can disappear pretty quickly.
thanks for the heads up. If anything happens, got backup plans too : )Still seems pretty stable, but rapidapi offerings can disappear pretty quickly.
I will see about that. Thanks!better give a different name so you don't get banned by ahrefs
Trying to build an API as a Service to get Moz, Ahref, Majestic & Semrush data for 100K credits for $49/month.Hi any API more cheap than Ahref or Semrush to fetch the tf/cf/RD ?
You won't fetch the majestic TF/CF through ahrefs / semrush. Funny idea.Hi any API more cheap than Ahref or Semrush to fetch the tf/cf/RD ?
We are trying to provide all the data in one go (Moz, Ahref, Majestic & Semrush)...You won't fetch the majestic TF/CF through ahrefs / semrush. Funny idea.
Good luck then. There are plenty of vendors on pay per use rather than on a subscription.We are trying to provide all the data in one go (Moz, Ahref, Majestic & Semrush)...
We can also do pay per use with 100k credit for $49, just starting API as a Service and would love to get all the help possible...Good luck then. There are plenty of vendors on pay per use rather than on a subscription.
I am paying $3.5 for 100k today. Guess you need to work on your service offer.We can also do pay per use with 100k credit for $49, just starting API as a Service and would love to get all the help possible...
If you are talking about my-addr.com, you only get Semrush API for $3.5, Ahref is for $52, Plus they don't have Majestic data and suspending Moz data.I am paying $3.5 for 100k today. Guess you need to work on your service offer.
Does that integrate with GSA keyword tool? would you mind PM the name of that service?I am paying $3.5 for 100k today. Guess you need to work on your service offer.