Skip to main content
Glama
ravinwebsurgeon

DataForSEO MCP Server

backlinks_bulk_new_lost_backlinks

Analyze and track new and lost backlinks for up to 1,000 domains, subdomains, or pages. Use this tool to monitor backlink changes over time, identify referring domains, and optimize your SEO strategy based on live backlink data.

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

TableJSON Schema
NameRequiredDescriptionDefault
date_fromNostarting date of the time range optional field this field indicates the date which will be used as a threshold for new and lost backlinks; the backlinks that appeared in our index after the specified date will be considered as new; the backlinks that weren’t found after the specified date, but were present before, will be considered as lost; default value: today’s date -(minus) one month; e.g. if today is 2021-10-13, default date_from will be 2021-09-13. minimum value equals today’s date -(minus) one year; e.g. if today is 2021-10-13, minimum date_from will be 2020-10-13. date format: "yyyy-mm-dd" example: "2021-01-01"
targetsYesdomains, 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 main handler function that executes the tool logic by making a POST request to the DataForSEO API endpoint '/v3/backlinks/bulk_new_lost_backlinks/live' with the targets parameter.
    async handle(params: any): Promise<any> { try { const response = await this.client.makeRequest('/v3/backlinks/bulk_new_lost_backlinks/live', 'POST', [{ targets: params.targets }]); return this.validateAndFormatResponse(response); } catch (error) { return this.formatErrorResponse(error); } }
  • Zod schema defining the input parameters: 'targets' (required array of strings for domains/subdomains/pages) and 'date_from' (optional string for time range start).
    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" ]`), date_from: z.string().optional().describe(`starting date of the time range optional field this field indicates the date which will be used as a threshold for new and lost backlinks; the backlinks that appeared in our index after the specified date will be considered as new; the backlinks that weren’t found after the specified date, but were present before, will be considered as lost; default value: today’s date -(minus) one month; e.g. if today is 2021-10-13, default date_from will be 2021-09-13. minimum value equals today’s date -(minus) one year; e.g. if today is 2021-10-13, minimum date_from will be 2020-10-13. date format: "yyyy-mm-dd" example: "2021-01-01"`) }; }
  • Instantiation of the BacklinksBulkNewLostBacklinksTool in the getTools() method of BacklinksApiModule, which registers it into the tools record.
    new BacklinksBulkNewLostBacklinksTool(this.dataForSEOClient),
  • The reduce function in getTools() that registers all tools, including this one, by mapping tool name to its description, params, and handler.
    return tools.reduce((acc, tool) => ({ ...acc, [tool.getName()]: { description: tool.getDescription(), params: tool.getParams(), handler: (params: any) => tool.handle(params), }, }), {}); }
  • The getName() method that defines the tool's name as 'backlinks_bulk_new_lost_backlinks'.
    getName(): string { return 'backlinks_bulk_new_lost_backlinks'; }

Other Tools

Related 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