Extract Links
web.extract_links
Overview
You send HTML or Markdown and we gather the links out of it: anchors, images, and head link elements from HTML, and inline links, images, and autolinks from Markdown. Relative URLs resolve against the baseUrl you give us, hosts and default ports get tidied, repeats collapse, and anything using a javascript:, vbscript:, data:, or file: scheme is flagged so you can drop it before display. Nothing is fetched, so reach for web.check_url_status when you need to know a link actually works. Accepts file input via file_ref — no need to extract file content first.
Guessing URLs out of prose with a pattern goes wrong on real documents, and you want the same tidy list every time so you can compare two runs.
Reliability
Same document and same options always give the same list, and nothing leaves the platform. Worth knowing before you rely on it: HTML is repaired rather than rejected, so malformed markup still yields whatever links survived; the Markdown path is pattern-based, so it reads inline and autolink forms but not reference-style definitions, and it can pick up a link inside a fenced code block; an unsafe scheme is flagged rather than removed, so filter on unsafe yourself; and we stop after 50000 links, silently. Bad input is rejected outright and retrying will not help — sending neither content nor file_ref, a missing or unrecognised format, a file reference we cannot read for you, or content beyond 2097152 bytes.
Context footprint
The reply grows with the document: a link-heavy page can return thousands of entries, so deduplicate and drop fragment-only links to keep it small. A successful call costs 1 execution credit.
When to use it
When you want every link in a document, ready to audit, deduplicate, or queue.
When you need to know whether the links work, or when only the page's own metadata interests you.
Runs on jsoup for the HTML side; the Markdown side uses bounded pattern matching.
Scope
Non-goals
- Does not fetch a link, or check that one resolves
- Does not render the document
- Does not follow Markdown reference-style definitions
- Does not strip an unsafe link, only marks it for you
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 2 MiB | Skill maximum |
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| content | string | No | Bounded inline source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque file reference. Omit it when inline source is supplied. |
| format | string | No | Source format; omit it for html. |
| baseUrl | string | No | Optional absolute base URL for relative links; omit it to preserve them. |
| includeAnchors | boolean | No | Whether fragment-only links are returned; omit it for true. |
| normalize | boolean | No | Whether destinations are normalized; omit it for true. |
| deduplicate | boolean | No | Whether duplicate destinations collapse; omit it for true. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| ok | boolean | Yes | Whether source parsing completed successfully. |
| links | array | Yes | Bounded array of discovered link receipts in document order. The item shape is defined by the nested schema and the array contains from 0 through 100000 items. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"web.extract_links","input":{"content":"See [Example](https://example.com/page)","format":"markdown"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("web.extract_links", {"format":"html","content":"<a href=\"https://Example.com\" rel=\"noopener\">Our site</a>"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not fetch a link, or check that one resolves
- Does not render the document
- Does not follow Markdown reference-style definitions
- Does not strip an unsafe link, only marks it for you
- Confirming a link responds — reach for web.check_url_status
- Reading page metadata, which web.extract_html_metadata covers
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "web.extract_links",
"input": {
"format": "html",
"content": "<a href=\"https://Example.com\" rel=\"noopener\">Our site</a>"
}
}Examples
Anchor from HTML, tidied for comparison
{
"format": "html",
"content": "<a href=\"https://Example.com\" rel=\"noopener\">Our site</a>"
}{
"ok": true,
"links": [
{
"normalizedUrl": "https://example.com/",
"url": "https://Example.com",
"source": "anchor",
"text": "Our site",
"rel": "noopener"
}
]
}Markdown inline link with its offsets
{
"format": "markdown",
"content": "See [Example](https://example.com/page)"
}{
"ok": true,
"links": [
{
"normalizedUrl": "https://example.com/page",
"url": "https://example.com/page",
"start": 4,
"source": "anchor",
"end": 39
}
]
}Recommended use cases
- Plan a crawl or a link audit from HTML or Markdown you saved
- Collect the citation and reference URLs out of a document
- Spot javascript: and data: links before you render them
Avoid for
- Confirming a link responds — reach for web.check_url_status
- Reading page metadata, which web.extract_html_metadata covers
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.