ForHosting KIT · Text & AI

Extract links from Markdown

Get every link of a Markdown text as a clean list of label and address: the sample yields 4 links, from setup guide to Home, with reference links such as [support][] resolved to their real address. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon

Turn Markdown source into a clean list of links without rendering the document or writing a custom parser. The extractor finds ordinary inline links and reference-style links, resolves reference definitions, and returns each visible link text beside its destination URL in source order. Images and link-like examples inside code are ignored, while documents without links return an empty list. The process is deterministic, requires no network access, and works equally well for a README, documentation page, changelog, issue template, or generated Markdown file.

Extract link text and destinations in one request

Paste the complete Markdown source into the <code>text</code> field. The result contains a <code>links</code> array, and every record has a <code>text</code> value for the visible label and a <code>url</code> value for its destination. Inline links such as <code>[Setup guide](https://example.com/setup)</code> are returned directly.

Links remain in the order in which readers encounter them, so the output can support audits, migrations, or reports without another sorting pass. Repeated links are retained because each occurrence may matter when checking navigation or measuring how frequently a destination is promoted. Empty Markdown is handled the same way.

Handle reference syntax without mistaking examples for links

Markdown references can use explicit labels, collapsed labels, or shortcut form. The extractor supports <code>[label][id]</code>, <code>[label][]</code>, and <code>[label]</code> when a matching definition exists. Reference labels are resolved without case sensitivity, and runs of whitespace are normalized, reflecting how authors commonly format long documents.

Angle-bracket destinations and optional definition titles are accepted, but titles are not included because the capability returns only the requested text and target URL. Image syntax beginning with an exclamation mark is excluded: an image destination is a resource source, not a navigational link. Fenced code blocks and inline code spans are also ignored, which prevents documentation examples from polluting a real link inventory.

Reference definition lines do not become output records by themselves; only actual link uses are emitted.

Use structured links in documentation workflows

A link inventory is useful before moving documentation, changing a domain, or checking whether a repository still points at retired services. Feed each returned URL into an approved validation stage, group destinations by host, or compare results between two revisions to see which links were added and removed. Content teams can collect visible labels to find vague phrases such as “click here,” while developers can identify repeated dependency references across generated README files.

The capability does not fetch URLs, test response status, expand redirects, or modify the Markdown. Those deliberate boundaries make execution fast, private, and predictable: the supplied text is scanned locally and the same input always produces the same ordered output. Processing is capped at one million characters to keep runtime bounded.

Audit documentation destinations

Create an ordered inventory of every navigational URL before checking availability, ownership, or migration readiness.

Review link labels

Inspect visible link text to find ambiguous labels and improve the accessibility and clarity of documentation.

Compare Markdown revisions

Extract links from two versions and identify destinations that were introduced, replaced, or removed.

Which link forms are supported?

Inline links and full, collapsed, or shortcut reference-style links are supported when their reference definitions are present.

Are Markdown images included?

No. Image syntax is excluded because the capability extracts navigational links rather than embedded resource sources.

What happens if the document has no links?

You get an empty list, not an error. A text with no links is a normal document, so automated checks can tell it apart from a broken submission and carry on.

Are links inside code examples counted?

No. Fenced code blocks and inline code are skipped, so the Markdown examples in a tutorial do not pollute your real link inventory. Lines that only define a reference are not listed either; only actual uses are.

Does it check whether the links still work?

No. It does not open the addresses, test their status, follow redirects or change your text. It only reads the text you paste, so the same input always gives the same ordered list.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/dev2/markdown-link-extract

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/dev2/markdown-link-extract \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Read the [guide](https://example.com/guide) and [API docs][api].\n\n[api]: https://example.com/api"}'
{
  "text": "Read the [guide](https://example.com/guide) and [API docs][api].\n\n[api]: https://example.com/api"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "dev2.markdown_link_extract",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

max_chars1000000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Extract link text and destinations in one request

Reference-style links such as <code>[API guide][docs]</code> are matched with definitions such as <code>[docs]: https://example.com/api</code>, even when the definition appears later in the document. If the Markdown contains no supported links, the request succeeds with an empty array instead of treating an ordinary link-free document as an error.

Handle reference syntax without mistaking examples for links

Inline formatting markers in a label are removed from the returned visible text, while escaped Markdown punctuation is restored, producing a practical text value for downstream JSON, CSV, or database processing.

Use structured links in documentation workflows

A missing or non-string <code>text</code> field returns an <code>invalid_input</code> error, which helps automated pipelines distinguish a malformed request from a valid document that simply has no links. API use costs $0.002 per request, while the browser executor can run the same logic locally.

What happens when there are no links?

The request succeeds and returns an empty links array.

Does this check whether a URL works?

No. It extracts destinations without making network requests, following redirects, or testing HTTP status.

How much does an API request cost?

Each API request costs $0.002. The browser executor can run the same deterministic extraction logic locally.

Read the full KIT documentation →