Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

backlinks_domain_intersection

Identify domains linking to competitors but not to your website to uncover link gap opportunities for SEO strategy improvement.

Instructions

This endpoint will provide you with the list of domains pointing to the specified websites. This endpoint is especially useful for creating a Link Gap feature that shows what domains link to your competitors but do not link out to your website

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetsYesdomains, subdomains or webpages to get links for required field you can set up to 20 domains, subdomains or webpages a domain or a subdomain should be specified without https:// and www. a page should be specified with absolute URL (including http:// or https://)
limitNothe maximum number of returned results
offsetNooffset in the array of returned results optional field default value: 0 if you specify the 10 value, the first ten backlinks in the results array will be omitted and the data will be provided for the successive backlinks
filtersNoarray of results filtering parameters optional field you can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, =, <>, in, not_in, like, not_like, ilike, not_ilike, match, not_match you can use the % operator with like and not_like to match any string of zero or more characters example: ["1.internal_links_count",">","1"] [["2.referring_pages",">","2"], "and", ["1.backlinks",">","10"]] [["1.first_seen",">","2017-10-23 11:31:45 +00:00"], "and", [["2.target","like","%dataforseo.com%"],"or",["1.referring_domains",">","10"]]]
order_byNoresults sorting rules optional field you can use the same values as in the filters array to sort the results possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order you should use a comma to set up a sorting type example: ["backlinks,desc"] note that you can set no more than three sorting rules in a single request you should use a comma to separate several sorting rules example: ["backlinks,desc","rank,asc"]

Implementation Reference

  • The handle method implements the core logic of the backlinks_domain_intersection tool, making a POST request to the DataForSEO API endpoint '/v3/backlinks/domain_intersection/live' with formatted parameters and handling the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.client.makeRequest('/v3/backlinks/domain_intersection/live', 'POST', [{
          targets: mapArrayToNumberedKeys(params.targets),
          limit: params.limit,
          offset: params.offset,
          filters: this.formatFilters(params.filters),
          order_by: this.formatOrderBy(params.order_by),
        }]);
        return this.validateAndFormatResponse(response);
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Zod schema defining the input parameters for the tool: targets (required array of domains/pages), limit, offset, filters, and order_by.
      getParams(): z.ZodRawShape {
        return {
          targets: z.array(z.string()).describe(`domains, subdomains or webpages to get links for
    required field
    you can set up to 20 domains, subdomains or webpages
    a domain or a subdomain should be specified without https:// and www.
    a page should be specified with absolute URL (including http:// or https://)`),
          limit: z.number().min(1).max(1000).default(10).optional().describe("the maximum number of returned results"),
          offset: z.number().min(0).optional().describe(
            `offset in the array of returned results
    optional field
    default value: 0
    if you specify the 10 value, the first ten backlinks in the results array will be omitted and the data will be provided for the successive backlinks`
          ),
          filters: z.array(
            z.union([
              z.array(z.union([z.string(), z.number(), z.boolean()])).length(3),
              z.enum(["and", "or"])
            ])
          ).max(8).optional().describe(
            `array of results filtering parameters
    optional field
    you can add several filters at once (8 filters maximum)
    you should set a logical operator and, or between the conditions
    the following operators are supported:
    regex, not_regex, =, <>, in, not_in, like, not_like, ilike, not_ilike, match, not_match
    you can use the % operator with like and not_like to match any string of zero or more characters
    example:
    ["1.internal_links_count",">","1"]
    [["2.referring_pages",">","2"],
    "and",
    ["1.backlinks",">","10"]]
    
    [["1.first_seen",">","2017-10-23 11:31:45 +00:00"],
    "and",
    [["2.target","like","%dataforseo.com%"],"or",["1.referring_domains",">","10"]]]`
          ),
          order_by: z.array(z.string()).optional().describe(
            `results sorting rules
    optional field
    you can use the same values as in the filters array to sort the results
    possible sorting types:
    asc – results will be sorted in the ascending order
    desc – results will be sorted in the descending order
    you should use a comma to set up a sorting type
    example:
    ["backlinks,desc"]
    note that you can set no more than three sorting rules in a single request
    you should use a comma to separate several sorting rules
    example:
    ["backlinks,desc","rank,asc"]`
          ),
        };
      }
  • The BacklinksDomainIntersectionTool is instantiated and registered within the getTools() method of BacklinksApiModule, adding it to the module's tools map.
    new BacklinksDomainIntersectionTool(this.dataForSEOClient),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool 'will provide you with the list of domains,' implying a read-only operation, but lacks details on permissions, rate limits, pagination (beyond the 'limit' and 'offset' parameters), error handling, or response format. For a tool with 5 parameters and no annotations, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with two sentences: one stating the purpose and another providing usage context. It's front-loaded with the core functionality and avoids unnecessary details. However, it could be slightly more structured by explicitly mentioning key parameters or limitations, but it's efficient and wastes no words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (5 parameters, no annotations, no output schema), the description is incomplete. It explains the purpose and a use case but lacks information on behavioral traits (e.g., data freshness, API constraints), output format, or error scenarios. For a tool that likely returns structured data with filtering and sorting, more context is needed to guide effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning the input schema already documents all parameters thoroughly. The description doesn't add any specific meaning or examples beyond what's in the schema (e.g., it doesn't clarify 'targets' beyond 'websites' or explain 'filters' in simpler terms). With high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't detract.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'provide you with the list of domains pointing to the specified websites.' It specifies the verb ('provide') and resource ('domains pointing to websites'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'backlinks_referring_domains' or 'backlinks_page_intersection,' which might offer similar functionality, so it doesn't reach a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: 'especially useful for creating a Link Gap feature that shows what domains link to your competitors but do not link out to your website.' This gives a specific use case (competitive analysis for link gaps), but it doesn't explicitly state when not to use it or name alternatives among the sibling tools, which prevents a score of 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ravinwebsurgeon/seo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server