$ man link-extract
/link-extract(1)
PRICE / CALL
$0.005
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
webprobeCATEGORY
uncategorized
STATUS
● live
NAME
link-extract — link extractor / extract links from url / list all anchor links / page outlink crawler / scrape outbound links / get hrefs from page
SYNOPSIS
POST https://x402.org/v1/link-extract
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.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).
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| url | string | Page URL to fetch and extract from. http or https only. Private/loopback rejected. Redirects followed. | required |
| include_external_only | boolean | If true, drop same-host links. Default false. | optional |
| max_links | number | Max links to return (1-2000). Default 500. | optional |
| include_text | boolean | Include anchor visible text. Default true. | optional |
| timeout_ms | number | Fetch timeout. Default 12000, max 25000. | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| url | string | Original URL submitted by the caller before any redirect resolution. |
| final_url | string | URL after following redirects; used as the fallback base for resolving relative hrefs. |
| base_url | string | Effective base URL used to resolve relative links, from the page's <base> tag or final_url. |
| page_title | stringnull | Text inside the page's <title> tag, or null if the page has none. |
| links | array | Array of extracted anchors, each with href, anchor text, rel attribute, and is_external flag. |
| count | integer | Number of links returned in the links array after the 500-link cap is applied. |
| total_found | integer | Total anchor count discovered on the page before the max-link cap truncated the list. |
| truncated_at_max | boolean | True when total_found exceeded the 500-link cap and links was trimmed. |
| source | string | Identifier of the extractor pipeline that produced the result, e.g. link-extract worker name. |
| attribution | string | Required credit string for the link-extract endpoint when republishing the extracted data. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/link-extract \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the link-extract tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- linklinksextractanchorhrefcrawlerscrape
- methods
- POST
- cluster
- webprobe
- price
- $0.005 USDC per call
ADJACENT — other endpoints in webprobe
| endpoint | description | price |
|---|---|---|
| disposable-email-check | Disposable email detector / fake email filter / fraud signup defense. | $0.005 |
| domain-availability | Domain availability / RDAP lookup / WHOIS replacement / domain registration checker / expiry date lookup. | $0.005 |
| github-stars-history | GitHub stars history / star growth chart / repo popularity over time / trending tracker. | $0.005 |
| mcp-tools-list | MCP tools-list / Model Context Protocol discovery / list MCP server tools / tools/list JSON-RPC / agent capability discovery / MCP catalo… | $0.005 |
| sitemap-fetch | Sitemap fetcher / sitemap.xml parser / sitemap index resolver / SEO sitemap reader / robots.txt sitemap discovery / website URL inventory. | $0.005 |
| wikipedia | Wikipedia API / encyclopedia lookup. | $0.005 |
| wikipedia-lookup | Wikipedia API / encyclopedia lookup / structured article fetch. | $0.005 |
| homoglyph-check | Homoglyph attack detector / Unicode lookalike scanner. | $0.003 |
SEE ALSO