Link Extraction

List links found in a page's initial HTML, with anchor text and rel attributes. Links added by JavaScript can be missed.

Pay by wallet (x402) link-extract

Example

Input
{
  "url": "https://strale.dev"
}
Answer
{
  "links": [],
  "filter": "both",
  "source_url": "https://strale.dev",
  "total_links": 0
}

Inputs

FieldTypeRequiredWhat it is
urlstringYesURL to extract links from
filterstringNointernal, external, or both (default)

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
linksarrayAlways (present in every successful answer)
source_urlstringAlways (present in every successful answer)
total_linksintegerAlways (present in every successful answer)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "link-extract",
    "inputs": {
      "url": "https://strale.dev"
    },
    "max_price_cents": 3
  }'

Limitations

  • JavaScript-generated links can be missing

    Extracts links from static HTML — JavaScript-rendered links (SPAs, lazy-loaded content) may not be captured

    What to do instead: Check the rendered page manually for links added by JavaScript.

  • Pages are limited to 16 MiB of HTML

    Pages with more than 16 MiB of HTML are refused with a caller_input error naming the input field. The call is not charged, and the page is not retried through another fetch or rendering route.