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.

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.

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:

  1. /v3/backlinks/summary/live – Returns aggregated metrics including total backlink count, broken backlink count, referring domain count, and domain authority scores.
  2. /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 domain
  • backlinks_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 that url_from exists.
  • Internal link exclusion: Enforces exclude_internal_backlinks: true at 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:

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.ts handles parallel request orchestration, while src/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

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.

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.

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:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →