A nofollow link checker answers two different questions, and a coding agent can handle both. The first is about your own pages: which outbound links carry rel="nofollow", sponsored or ugc, and which paid links are missing one. The second is about other sites: what share of the links pointing at a domain are followed. The first needs a short script. The second needs link data you don't have locally, which is where an API comes in.
Part 1: audit the rel values on your own pages
No paid tool is needed to read your own HTML. Ask Claude Code, Cursor or Codex to write something like this and run it against a list of URLs:
// check-rel.mjs: list outbound links and their rel values
const url = process.argv[2];
const html = await (await fetch(url)).text();
const host = new URL(url).host;
for (const [, attrs] of html.matchAll(/<a\b([^>]*)>/gi)) {
const href = attrs.match(/href\s*=\s*["']([^"']+)/i)?.[1];
if (!href || !/^https?:/i.test(href)) continue;
if (new URL(href).host === host) continue;
const rel = attrs.match(/rel\s*=\s*["']([^"']*)/i)?.[1] ?? "";
const tokens = rel.toLowerCase().split(/[\s,]+/).filter(Boolean);
const label = ["sponsored", "ugc", "nofollow"].filter((t) => tokens.includes(t));
console.log(label.join(" ") || "followed", href);
}
A few details make the output trustworthy:
- Split on spaces and commas. Google's outbound links guide accepts both
rel="ugc nofollow"andrel="ugc,nofollow". - Ignore
noopenerandnoreferrer. They control browser behavior, such as the Referer header andwindow.opener, and say nothing to search engines. - Read the page-level rule too. A
<meta name="robots" content="nofollow">tag, ornone, or anX-Robots-Tag: nofollowheader, applies to every link on the page. Have the agent checkres.headers.get("x-robots-tag")and the meta tag before trusting per-link results. - Regex is fine for an audit, not for production. Links injected by JavaScript won't appear in the fetched HTML.
Then give the agent the rule it should flag. Google's spam policies say paid links are fine only with rel="sponsored" or rel="nofollow". So keep a list of affiliate and sponsor domains, and have the script fail when one of them shows up as "followed". That turns a policy into a CI check.
What the script should not flag: plain links to sources you trust. Google says regular links need no rel at all. And internal links are a separate matter; for those, Google points to robots.txt disallow rather than nofollow.
Part 2: check who links to a domain, and how
For inbound links you need a link index. seogeoaeo.ai exposes its tools over MCP and REST with a workspace API key, and agent runs cost the same credits as browser runs. Its Backlink Finder takes one public URL, reduces it to the domain, and returns the 100 strongest linking sites. Each comes with a link rank from 0 to 1,000, the number of links, the first-seen date, a spam score, and the share of that site's linking pages that are followed rather than nofollow. It also returns the 50 most used link texts, grouped.
curl -X POST https://seogeoaeo.ai/api/v1/tools/backlink-finder/runs \
-H "Authorization: Bearer $SEOGEOAEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"url":"https://example.com"},"maxCredits":70}'
A run costs 70 credits. maxCredits makes the API refuse a run priced above your cap, and an idempotencyKey lets a retry return the original run instead of charging twice. Over MCP, the tool is named backlink-finder and takes the same arguments.
If you only need a single number, the Domain Overview tool (50 credits) reports the share of a domain's links that use nofollow, together with its rankings and link counts.
What the numbers can and cannot tell you
Google has read nofollow, sponsored and ugc as hints since its 2019 change, and nofollow became a crawling and indexing hint on March 1, 2020. So a followed share is a description of how other sites mark their links, not a measure of what Google counts. The Backlink Finder says as much: its figures are the data provider's estimates, it lists the strongest 100 sites rather than every link, and it works per domain, not per page.
A sensible agent workflow is to run Part 1 on every deploy, since it is free, and Part 2 once a month for your domain and one competitor, writing the followed share to a file you can compare over time. At 70 credits a run, two lookups a month use 140 of the 2,000 credits in the $29 Indie plan, and the agent can check its balance with the free check-credits tool before it starts.