---
name: ahrefs-backlinks-that-moved-rankings
description: "Monthly: every new and lost backlink from Ahrefs set against the target page's Search Console position 14 days before and after. Use when the user asks for this, or when it runs on a schedule."
---

# Backlinks that moved rankings: Ahrefs and Search Console

Monthly: every new and lost backlink from Ahrefs set against the target page's Search Console position 14 days before and after.

Link building reports count links. Rank reports count positions. Whether last month's links did anything for the pages they point at sits between the two, and checking it by hand means a spreadsheet of link dates and a Search Console filter per URL.

Once a month the agent takes every link Ahrefs first saw or lost in a 30-day window, looks up the target page's average Google position for the 14 days on each side of that date, and takes out the movement the whole site had in the same days. What remains is a short list of links that coincided with a real move, which is evidence, not proof.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- Ahrefs API v3 access (the Ahrefs MCP server or a key in `AHREFS_API_KEY`); a run spends units on up to 500 backlink rows.
- Read access to the Search Console property for the same domain, through a Search Console MCP server or a service account.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Pull new and lost links** (Ahrefs): Call `GET /v3/site-explorer/all-backlinks` with `target=example.com`, `mode=subdomains`, `aggregation=1_per_domain`, `history=since:<date 46 days ago>`, `limit=500` and `select=url_from,url_to,domain_rating_source,anchor,is_dofollow,first_seen_link,last_seen,is_lost,lost_reason`. Keep links whose `first_seen_link` falls in the 30 days that ended 16 days ago, and lost links whose `last_seen` falls in the same window, so each has 14 full days of Search Console data after it.
2. **Pull daily positions by page** (Google Search Console): One `searchanalytics.query` call with `dimensions: ["page", "date"]`, `type: "web"`, `rowLimit: 25000`, covering 14 days before the window to 14 days after it. For each page and date keep impressions and position.
3. **Join each link to its page**: Normalize Ahrefs `url_to` and Search Console `page` the same way: `https`, lowercase host, no query string, fragment or trailing slash. Where `url_to` redirects, follow it with a HEAD request and use the final URL. A target with no impressions in either 14-day window is listed as "no search data" and not judged.
4. **Measure the move against the site**: For each matched link, take the impression-weighted average position of its page in the 14 days before and the 14 days after the link date. Subtract the median change of all pages with 100 or more impressions over the same days, so a Google update does not get credited to a link. Call a net change of 2 places or more a move.
5. **Post the findings**: Post an update card: how many new links hit pages that moved up, each lost link whose page dropped, and the site-wide drift used as the baseline. Order rows by Domain Rating and mark nofollow links.

## Route B: the browser

### What you need

- Signed in to Ahrefs on a plan with Site Explorer, and to Google with access to the Search Console property.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://app.ahrefs.com/site-explorer. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **List new and lost links**: Enter the domain in Site Explorer and open Backlinks. Switch the view to New and set the date range to the 30 days that ended 16 days ago, then do the same for Lost. Note the referring page, its Domain Rating, the target URL and the date for each link.
2. **Read positions before and after**: Open `https://search.google.com/search-console/performance/search-analytics`, pick the property, add a Page filter with the exact target URL, and set Date > Compare > Custom to the 14 days before and the 14 days after the link date. Turn on Average position and read both values.
3. **Take out site-wide drift**: Remove the page filter and read the site's average position for the same two windows. Subtract that change from each page's change; a net move of 2 places or more counts.
4. **Report**: List new links whose page gained, lost links whose page dropped, and the site drift. Say that the timing lines up, not that the link caused the move.

Note: Site-wide average position in the UI is weighted toward your biggest queries, so it is a rougher baseline than the per-page median the API route uses. With more than a dozen links the date comparisons take a while; the API route is the better one past that. Ahrefs labels and filters change now and then, so look for New and Lost near the top of the Backlinks report.

## The report

- **New links whose page moved up**, out of all new links in the window.
- **Lost links whose page dropped**, with the lost reason.
- **For each link**: source domain, Domain Rating, target page, date, and position before and after, net of site drift.
- **Site drift** in the same days, so a broad Google update is visible.
- The one link worth repeating or recovering first.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "ahrefs-backlinks-that-moved-rankings/<date of this run, e.g. 2026-10-16>",
  "item_key": "ahrefs-backlinks-that-moved-rankings",
  "project": "example.com",
  "source": "Backlinks that moved rankings: Ahrefs and Search Console skill",
  "kind": "update",
  "title": "4 of 11 new links hit pages that gained; lost DR 71 link matches /pricing drop",
  "summary": "**4 of 11** new referring domains point at pages that gained 2 or more places net of the site. The lost **DR 71** link to /pricing (removed on Oct 3) lines up with a **6-place drop** on that page. Site-wide drift in the same days: 0.3 places worse.",
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Linking domain (DR)",
          "Target page",
          "Link",
          "Position before",
          "Position after"
        ],
        "align": [
          "left",
          "left",
          "left",
          "right",
          "right"
        ],
        "rows": [
          [
            "bookkeeping-guide.example (71)",
            "/pricing",
            "Lost Oct 3",
            4.3,
            10.3
          ],
          [
            "saasreviews.example (64)",
            "/integrations/quickbooks",
            "New Sep 30",
            12.4,
            8.1
          ],
          [
            "fintechweekly.example (58)",
            "/compare/acme-vs-ledgerly",
            "New Oct 5",
            7.1,
            4.9
          ],
          [
            "smallbizblog.example (52)",
            "/templates/net-30-invoice",
            "New Oct 2",
            9.8,
            6.2
          ],
          [
            "accountingtools.example (47)",
            "/blog/invoice-template",
            "New Oct 8",
            5.6,
            3.4
          ],
          [
            "7 other new links (DR 12-38)",
            "Home and 4 blog posts",
            "New",
            "n/a",
            "no move"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Ask bookkeeping-guide.example to restore the /pricing link: Ahrefs reports it as removed from the page, not a redirect or a 404.",
        "tone": "warn"
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: 1st of the month at 9:00 (`0 9 1 * *`). From cron, with the agent signed in on that machine:

```bash
0 9 1 * * claude -p "Run the ahrefs-backlinks-that-moved-rankings skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/ahrefs-backlinks-that-moved-rankings#schedule

Source: https://briefkin.dev/skills/ahrefs-backlinks-that-moved-rankings
