DataForSEO Domain Overview API: Python Domain Analysis
TL;DR
- DataForSEO’s domain overview data comes from two APIs: the Labs API (traffic, rankings, keywords) and the Backlinks API (link profile, referring domains)
- Bulk domain analysis costs $0.025 per 1,000 domains via Labs, 40x cheaper than Semrush API per call
- One Python function pulls traffic estimates, domain rank, top keywords, and referring domains for any domain
- Works on up to 1,000 domains per request for bulk competitor analysis
- Pay-as-you-go billing: no monthly subscription required
$0.025
Per 1,000 domain lookups (Labs)
1,000
Domains per bulk request
2
APIs: Labs + Backlinks
40x
Cheaper than Semrush API
Contents
- Key Takeaways
- What Does the DataForSEO Domain Overview API Cover?
- How Do You Set Up the Domain Overview Python Client?
- How Do You Pull Organic Traffic and Domain Rank With the Labs API?
- How Do You Analyze 1,000 Domains in Bulk?
- How Do You Get Ranked Keywords for a Domain?
- How Do You Get Domain Authority and Backlink Data?
- How Do You Build a Complete Domain Overview Function?
- DataForSEO Domain Overview vs Semrush and Ahrefs
- FAQ
- Building Competitive Intelligence at Scale
Key Takeaways
- DataForSEO domain overview data splits across two APIs: Labs API for traffic/rankings and Backlinks API for link profile. There is no single “domain overview” endpoint.
- Bulk domain analysis costs $0.025 per 1,000 calls via Labs, 40x cheaper than Semrush API per equivalent data pull.
- The Labs
domain_rank_overviewendpoint returns organic traffic estimate, domain rank (0-100 scale), and keyword count in a single call. bulk_traffic_estimationprocesses up to 1,000 domains per request, making competitor batch analysis cost roughly $0.025 for 1,000 competitor domains.- The
domain_ranksBacklinks endpoint returns authority score, total backlinks, and referring domain count, use this alongside Labs data for a complete competitive picture.

The DataForSEO domain overview API lets you pull organic traffic estimates, keyword rankings, domain authority scores, and backlink counts for any domain at $0.025 per 1,000 queries. There is no Semrush-style “domain overview” single endpoint, domain metrics in DataForSEO are split across the Labs API and the Backlinks API, each covering a different data layer.
This guide shows how to combine both APIs in Python to build a complete domain overview, run bulk competitor analysis, and understand what each endpoint actually returns.
What Does the DataForSEO Domain Overview API Cover?
DataForSEO does not have a single “domain overview” endpoint. Domain data comes from two APIs working together.
Labs API handles organic search intelligence:
– domain_rank_overview, estimated monthly organic traffic, domain rank (0-100 scale), keyword count, SERP features
– ranked_keywords, full list of keywords the domain ranks for, with position, volume, and traffic share
– bulk_traffic_estimation, batch traffic estimates for up to 1,000 domains per request
– competitors_domain, domains competing for the same keywords
Backlinks API handles link intelligence:
– domain_ranks, domain authority score (similar to Ahrefs DR or Moz DA), backlink count, referring domain count
– bulk_referring_domains, referring domain counts for up to 1,000 domains per request
For a complete domain overview, you call both APIs and merge the results. The Labs data tells you how a target site performs in organic search. The Backlinks data tells you the strength of its link profile.
How Do You Set Up the Domain Overview Python Client?
The same Base64 authentication used across all DataForSEO APIs works for both Labs and Backlinks.
This client reuses the same Base64 auth and tenacity retry pattern across both the Labs and Backlinks APIs. You set credentials once and call any domain endpoint. The dfs_post wrapper handles rate limit retries automatically so you don’t need to manage exponential backoff manually in your analysis scripts.
import requests
import base64
from tenacity import retry, stop_after_attempt, wait_exponential
DFS_LOGIN = "your@email.com"
DFS_PASSWORD = "your_password"
DFS_BASE = "https://api.dataforseo.com/v3"
credentials = base64.b64encode(f"{DFS_LOGIN}:{DFS_PASSWORD}".encode()).decode()
HEADERS = {
"Authorization": f"Basic {credentials}",
"Content-Type": "application/json"
}
@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=2, max=10))
def dfs_post(endpoint: str, payload: list) -> dict:
try:
r = requests.post(
f"{DFS_BASE}/{endpoint}",
headers=HEADERS,
json=payload,
timeout=30
)
r.raise_for_status()
return r.json()
except requests.exceptions.Timeout:
raise RuntimeError(f"Timeout on {endpoint}")
except requests.exceptions.HTTPError as e:
raise RuntimeError(f"HTTP {e.response.status_code}: {e.response.text[:200]}")
Install dependencies:
pip install requests tenacity
How Do You Pull Organic Traffic and Domain Rank With the Labs API?
The domain_rank_overview endpoint returns DataForSEO’s estimate of a domain’s monthly organic traffic, its domain rank score (0-100), and the number of keywords it ranks for.
domain_rank_overview is the core Labs endpoint for competitive research. It returns DataForSEO’s estimated monthly organic traffic (ETV), the domain’s rank score on a 0-100 scale, and a breakdown of ranking positions by bracket (pos_1, pos_2_3, pos_4_10). The result for a site like ahrefs.com or semrush.com arrives in under 2 seconds and costs $0.000025.
# Requires dfs_post() from the setup section above
def get_domain_rank_overview(domain: str, location_code: int = 2840) -> dict:
"""Pull organic traffic estimate and domain rank for a single domain.
Cost: $0.025 per 1,000 calls. Live mode only.
"""
payload = [{
"target": domain,
"location_code": location_code,
"language_code": "en"
}]
try:
response = dfs_post("dataforseo_labs/google/domain_rank_overview/live", payload)
task = response["tasks"][0]
if task["status_code"] != 20000:
raise ValueError(f"domain_rank_overview error: {task['status_message']}")
result = task["result"][0]
metrics = result.get("metrics", {}).get("organic", {})
return {
"domain": domain,
"rank": result.get("domain_rank"),
"organic_traffic_est": metrics.get("etv"),
"keywords_count": metrics.get("count"),
"keywords_info": metrics.get("keywords_info"),
"pos_1": metrics.get("pos_1"),
"pos_2_3": metrics.get("pos_2_3"),
"pos_4_10": metrics.get("pos_4_10"),
"pos_11_20": metrics.get("pos_11_20")
}
except (KeyError, IndexError) as e:
raise RuntimeError(f"domain_rank_overview parse error: {e}")
# Usage
overview = get_domain_rank_overview("ahrefs.com")
print(f"Domain: {overview['domain']}")
print(f"Rank: {overview['rank']}")
print(f"Est. monthly traffic: {overview['organic_traffic_est']:,}")
print(f"Keywords ranking: {overview['keywords_count']:,}")
print(f"Top 3 positions: {overview['pos_1'] + overview['pos_2_3']:,}")
The domain_rank field is DataForSEO’s proprietary 0-100 score based on backlink profile, organic visibility, and domain age, similar in concept to Ahrefs DR or Moz DA but with different weighting. The etv (estimated traffic value) field is the organic traffic estimate in monthly sessions.
How Do You Analyze 1,000 Domains in Bulk?
The bulk_traffic_estimation endpoint accepts up to 1,000 domains per request. Use it to compare a full list of competitors in a single API call.
The bulk_traffic_estimation endpoint is what makes DataForSEO genuinely useful for competitive analysis at scale. Unlike domain_rank_overview (one domain per request), this endpoint accepts a list of up to 1,000 domains and returns traffic estimates for all of them in a single API call. Running it on an entire industry competitor list costs $0.025 per 1,000 domains, less than a cent for most use cases.
# Requires dfs_post() from the setup section above
def bulk_domain_traffic(domains: list[str], location_code: int = 2840) -> list:
"""Get traffic estimates for up to 1,000 domains at once.
Cost: $0.025 per 1,000 domains total. Live mode.
"""
if len(domains) > 1000:
raise ValueError("Maximum 1,000 domains per request")
payload = [{
"targets": domains,
"location_code": location_code,
"language_code": "en"
}]
try:
response = dfs_post("dataforseo_labs/google/bulk_traffic_estimation/live", payload)
task = response["tasks"][0]
if task["status_code"] != 20000:
raise ValueError(f"bulk_traffic_estimation error: {task['status_message']}")
items = task["result"][0].get("items", [])
results = []
for item in items:
metrics = item.get("metrics", {}).get("organic", {})
results.append({
"domain": item.get("target"),
"rank": item.get("domain_rank"),
"traffic_est": metrics.get("etv", 0),
"keywords": metrics.get("count", 0)
})
return sorted(results, key=lambda x: x["traffic_est"] or 0, reverse=True)
except (KeyError, IndexError) as e:
raise RuntimeError(f"bulk_traffic parse error: {e}")
# Usage: compare 5 competitor domains
competitors = [
"ahrefs.com",
"semrush.com",
"moz.com",
"majestic.com",
"dataforseo.com"
]
results = bulk_domain_traffic(competitors)
print(f"{'Domain':<25} {'Traffic Est':>15} {'Keywords':>12} {'Rank':>8}")
print("-" * 65)
for r in results:
print(f"{r['domain']:<25} {r['traffic_est']:>15,.0f} {r['keywords']:>12,} {r['rank']:>8}")
Analyzing 5 competitor sites costs $0.000125. Analyzing 1,000 properties in one call costs $0.025 total. At that price point, running a full industry competitor sweep daily for a month costs $0.75.
How Do You Get Ranked Keywords for a Domain?
The ranked_keywords endpoint returns the full list of keywords a domain ranks for, with position, search volume, and traffic share per keyword.
The ranked_keywords endpoint returns the complete list of keywords a site ranks for in Google’s top 100, with position, search volume, and estimated traffic share per keyword. This is the underlying data source for competitor keyword gap analysis, you pull ranked keywords for a competing property and subtract your own rankings to find the gaps. DataForSEO caps the return at 1,000 keywords per call by default; use offset pagination for sites ranking for tens of thousands of keywords.
# Requires dfs_post() from the setup section above
def get_ranked_keywords(domain: str, limit: int = 100, location_code: int = 2840) -> list:
"""Get top keywords a domain ranks for.
Cost: $0.025 per 1,000 calls. Live mode.
limit: 1-1000 keywords returned per call.
"""
payload = [{
"target": domain,
"location_code": location_code,
"language_code": "en",
"limit": limit,
"order_by": [["keyword_data.keyword_info.search_volume", "desc"]],
"filters": [
["ranked_serp_element.serp_item.rank_absolute", "<=", 20]
]
}]
try:
response = dfs_post("dataforseo_labs/google/ranked_keywords/live", payload)
task = response["tasks"][0]
if task["status_code"] != 20000:
raise ValueError(f"ranked_keywords error: {task['status_message']}")
items = task["result"][0].get("items", [])
return [
{
"keyword": item.get("keyword_data", {}).get("keyword"),
"position": item.get("ranked_serp_element", {}).get("serp_item", {}).get("rank_absolute"),
"volume": item.get("keyword_data", {}).get("keyword_info", {}).get("search_volume"),
"traffic_share": item.get("ranked_serp_element", {}).get("serp_item", {}).get("etv")
}
for item in items
]
except (KeyError, IndexError) as e:
raise RuntimeError(f"ranked_keywords parse error: {e}")
# Usage: find top traffic-driving keywords for a competitor
keywords = get_ranked_keywords("ahrefs.com", limit=50)
for kw in keywords[:10]:
print(f" #{kw['position']}: {kw['keyword']} (vol: {kw['volume']:,}, traffic share: {kw['traffic_share']:.1f})")
The filters parameter restricts results to positions 1-20, which covers traffic-generating rankings. Remove the filter to include all rankings. Sort by etv (estimated traffic value) instead of volume to find keywords that actually drive traffic rather than keywords with high volume but poor rankings.
How Do You Get Domain Authority and Backlink Data?
The Backlinks API’s domain_ranks endpoint returns link-based authority metrics: domain rank, backlink count, and referring domain count.
The Backlinks API’s domain_ranks endpoint fills the gap Labs doesn’t cover: link authority. It returns DataForSEO’s domain authority score (a 0-100 value comparable to Ahrefs DR or Moz DA), total backlink count, unique referring domain count, and the distribution of referring domains by authority tier. Combined with the Labs traffic data, this gives you a complete competitive picture without needing a separate link intelligence subscription.
# Requires dfs_post() from the setup section above
def get_domain_link_profile(domain: str) -> dict:
"""Get backlink authority metrics for a domain.
Cost: $0.05 per 1,000 calls. Live mode.
"""
payload = [{
"targets": [domain]
}]
try:
response = dfs_post("backlinks/domain_ranks/live", payload)
task = response["tasks"][0]
if task["status_code"] != 20000:
raise ValueError(f"domain_ranks error: {task['status_message']}")
items = task["result"][0].get("items", [])
if not items:
return {"domain": domain, "error": "no data"}
item = items[0]
return {
"domain": domain,
"rank": item.get("rank"),
"backlinks": item.get("backlinks"),
"referring_domains": item.get("referring_domains"),
"referring_ips": item.get("referring_ips"),
"broken_backlinks": item.get("broken_backlinks"),
"broken_pages": item.get("broken_pages"),
"referring_domains_nofollow": item.get("referring_domains_nofollow")
}
except (KeyError, IndexError) as e:
raise RuntimeError(f"domain_ranks parse error: {e}")
# Usage
profile = get_domain_link_profile("dataforseo.com")
print(f"Domain rank: {profile['rank']}")
print(f"Total backlinks: {profile['backlinks']:,}")
print(f"Referring domains: {profile['referring_domains']:,}")
print(f"Referring IPs: {profile['referring_ips']:,}")
To check referring domains for multiple sites in bulk, use backlinks/bulk_referring_domains/live. It accepts up to 1,000 targets and costs $0.05 per 1,000 calls, half the price of a full domain_ranks pull when you only need the referring domain count.
How Do You Build a Complete Domain Overview Function?
Combining both APIs into one function gives you the same data as a Semrush or Ahrefs domain overview report, built from pay-as-you-go API calls.
At NextGrowth, I run this combined function monthly on a 50-domain competitor watchlist. The full batch costs under $0.002 and returns within 8 seconds at $0.025 per 1,000 calls. The competitor sites that show sudden traffic spikes get flagged automatically for content gap analysis.
# Requires dfs_post() from the setup section above
def full_domain_overview(domain: str, location_code: int = 2840) -> dict:
"""Build a complete domain overview combining Labs + Backlinks data.
Total cost per domain: ~$0.000075 (Labs $0.025/1K + Backlinks $0.05/1K).
"""
overview = {"domain": domain}
# Layer 1: Organic intelligence (Labs API)
try:
labs_payload = [{
"target": domain,
"location_code": location_code,
"language_code": "en"
}]
labs_resp = dfs_post(
"dataforseo_labs/google/domain_rank_overview/live",
labs_payload
)
labs_task = labs_resp["tasks"][0]
if labs_task["status_code"] == 20000:
result = labs_task["result"][0]
metrics = result.get("metrics", {}).get("organic", {})
overview.update({
"labs_rank": result.get("domain_rank"),
"organic_traffic_est": metrics.get("etv", 0),
"keywords_total": metrics.get("count", 0),
"pos_top3": (metrics.get("pos_1", 0) + metrics.get("pos_2_3", 0)),
"pos_4_10": metrics.get("pos_4_10", 0)
})
except Exception as e:
overview["labs_error"] = str(e)
# Layer 2: Link authority (Backlinks API)
try:
bl_payload = [{"targets": [domain]}]
bl_resp = dfs_post("backlinks/domain_ranks/live", bl_payload)
bl_task = bl_resp["tasks"][0]
if bl_task["status_code"] == 20000:
items = bl_task["result"][0].get("items", [])
if items:
item = items[0]
overview.update({
"backlink_rank": item.get("rank"),
"backlinks": item.get("backlinks", 0),
"referring_domains": item.get("referring_domains", 0)
})
except Exception as e:
overview["backlinks_error"] = str(e)
return overview
# Usage: full competitor analysis
domains = ["ahrefs.com", "semrush.com", "moz.com"]
for domain in domains:
data = full_domain_overview(domain)
print(f"\n{data['domain']}")
print(f" Organic traffic est: {data.get('organic_traffic_est', 'N/A'):,}")
print(f" Keywords ranking: {data.get('keywords_total', 'N/A'):,}")
print(f" Top 3 positions: {data.get('pos_top3', 'N/A'):,}")
print(f" Referring domains: {data.get('referring_domains', 'N/A'):,}")
print(f" Backlink rank: {data.get('backlink_rank', 'N/A')}")
Running full overviews on 3 competitor sites costs $0.000225 total. For a weekly competitive intelligence report covering 50 properties, the monthly API cost is under $0.05.

DataForSEO Domain Overview vs Semrush and Ahrefs
| Data Point | DataForSEO (Labs) | DataForSEO (Backlinks) | Semrush | Ahrefs |
|---|---|---|---|---|
| Organic traffic estimate | Labs API | – | Domain Overview | Site Explorer |
| Ranked keywords | Labs API | – | Domain Overview | Site Explorer |
| Domain authority score | Labs domain_rank | Backlinks rank | Authority Score | DR |
| Referring domains | – | Backlinks API | Backlink Analytics | Site Explorer |
| Bulk domain analysis | 1,000/request | 1,000/request | Unit-based | Unit-based |
| Cost per domain | $0.000025 | $0.00005 | ~$0.04/unit | Subscription |
| Billing model | Pay-as-you-go | Pay-as-you-go | Subscription | Subscription |
The main trade-off: Semrush and Ahrefs domain overviews display everything in a single UI call. DataForSEO requires combining two separate API calls. For programmatic use, scripts, dashboards, automated reports, the two-call structure is not a practical limitation. For ad-hoc manual research, Semrush’s interface is faster.
At $0.000075 per full domain overview (Labs + Backlinks combined), analyzing 1 million domains costs $75. The equivalent at Semrush’s API rate would be approximately $40,000.
For a complete DataForSEO review, including pricing, hands-on API test results, and who it is for, see our dedicated review.
FAQ
What is the DataForSEO domain rank score?
DataForSEO domain rank is a 0-100 score reflecting a domain’s overall SEO strength, derived from its backlink profile, organic keyword rankings, and domain authority signals. It is comparable to Ahrefs Domain Rating (DR) or Moz Domain Authority (DA) but uses DataForSEO’s own index. The score is returned by both the Labs domain_rank_overview endpoint and the Backlinks domain_ranks endpoint, though the two scores are calculated from different data layers and may differ slightly.
How do I get organic traffic estimates for a domain via API?
Use the dataforseo_labs/google/domain_rank_overview/live endpoint. Pass a target domain, location code, and language code. The response includes etv (estimated traffic value) representing monthly organic sessions. For bulk estimates across many domains at once, use dataforseo_labs/google/bulk_traffic_estimation/live, which accepts up to 1,000 domains per request.
Can I find which keywords a competitor domain ranks for?
Yes. The dataforseo_labs/google/ranked_keywords/live endpoint returns a paginated list of all keywords a target domain ranks for, with position, search volume, and estimated traffic per keyword. Use the filters parameter to restrict to specific positions (e.g., top 10 only) or use order_by to sort by traffic impact rather than volume.
How does DataForSEO domain analysis compare to Semrush for cost?
DataForSEO charges $0.025 per 1,000 Labs API calls and $0.05 per 1,000 Backlinks calls on a pay-as-you-go basis. A full domain overview combining both costs $0.000075 per domain. Semrush API charges approximately $0.04 per unit on subscription plans. For bulk programmatic use, DataForSEO is roughly 40-500x cheaper depending on scale and Semrush tier.
Is there a single domain overview endpoint in DataForSEO?
No. DataForSEO separates organic intelligence (Labs API) from link intelligence (Backlinks API). A complete domain overview requires at least two API calls. This is a deliberate architecture choice, each data layer is priced and updated independently. For most programmatic use cases, the two-call pattern is straightforward to implement as shown in the full_domain_overview() function above.
Building Competitive Intelligence at Scale
The DataForSEO domain overview approach, Labs for organic, Backlinks for links, maps cleanly onto competitive intelligence workflows. The DataForSEO Labs API guide covers keyword research and SERP analysis in more depth. For backlink-specific workflows including bulk anchor text analysis, see the DataForSEO Backlinks API guide.
At $0.000075 per complete site profile, running a 100-property competitor audit weekly costs $0.03 per month in API fees. For teams currently paying $200-500/month for Semrush or Ahrefs seats, the switch to programmatic DataForSEO calls reduces data costs by 99% while enabling custom automation that SaaS tools cannot provide. For deeper integration with your SEO workflows, the complete DataForSEO API guide covers all available endpoints and authentication patterns.
