{"uid":"cap_GtdQ3MMMCnk-HzkCwR_W_","slug":"html-link-extractor-424cb1fe","name":"HTML Link Extractor","description":"List all links in supplied HTML with text, rel flags, absolute URL (against a base) and internal/external split.","url":"https://markup-tools.x402tookit.com/html-links?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["html"],"properties":{"base":{"type":"string","description":"Absolute http(s) URL of the page, used to resolve relative links and judge internal vs external"},"html":{"type":"string","description":"HTML to scan, up to 20000 characters (longer is refused with 400)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"links":{"type":["array","null"],"items":{"type":"object","properties":{"rel":{"type":["array","null"],"items":{"type":"string"}},"ugc":{"type":["boolean","null"]},"url":{"type":["null","string"]},"href":{"type":["null","string"]},"text":{"type":["null","string"]},"scope":{"type":["null","string"]},"title":{},"hidden":{"type":["boolean","null"]},"target":{},"nofollow":{"type":["boolean","null"]},"sponsored":{"type":["boolean","null"]}}}},"total":{"type":["null","number"]},"counts":{"type":["null","object"],"properties":{"external":{"type":["null","number"]},"fragment":{"type":["null","number"]},"internal":{"type":["null","number"]},"non-http":{"type":["null","number"]}}},"source":{"type":["null","string"]},"reasons":{"type":["array","null"]},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"truncated":{"type":["boolean","null"]},"disclaimer":{"type":["null","string"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"effectiveBase":{"type":["null","string"]},"uniqueResolvedUrls":{"type":["null","number"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_biyVUWGIJY1CeZXtiSaTd","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts all hyperlinks from supplied HTML, returning text, rel flags, absolute URLs, and internal/external classification","exampleAgentPrompt":"Can you extract all the links from this HTML and tell me which ones are internal vs external, and flag any that are nofollow or sponsored? Here's the HTML: <html><body><a href='/about' rel='nofollow'>About</a><a href='https://external.com'>Ext</a></body></html> — the base URL is https://mysite.com.","exampleUseCases":[{"title":"SEO outbound link audit","prompt":"I need to audit all the external links on this page — can you parse this HTML and list every outbound link with its text, URL, and whether it's nofollow or sponsored? Base URL is https://myblog.com. Here's the HTML: <paste>."},{"title":"Internal navigation structure check","prompt":"Can you scan this HTML for all internal links relative to https://example.com and give me a count of how many internal vs external links there are? HTML: <paste>."},{"title":"Sponsored and UGC link detection","prompt":"I have this comment section HTML from https://forum.example.com — can you extract all the links and flag which ones are ugc or sponsored so I can review them for policy compliance? HTML: <paste>."}],"resultDescription":"Returns a structured list of all links found in the HTML, each with: href (original), url (resolved absolute), text (anchor text), rel array, nofollow/ugc/sponsored boolean flags, scope (internal/external/fragment/non-http), hidden status, target, and title. Also includes aggregate counts by scope, total links, unique resolved URLs, the effective base URL used, and truncation/degraded status flags.","failureModes":["HTML exceeds 20,000 characters — returns 400 error","Missing required 'html' query parameter — returns 400","Invalid or non-HTTP base URL causes relative links to remain unresolved","Malformed HTML may cause incomplete link extraction","Very large numbers of links may result in truncated response with truncated flag set to true"],"whenToPreferThis":"Choose this endpoint when you need a structured, machine-readable breakdown of all hyperlinks in a known HTML snippet — especially when you need rel-flag details (nofollow, ugc, sponsored), internal vs external classification, or absolute URL resolution against a known base. Prefer over a generic scraper when you already have the HTML content and need link-specific metadata rather than full page content extraction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T12:31:05.804Z","isFirstParty":false,"canonicalSlug":"html-link-extractor-424cb1fe"}