Skip to main content

Resource Hints API

developer
GET/v1/domain/resource-hints

Discovers resource hints (preconnect, prefetch, preload, dns-prefetch) configured on a webpage. Reveals third-party dependencies and performance optimization strategies.

What It Does

Parses HTML for link rel="preconnect", "prefetch", "preload", and "dns-prefetch" tags. Identifies which external domains are prioritized, what resources are preloaded, and analyzes the performance optimization strategy.

Why It's Useful

Resource hints reveal critical third-party dependencies and performance priorities. They expose which services a site relies on and provide insights into their performance optimization approach.

Use Cases

Performance Engineer

Performance Analysis

Analyze resource hints to understand performance optimization strategy.

Learn from competitor performance optimizations.

Security Analyst

Third-Party Discovery

Identify critical third-party dependencies from preconnect hints.

Map supply chain dependencies for security assessment.

SEO Specialist

SEO Audit

Verify resource hints are properly configured for Core Web Vitals.

Optimize page performance for better search rankings.

Parameters

NameLocationTypeRequiredDescription
domainquerystringRequiredDomain or full URL — accepts `example.com` or `https://example.com/path`.Example: https://example.com

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 analyzed domain (bare hostname).
urlstringFull URL that was fetched, echoing the protocol used in the request.
preconnectarrayHrefs with preconnect hints (legacy flat form)
preconnectEntriesarrayStructured preconnect entries: { href, crossorigin, media, source: "html" | "link-header" }
prefetcharrayResources marked for prefetch (legacy flat form)
prefetchEntriesarrayStructured prefetch entries with source
preloadarrayPreload entries: { href, as, type, crossorigin, media, fetchpriority, source }
dnsPrefetcharrayDomains with DNS prefetch (legacy flat form)
dnsPrefetchEntriesarrayStructured dns-prefetch entries with source
prerenderarrayPages marked for prerender (legacy; use Speculation Rules)
prerenderEntriesarrayStructured prerender entries with source
speculationRulesobjectModern Speculation Rules API rules parsed from <script type="speculationrules"> — { prerender: [...], prefetch: [...], raw }
bySourceobjectCount of hints by origin: { html, linkHeader }. Reveals CDN-injected hints
earlyHintsRecommendedbooleanTrue when the CDN supports 103 Early Hints and the origin already publishes Link headers
duplicatesarrayHrefs hinted multiple ways (e.g. preload + preconnect, or HTML + Link header) — wasted bytes
issuesarrayStructured issues: missing `as`, font preload without crossorigin, multiple fetchpriority=high, etc.
totalCountnumberTotal resource hints found
recommendationsarrayOptimization suggestions based on web.dev 2026 guidance
preconnectCountnumberCount of observed preconnect hints.
dnsPrefetchCountnumberCount of observed DNS-prefetch hints.
preloadCountnumberCount of observed preload hints.
prefetchCountnumberCount of observed prefetch hints.
prerenderCountnumberCount of observed prerender hints.

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/resource-hints?domain=https%3A%2F%2Fexample.com' \
  --header "Authorization: Bearer YOUR_API_KEY"
JavaScript
const response = await fetch(
  "https://api.edgedns.dev/v1/domain/resource-hints?domain=https%3A%2F%2Fexample.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/resource-hints?domain=https%3A%2F%2Fexample.com",
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    timeout=60,
)
response.raise_for_status()
data = response.json()
print(data)

Read the full Resource Hints guide

Learn the concepts, choose a practical workflow, and interpret the observations from Resource Hints 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 Resource Hints endpoint live in the playground.

    Resource Hints API Reference | EdgeDNS