Link Extraction
List links found in a page's initial HTML, with anchor text and rel attributes. Links added by JavaScript can be missed.
link-extract Example
{
"url": "https://strale.dev"
} {
"links": [],
"filter": "both",
"source_url": "https://strale.dev",
"total_links": 0
} Inputs
| Field | Type | Required | What it is |
|---|---|---|---|
url | string | Yes | URL to extract links from |
filter | string | No | internal, external, or both (default) |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
links | array | Always (present in every successful answer) |
source_url | string | Always (present in every successful answer) |
total_links | integer | Always (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
}' {
"tool": "strale_execute",
"arguments": {
"slug": "link-extract",
"inputs": {
"url": "https://strale.dev"
},
"max_price_cents": 3
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
capability_slug: "link-extract",
inputs: {
"url": "https://strale.dev"
},
max_price_cents: 3,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
capability_slug="link-extract",
inputs={
"url": "https://strale.dev",
},
max_price_cents=3,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/link-extract?url=https%3A%2F%2Fstrale.dev' 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.
Related tools
- Google Search €0.10
- Metadata Extraction €0.03
- Structured Page Extraction €0.20
- URL to Markdown Free
- URL to Text €0.02
- Web Page Screenshot €0.05