Skip to main content

Link Health API

developer
GET/v1/domain/link-health

Checks a bounded sample of document links and reports observed HTTP errors, redirect edges and static anchor diagnostics. Unavailable targets, scanner policy blocks, time budgets and sample limits remain explicit uncertainty; grade is null for incomplete checks.

What It Does

Resolves relative links against the final document URL and base element, validates redirect targets, handles HEAD-to-GET retries through the same redirect path, and enforces one remaining-time budget across each chain. Reports discovered, sampled, verified, unknown and skipped counts with sampling strategy. Terminal responses are not counted as redirect hops; unresolved chains are unknown, not successful redirects.

Why It's Useful

Broken links damage SEO rankings, user experience, and credibility. Redirect chains dilute link equity and slow page loads. Regular link health checks prevent these issues from accumulating.

Use Cases

SEO Specialist

Broken Link Audit

Scan pages for broken internal and external links that return 404 or 5xx errors.

Fix broken links before they impact search rankings and user experience.

Web Developer

Post-Migration Validation

After a site migration, verify all links still resolve correctly and redirect chains are minimal.

Catch link issues introduced during migration before they impact traffic.

Content Manager

Content Quality Check

Audit anchor text quality across the site to identify generic or empty link text.

Improve internal linking with descriptive anchor text for better SEO.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredThe domain to check link health forExample: example.com
limitquerynumberOptionalMaximum number of links to check (1-200, default: 50)Example: 50

Response Fields

Result fields below are inside the JSON data object. Any row named meta describes the sibling response metadata object. See response and error handling for status codes and error responses. Optional observations may be absent or null; inspect warnings and partial-failure fields before treating a missing result as a negative finding.

FieldTypeDescription
domainstringThe checked domain
summaryobjectTotal, broken, redirected, healthy, and timeout link counts
brokenLinksarrayBroken links with status codes and anchor text
redirectChainsarrayRedirect chains with hop counts and status codes
redirectChainAnalysisobjectChain-length grading vs Google Search Central guidance (≤3 hops): count, maxHops, overGoogleRecommendedCount (>3), criticalCount (>5)
linkAttributesobjectCounts of nofollow, sponsored, ugc attributes
anchorTextobjectAnchor text quality analysis
scorenumberLink health score 0-100
gradestringLetter grade A-F
breakdownobjectPer-component score breakdown with weights for broken links, redirects, anchor text, empty anchors, nofollow ratio, internal/external balance, and status distribution
recommendationsarraySpecific link fixes to implement

Code Examples

Replace YOUR_API_KEY with your API key. This endpoint requires the developer plan or higher; see plans and usage limits.

cURL
curl --request GET 'https://api.edgedns.dev/v1/domain/link-health?domain=example.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/domain/link-health?domain=example.com",
  {
    "method": "GET",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
);

if (!response.ok) {
  throw new Error(`EdgeDNS returned HTTP ${response.status}`);
}
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    'GET',
    "https://api.edgedns.dev/v1/domain/link-health?domain=example.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Link Health guide

Learn the concepts, choose a practical workflow, and interpret the observations from Link Health before acting on them. Run supported checks via MCP or through REST.

Read the guide →

    Related Endpoints

    External References

    Learn more about the standards and protocols behind this endpoint.

    Try This Endpoint

    Test the Link Health endpoint live in the playground.

    Link Health API Reference | EdgeDNS