backlinks_referring_domains
Analyze referring domains pointing to a target domain, subdomain, or webpage to assess backlink profiles and SEO authority.
Instructions
This endpoint will provide you with a detailed overview of referring domains pointing to the target you specify
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | 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 | No | the maximum number of returned pages | |
| offset | No | offset in the results array of returned pages optional field default value: 0 if you specify the 10 value, the first ten pages in the results array will be omitted and the data will be provided for the successive pages | |
| filters | No | 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: ["meta.internal_links_count",">","1"] [["meta.external_links_count",">","2"], "and", ["backlinks",">","10"]] [["first_visited",">","2017-10-23 11:31:45 +00:00"], "and", [["title","like","%seo%"],"or",["referring_domains",">","10"]]] | |
| order_by | No | 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: ["page_summary.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: ["page_summary.backlinks,desc","page_summary.rank,asc"] |
Implementation Reference
- The main handler function that executes the tool logic by making a POST request to the DataForSEO Backlinks API '/v3/backlinks/referring_domains/live' endpoint with the provided parameters, formats filters and order_by, and handles response or errors.async handle(params: any): Promise<any> { try { const response = await this.client.makeRequest('/v3/backlinks/referring_domains/live', 'POST', [{ target: params.target, 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); } }
- Defines the Zod schema for input parameters: target (required string), limit, offset, filters (complex array), order_by.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 pages"), offset: z.number().min(0).optional().describe( `offset in the results array of returned pages optional field default value: 0 if you specify the 10 value, the first ten pages 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: ["meta.internal_links_count",">","1"] [["meta.external_links_count",">","2"], "and", ["backlinks",">","10"]] [["first_visited",">","2017-10-23 11:31:45 +00:00"], "and", [["title","like","%seo%"],"or",["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: ["page_summary.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: ["page_summary.backlinks,desc","page_summary.rank,asc"]` ), }; }
- src/core/modules/backlinks/backlinks-api.module.ts:54-61 (registration)Registers the tool in the BacklinksApiModule's getTools() method by including its instance in the tools array and reducing to a map with name, description, params, and handler wrapper.return tools.reduce((acc, tool) => ({ ...acc, [tool.getName()]: { description: tool.getDescription(), params: tool.getParams(), handler: (params: any) => tool.handle(params), }, }), {});
- src/core/modules/backlinks/backlinks-api.module.ts:44-44 (registration)Instantiates the BacklinksReferringDomainsTool with the DataForSEO client for registration in the module.new BacklinksReferringDomainsTool(this.dataForSEOClient),
- Maps the tool name to its corresponding filter path 'referring_domains' for use in the filters tool.private static readonly TOOL_TO_FILTER_MAP: { [key: string]: string } = { 'backlinks_content_duplicates': 'content_duplicates', 'backlinks_backlinks': 'backlinks', 'backlinks_domain_pages': 'domain_pages', 'backlinks_anchors': 'anchors', 'backlinks_referring_domains': 'referring_domains', 'backlinks_domain_intersection': 'domain_intersection', 'backlinks_page_intersection': 'page_intersection', 'backlinks_referring_networks': 'referring_networks', 'backlinks_domain_pages_summary': 'domain_pages_summary', 'backlinks_competitors': 'competitors' };