Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

backlinks_competitors

Identify websites competing for backlinks with a target domain by analyzing shared backlink profiles and intersection counts to inform competitive SEO strategies.

Instructions

This endpoint will provide you with a list of competitors that share some part of the backlink profile with a target website, along with a number of backlink intersections and the rank of every competing website

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetYesdomain, subdomain or webpage to get backlinks for required field 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 domains
offsetNooffset in the results array of returned networks optional field default value: 0 if you specify the 10 value, the first ten domains in the results array will be omitted and the data will be provided for the successive pages
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: ["rank",">","100"] [["target","like","%forbes%"], "and", [["rank",">","100"],"or",["intersections",">","5"]]]
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: ["rank,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: ["intersections,desc","rank,asc"]
main_domainNoindicates if only main domain of the target will be included in the search if set to true, only the main domain will be included in search
exclude_large_domainsNoindicates whether large domain will appear in results if set to true, the results from the large domain (google.com, amazon.com, etc.) will be omitted
exclude_internal_backlinksNoindicates if internal backlinks from subdomains to the target will be excluded from the results if set to true, the results will not include data on internal backlinks from subdomains of the same domain as target if set to false, internal links will be included in the results

Implementation Reference

  • The handle method implements the core logic of the backlinks_competitors tool, making a POST request to the DataForSEO Backlinks Competitors API endpoint and processing the response.
    async handle(params: any): Promise<any> {
      try {
        const response = await this.client.makeRequest('/v3/backlinks/competitors/live', 'POST', [{
          target: params.target,
          limit: params.limit,
          offset: params.offset,
          filters: this.formatFilters(params.filters),
          order_by: this.formatOrderBy(params.order_by),
          main_domain: params.main_domain,
          exclude_large_domains: params.exclude_large_domains,
          exclude_internal_backlinks: params.exclude_internal_backlinks
        }]);
        return this.validateAndFormatResponse(response);
    
      } catch (error) {
        return this.formatErrorResponse(error);
      }
    }
  • Defines the Zod schema for input parameters of the backlinks_competitors tool.
      getParams(): z.ZodRawShape {
        return {
          target: z.string().describe(`domain, subdomain or webpage to get backlinks for
            required field
    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 domains"),
          offset: z.number().min(0).optional().describe(
            `offset in the results array of returned networks
    optional field
    default value: 0
    if you specify the 10 value, the first ten domains in the results array will be omitted and the data will be provided for the successive pages`
          ),
          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:
    ["rank",">","100"]
    [["target","like","%forbes%"],
    "and",
    [["rank",">","100"],"or",["intersections",">","5"]]]`
          ),
          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:
    ["rank,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:
    ["intersections,desc","rank,asc"]`
          ),
          main_domain: z.boolean().optional().describe(`indicates if only main domain of the target will be included in the search
    if set to true, only the main domain will be included in search`).default(true),
          exclude_large_domains: z.boolean().optional().describe(`indicates whether large domain will appear in results
    if set to true, the results from the large domain (google.com, amazon.com, etc.) will be omitted`).default(true),
          exclude_internal_backlinks: z.boolean().optional().describe(`indicates if internal backlinks from subdomains to the target will be excluded from the results
    if set to true, the results will not include data on internal backlinks from subdomains of the same domain as target
    if set to false, internal links will be included in the results`).default(true)
        };
      }
  • Registers the BacklinksCompetitorsTool (line 39) among other tools in the BacklinksApiModule's getTools method, mapping it by name with description, params, and handler.
    getTools(): Record<string, ToolDefinition> {
      const tools = [
        new BacklinksTool(this.dataForSEOClient),
        new BacklinksAnchorTool(this.dataForSEOClient),
        new BacklinksBulkBacklinksTool(this.dataForSEOClient),
        new BacklinksBulkNewLostReferringDomainsTool(this.dataForSEOClient),
        new BacklinksBulkNewLostBacklinksTool(this.dataForSEOClient),
        new BacklinksBulkRanksTool(this.dataForSEOClient),
        new BacklinksBulkReferringDomainsTool(this.dataForSEOClient),
        new BacklinksBulkSpamScoreTool(this.dataForSEOClient),
        new BacklinksCompetitorsTool(this.dataForSEOClient),
        new BacklinksDomainIntersectionTool(this.dataForSEOClient),
        new BacklinksDomainPagesSummaryTool(this.dataForSEOClient),
        new BacklinksDomainPagesTool(this.dataForSEOClient),
        new BacklinksPageIntersectionTool(this.dataForSEOClient),
        new BacklinksReferringDomainsTool(this.dataForSEOClient),
        new BacklinksReferringNetworksTool(this.dataForSEOClient),
        new BacklinksSummaryTool(this.dataForSEOClient),
        new BacklinksTimeseriesNewLostSummaryTool(this.dataForSEOClient),
        new BacklinksTimeseriesSummaryTool(this.dataForSEOClient),
        new BacklinksBulkPagesSummaryTool(this.dataForSEOClient),
        new BacklinksFiltersTool(this.dataForSEOClient)
        // Add more tools here
      ];
    
      return tools.reduce((acc, tool) => ({
        ...acc,
        [tool.getName()]: {
          description: tool.getDescription(),
          params: tool.getParams(),
          handler: (params: any) => tool.handle(params),
        },
      }), {});
    }
  • Returns the tool name 'backlinks_competitors' used for registration and identification.
    getName(): string {
      return 'backlinks_competitors';
    }
  • Maps the tool name to its filter path 'competitors' in the available filters tool.
    'backlinks_competitors': 'competitors'
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While it mentions the output includes 'backlink intersections and the rank of every competing website', it doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication requirements, data freshness, or pagination behavior. For a tool with 8 parameters and no annotation coverage, this is a significant gap in behavioral context.

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 a single, efficient sentence that clearly states the tool's core functionality. It's appropriately sized and front-loaded with the main purpose. There's no wasted verbiage or unnecessary elaboration, though it could potentially benefit from a brief second sentence about usage context.

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?

For a tool with 8 parameters, no annotations, and no output schema, the description is insufficiently complete. While concise, it doesn't address behavioral aspects, usage context, or output format details. The agent would need to rely heavily on the input schema alone, missing important contextual information about how and when to use this tool effectively.

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%, so the schema already documents all 8 parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions 'backlink intersections' and 'rank' which relate to output, not input parameters. With complete schema coverage, the baseline score of 3 is appropriate.

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: to provide a list of competitors sharing backlink profiles with a target website, including backlink intersections and competitor ranks. It specifies the verb ('provide') and resource ('list of competitors'), but doesn't explicitly differentiate from sibling tools like 'backlinks_domain_intersection' or 'backlinks_referring_domains' that might also involve backlink analysis.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools in the 'backlinks_' category (e.g., 'backlinks_domain_intersection', 'backlinks_referring_domains'), there's no indication of how this tool differs or when it's the appropriate choice. The description only states what it does, not when to use it.

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