How OpenSEO Performs Backlink Analysis Using the DataForSEO Link Index
OpenSEO performs backlink analysis by querying the DataForSEO link index via two parallel API calls that return aggregated domain metrics and individual backlink rows, then filters and ranks the results to display the top 15 referring domains.
OpenSEO is an open-source SEO platform that leverages external data providers to power its analytics features. For backlink analysis, the system integrates with DataForSEO's continuously refreshed link index rather than maintaining its own web crawler, enabling real-time backlink intelligence without the infrastructure overhead of a distributed crawling network.
Data Source: The DataForSEO Link Index
All backlink data originates from the DataForSEO API, a commercial link index that aggregates backlink data from a crawled corpus of the web. OpenSEO consumes this data through authenticated REST API calls to https://api.dataforseo.com.
The integration supports both the free backlink checker tool and the full-featured backlink reports within the application. Because DataForSEO maintains the index, OpenSEO inherits access to a large, up-to-date backlink database—including live links, broken backlinks, and referring domain metrics—without storing the raw crawl data locally.
Backlink Analysis API Architecture
In web/src/routes/api/backlink-check.ts, the backlink analysis endpoint is implemented as a TanStack File-Based Route. The route handler constructs parallel requests to two distinct DataForSEO endpoints to balance summary statistics with detailed link data.
Parallel DataForSEO API Calls
When a user requests analysis for a domain, the server executes two concurrent POST requests:
/v3/backlinks/summary/live– Returns aggregated metrics including total backlink count, broken backlink count, referring domain count, and domain authority scores./v3/backlinks/backlinks/live– Returns the individual backlink rows with source URLs, anchor text, and page-level metrics.
Both calls utilize the constant DATAFORSEO_BASE = "https://api.dataforseo.com" and include the following parameters:
exclude_internal_backlinks: true– Filters out links from the same domainbacklinks_status_type: "live"– Restricts results to currently active links
The requests are executed via Promise.all() to minimize latency before the raw responses undergo schema validation.
Data Processing and Filtering Pipeline
After receiving the JSON responses, OpenSEO applies a strict validation and transformation pipeline using Zod schemas.
Schema Validation
The raw data is parsed against backlinksSummarySchema and backlinksResultSchema to ensure type safety and handle API variations. This validation occurs in the route loader before any business logic processes the data.
Filtering and Deduplication Logic
The system applies three critical filters to the raw backlink items:
- Type restriction: Keeps only items where
type === "backlink"and validates thaturl_fromexists. - Internal link exclusion: Enforces
exclude_internal_backlinks: trueat the API level to remove self-referential links. - Result limiting: Truncates the array to the top 15 backlinks (prioritizing one per referring domain) and sorts them by domain strength to surface the most authoritative links first.
This processed dataset is then returned to the client for visualization in the backlink checker UI.
Implementation Code Examples
You can interact with the backlink analysis feature either through the public API or by examining the server-side implementation.
Client-Side API Consumption
// Fetching backlink data from the public endpoint
fetch(`https://openseo.so/api/backlink-check/${domain}`)
.then(res => res.json())
.then(data => {
console.log('Domain summary:', data.summary);
console.log('Top 15 backlinks:', data.top_backlinks);
});
Server-Side Route Handler
// web/src/routes/api/backlink-check.ts
const DATAFORSEO_BASE = "https://api.dataforseo.com";
export const Route = createFileRoute("/api/backlink-check")({
async loader({ params }) {
const domain = params.domain;
// Parallel requests to DataForSEO endpoints
const [summaryRaw, backlinksRaw] = await Promise.all([
dataforseoClient.post(`${DATAFORSEO_BASE}/v3/backlinks/summary/live`, {
target: domain,
exclude_internal_backlinks: true,
backlinks_status_type: "live",
}),
dataforseoClient.post(`${DATAFORSEO_BASE}/v3/backlinks/backlinks/live`, {
target: domain,
exclude_internal_backlinks: true,
backlinks_status_type: "live",
limit: 15,
})
]);
// Validate and parse responses
const summary = backlinksSummarySchema.parse(summaryRaw);
const backlinks = backlinksResultSchema.parse(backlinksRaw);
// Filter and slice to top results
const topBacklinks = (backlinks.items ?? [])
.filter(b => b.type === "backlink" && b.url_from)
.slice(0, 15);
return { summary, topBacklinks };
}
});
Key Source Files and Responsibilities
The backlink analysis feature spans multiple files in the OpenSEO repository:
web/src/routes/api/backlink-check.ts– Main API route that orchestrates DataForSEO calls and response formatting.src/server/lib/dataforseo/backlinks.ts– Contains helper functions and default query parameters (e.g.,exclude_internal_backlinksdefaults).src/server/lib/dataforseo/client.ts– Initializes the authenticated HTTP client used for all DataForSEO API communication.src/server/lib/dataforseo/shared.ts– Defines shared constants likeMAX_TASKS_PER_POSTand domain normalization utilities.web/src/components/backlink-checker-tool.tsx– React component that renders the summary statistics and backlink table in the user interface.
Summary
- OpenSEO relies exclusively on the DataForSEO link index for backlink analysis, accessed via authenticated REST API calls to
api.dataforseo.com. - The system queries two endpoints in parallel—summary and backlinks—to gather both aggregate metrics and individual link data.
- A Zod-based validation pipeline filters for live backlinks only, excludes internal links, and limits results to the top 15 referring domains sorted by authority.
- The implementation in
web/src/routes/api/backlink-check.tshandles parallel request orchestration, whilesrc/server/lib/dataforseo/contains the underlying client logic. - This architecture allows the open-source project to provide enterprise-grade backlink analysis without operating its own web crawler.
Frequently Asked Questions
What data source does OpenSEO use for backlink analysis?
OpenSEO uses the DataForSEO link index, a commercial backlink database accessed via REST API. This external service provides real-time access to live and broken backlink data without requiring OpenSEO to crawl the web itself.
How does OpenSEO filter internal backlinks?
The system passes exclude_internal_backlinks: true to both DataForSEO API endpoints. This parameter ensures that links originating from the same domain as the target are excluded at the data source level, before the results reach the application logic.
Why does OpenSEO limit results to 15 backlinks?
The constraint of 15 backlinks balances performance with utility. According to the source code in web/src/routes/api/backlink-check.ts, the limit surfaces the most authoritative referring domains (sorted by domain strength) while keeping API response times fast and reducing client-side rendering overhead for the backlink checker tool.
Is the DataForSEO integration available in the open-source version?
Yes, the DataForSEO integration is fully implemented in the open-source codebase. However, using the backlink analysis features requires valid DataForSEO API credentials, which are configured in src/server/lib/dataforseo/client.ts. Users must supply their own API keys to enable the functionality.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →