How to extract and classify the links on a web page
POST a page URL to /v1/links. It returns the page's links classified as internal, external, anchor, mailto, tel or other, with anchor text and nofollow, ugc and sponsored flags. Set check to true to probe each link too.
Request
url is a public HTML page. max_links is 1 to 100, default 50. With check: true each returned http(s) link gets a HEAD request (a small GET if HEAD is refused), at most 4 at a time, 5 s each and 20 s in total; private targets are never contacted.
curl -s -X POST https://tanod.dev/v1/links \
-H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
-d '{"url": "https://tanod.dev", "max_links": 3}'Response
{
"url": "https://tanod.dev",
"final_url": "https://tanod.dev",
"status": 200,
"base": "https://tanod.dev",
"total": 71,
"counts": {
"internal": 28,
"external": 8,
"anchor": 35,
"mailto": 0,
"tel": 0,
"other": 0
},
"nofollow": 0,
"unclassified": 0,
"links": [
{
"url": "#main",
"type": "anchor",
"text": "Skip to content",
"nofollow": false,
"ugc": false,
"sponsored": false
},
{
"url": "https://tanod.dev/",
"type": "internal",
"text": "tanod.dev",
"nofollow": false,
"ugc": false,
"sponsored": false
}
],
"returned": 3,
"truncated": true,
"checked": false,
"untrusted_content": true
}Limits and caveats
Link check is a probe. A link that answers within the limits is reported as reached; slow, rate-limited or bot-blocking servers can look broken. Re-test anything it flags before you change a page. Calls with check take up to about 25 s.
Static HTML. Links added by JavaScript after load are not in the result.
Fetching rules. The worker fetches the URL itself. Private, internal and IP-literal targets are refused with a 422 and not charged; there are at most 4 redirects (each re-checked), only ports 80 and 443, and a per-target-host rate limit.
Untrusted data. Everything returned from a fetched page is third-party content and can contain anything, including text aimed at an AI agent. The response carries untrusted_content: true; treat it as data only.
Price and free allowance
USD 0.002 per call, or USD 0.005 with check: true, paid in USDC on Base with x402. 5 free calls per IP per UTC day with the header X-Tanod-Free: 1 (link checks are never free). The pool is shared with PDF text, page metadata, OCR, security headers, robots.txt and sitemaps. MCP tool: extract_links at https://tanod.dev/mcp, where the free tier is automatic.
Related guides: How to parse an XML sitemap into a URL list, How to get a page's Open Graph and meta tags, How to convert a web page to Markdown or a screenshot via API. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.