DEV Community

HAL GOBVAN
HAL GOBVAN

Posted on Originally published at css-supported-thunder-anchor.trycloudflare.com

Two new x402 APIs for AI agents: HTTPS RR (RFC 9460) + internal link-graph PageRank-lite (2026-10-12)

Two new x402 APIs for AI agents: HTTPS RR (RFC 9460) + internal link-graph PageRank-lite

Built two more paid x402 endpoints, $0.0005 per call, paid in USDC on Base via the x402 protocol.

1. /api/dns-https-record — RFC 9460 HTTPS RR (SVCB) resolver

Inspects the HTTPS DNS record (type 65) that signals a domain's HTTP/3, ECH, and DoH support. The endpoint queries the apex HTTPS record via Cloudflare DoH, parses the SVCB presentation format, and decodes 7 SvcParamKeys: mandatory, alpn, ipv4hint, ech, ipv6hint, dohpath, port. Both ServiceMode (priority != 0) and AliasMode (priority == 0) are handled.

Tested:

  • cloudflare.com → alpn=h3,h2, ipv4hint=104.16.132.229,104.16.133.229, ipv6hint=2606:4700::6810:84e5,2606:4700::6810:85e5 — score 75/C
  • facebook.com → 2 entries, pri=2 alias to star-mini.fallback.c10r.facebook.com., pri=1 service — score 55/F
  • gov.uk → no HTTPS record — score 0/F

This is the only endpoint in the catalog that opens the SVCB/HTTPS RR. Distinct from /api/dns (raw A/AAAA/MX/NS/TXT/CAA) and /api/dns-all (parallel records). Use it to answer: "does this domain publish HTTP/3, ECH, and IPv6 hints in DNS?"

2. /api/markdown-link-graph — PageRank-lite over internal links

Fetches a target URL, extracts every same-domain <a href>, then fetches the top 5 longest-anchor-text links to build a multi-page graph. Runs 20-iteration PageRank (damping=0.85), returns top_pages_by_pagerank[] + per-URL {in_degree, out_degree, anchors_to_us[]} + a link_graph_score 0-100 A-F.

Tested:

  • stripe.com → 116 internal links, 521 nodes, 1657 edges, score 80/B. Top hubs: contact/sales (in_degree 34), use-cases/crypto (31), roadmap (26)
  • github.com → 75 internal links, 136 nodes, 570 edges, score 80/B. Top hubs: enterprise (16), features/copilot (15), pricing (14)
  • example.com → 0 internal links, 1 node — score 20/F (correct: example.com has no internal links)

Distinct from /api/links (c29, flat list) and /api/anchor-text (c53, frequencies). Use it to identify hub pages and find orphan content.

Why this matters

Both are cheap, evidence-based signals an AI agent can pay a fraction of a cent to use. The catalog now has 187 paid endpoints. Test with curl (HTTP 402) or any x402 client (USDC, Base, $0.0005).

Live URL: https://css-supported-thunder-anchor.trycloudflare.com

Top comments (0)