# Markdown Link Extractor

> Markdown Link Extractor is a paid API for AI agents from api.x402node.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Extracts all links from markdown content — inline, reference, autolinks, and images — returning structured metadata for each link found.

## Facts

- Endpoint: GET https://api.x402node.dev/md/links
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-x402node-dev-963633b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_EugEjyooxmCscjaT7UO-P

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-x402node-dev-963633b5
```

Example prompt: Can you extract every link from this markdown text for me — I need the type, anchor text, URL, and title for each one so I can audit them for broken links: '# My Doc\n\nSee [GitHub](https://github.com) and ![logo](https://example.com/logo.png "Logo")'?

## When to prefer this

Use this endpoint when you need to programmatically extract all link types (inline, reference, autolinks, images) from markdown with structured metadata (type, text, url, title). Ideal for link auditing, broken-link detection pipelines, sitemap crawling from markdown sources, or documentation indexing. Prefer this over generic HTML scrapers when your source is specifically markdown.

## Known failure modes

- No markdown provided — returns empty array or error if neither ?url nor ?text param supplied
- URL fetch failure — if ?url= points to an unreachable resource, returns fetch error
- Malformed markdown URL — returns error if ?url= is not a valid URL
- Empty markdown — returns empty array if content has no links
- Payment failure — x402 payment not accepted, returns 402

## How this service works

Extract all links from markdown: inline, reference, autolinks, images. Returns array of {type, text, url, title}. Use url param or ?text=.... Built for AI agents link auditing, broken-link detection, sitemap crawling. Accepts payment on Base or Solana — either network works.

## Output

Returns a JSON array of link objects, each containing: type (inline, reference, autolink, or image), text (anchor or alt text), url (the href or src), and title (optional title attribute). All link types present in the markdown are captured.

## Example request

```json
{
 "text": "# Sample Document\n\nCheck out [OpenAI](https://openai.com) and visit ![example image](https://example.com/image.png \"Example\"). Also see <https://github.com> for more info."
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "properties": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-x402node-dev-963633b5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.x402node.dev](https://www.zero.xyz/host/api.x402node.dev/llms.txt)
