{"uid":"cap_mqiVZyPXyzSNUpZD-Ar8J","slug":"link-extractor-anchor-href-scraper-43ba6253","name":"Link Extractor — Anchor Href Scraper","description":"Link extractor / extract links from URL / list all anchor links / page outlink crawler / scrape outbound links / get hrefs from page. Fetches an HTML URL and returns every <a> link with its anchor text, rel attribute, and an is_external flag. Resolves relative URLs against the page's <base> or final URL. Lighter than full scrape / metadata endpoints — exact tool for the agent task 'walk this page, pick which links to follow.' Default 500-link cap. SSRF-guarded (no loopback / RFC1918 targets).","url":"https://x402-deployer.x402-deployer.workers.dev/link-extract","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"required":["url"],"properties":{"url":{"type":"string","description":"Page URL to fetch and extract from. http or https only. Private/loopback targets are rejected. Redirects followed."},"max_links":{"type":"number","description":"Max links to return (1-2000). Default 500. Pagination beyond max isn't supported; tighten the URL instead."},"timeout_ms":{"type":"number","description":"Fetch timeout. Default 12000, max 25000."},"include_text":{"type":"boolean","description":"If true (default), include the anchor's visible text. Set false to skip text extraction."},"include_external_only":{"type":"boolean","description":"If true, drop same-host links. Default false (return all)."}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"url":{"type":"string"},"count":{"type":"integer"},"links":{"type":"array","items":{"type":"object","properties":{"rel":{"type":"string"},"href":{"type":"string"},"text":{"type":"string"},"is_external":{"type":"boolean"}}}},"source":{"type":"string"},"base_url":{"type":"string"},"final_url":{"type":"string"},"page_title":{"type":"string"},"attribution":{"type":"string"},"total_found":{"type":"integer"},"truncated_at_max":{"type":"boolean"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_BhJ5G-miELnJOSjD5MJiv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches an HTML page and returns every anchor link with its text, rel attribute, and whether it is external, up to a 500-link cap","exampleAgentPrompt":"Can you fetch https://en.wikipedia.org/wiki/Web_scraping and give me every anchor link on the page, including the anchor text and whether each link is external?","exampleUseCases":[{"title":"Discovery crawl for a site audit","prompt":"Pull all the links from https://www.example.com/blog and tell me which ones go to external domains so I can review our outbound link profile."},{"title":"Build a navigation map from a docs page","prompt":"Fetch https://docs.python.org/3/ and list every anchor link with its text so I can map out the top-level navigation sections to visit next."},{"title":"Competitive research link scan","prompt":"Grab all the outbound links from https://techcrunch.com/2024/05/01/ai-roundup/ and show me which external sites they're linking to, along with each link's anchor text."}],"resultDescription":"A JSON array of link objects, each containing the resolved absolute href, anchor text, rel attribute value, and a boolean is_external flag indicating whether the link points outside the page's origin. The response is capped at 500 links by default.","failureModes":["Target URL is a loopback or RFC1918 address — SSRF guard blocks the request","Target URL returns non-HTML content — no links extracted","Target page has more than 500 links — only first 500 returned","Target URL is unreachable or returns a non-2xx status — fetch error returned","Malformed or missing URL parameter — 4xx validation error"],"whenToPreferThis":"Choose this endpoint when you need a lightweight, fast list of all anchor links from a single page without full scraping or metadata extraction. Ideal for crawl-decision pipelines, outbound link audits, sitemap discovery, and any agent task that needs to enumerate which URLs on a page are worth following next. Prefer over full-page scrapers when you only need hrefs and anchor text, not page content or structured data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:39:35.269Z","isFirstParty":false}