backlinks_bulk_referring_domains
Analyze backlink profiles for up to 1000 domains, subdomains, or pages to retrieve the total number of referring domains, including all live backlink types like nofollow, noreferrer, ugc, and sponsored.
Instructions
This endpoint will provide you with the number of referring domains pointing to domains, subdomains, and pages specified in the targets array. The returned numbers are based on all live referring domains, that is, total number of domains pointing to the target with any type of backlinks (e.g., nofollow, noreferrer, ugc, sponsored etc) that were found during the latest check. Note that if you indicate a domain as a target, you will get result for the root domain (domain with all of its subdomains), e.g. dataforseo.com and app.dataforseo.com
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | domains, subdomains or webpages to get rank for required field you can set up to 1000 domains, subdomains or webpages the domain or subdomain should be specified without https:// and www. the page should be specified with absolute URL (including http:// or https://) example: "targets": [ "forbes.com", "cnn.com", "bbc.com", "yelp.com", "https://www.apple.com/iphone/", "https://ahrefs.com/blog/", "ibm.com", "https://variety.com/", "https://stackoverflow.com/", "www.trustpilot.com" ] |
Implementation Reference
- The `handle` method implements the core logic of the tool by sending a POST request to the DataForSEO API endpoint `/v3/backlinks/bulk_referring_domains/live` with the targets array from input params, then validates and formats the response or handles errors.async handle(params: any): Promise<any> { try { const response = await this.client.makeRequest('/v3/backlinks/bulk_referring_domains/live', 'POST', [{ targets: params.targets }]); return this.validateAndFormatResponse(response); } catch (error) { return this.formatErrorResponse(error); } }
- Defines the Zod input schema for the tool, specifying the required `targets` parameter as an array of strings (domains, subdomains, or full URLs).getParams(): z.ZodRawShape { return { targets: z.array(z.string()).describe(`domains, subdomains or webpages to get rank for required field you can set up to 1000 domains, subdomains or webpages the domain or subdomain should be specified without https:// and www. the page should be specified with absolute URL (including http:// or https://) example: "targets": [ "forbes.com", "cnn.com", "bbc.com", "yelp.com", "https://www.apple.com/iphone/", "https://ahrefs.com/blog/", "ibm.com", "https://variety.com/", "https://stackoverflow.com/", "www.trustpilot.com" ]`) }; }
- src/core/modules/backlinks/backlinks-api.module.ts:37-37 (registration)Registers the tool by instantiating `BacklinksBulkReferringDomainsTool` within the `getTools()` method's tools array, which is then mapped to expose its name, description, params, and handler.new BacklinksBulkReferringDomainsTool(this.dataForSEOClient),
- src/core/modules/backlinks/backlinks-api.module.ts:54-61 (registration)The `reduce` operation in `getTools()` registers all tools, including this one, by mapping tool instances to an object keyed by tool name, exposing description, params schema, and a wrapper around the tool's `handle` method.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:10-10 (registration)Imports the `BacklinksBulkReferringDomainsTool` class necessary for its registration in the module.import { BacklinksBulkReferringDomainsTool } from './tools/backlinks-bulk-referring-domains.tool.js';