/api/v1/extract/urlsExtract URLs API
Deduped URL list with frequency.
POST /api/v1/extract/urls dedupes every URL referenced in a markdown document — both bare URLs in body text and `[link](url)` syntax — and reports frequency plus line numbers.
Overview
Collect every external/relative URL across the document — both markdown link syntax and bare URLs in body text — deduped with counts and line numbers per appearance.
Request
Authenticate with Authorization: Bearer YOUR_API_KEY and send a JSON body containing the parameters below. Pick your language:
curl -X POST 'https://trymarkdownviewer.com/api/v1/extract/urls' \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown":"[a](https://example.com)\nVisit https://example.com again."}'Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
| markdown | string | required | Markdown source. |
Response
Success responses are wrapped in a data field. Errors use { error: { code, message } } with an appropriate HTTP status — see the error reference.
{
"data": {
"urls": [
{
"url": "https://example.com",
"count": 2,
"lines": [
1
],
"kind": "external"
}
],
"count": 1
}
}Use cases
Link sweep
Run an external HTTP HEAD check across every outbound destination.
Domain reporting
Group outbound links by hostname for an SEO audit.
Related endpoints
Try in browser
Free tools that run the same logic locally — no API key, no upload.
Try it
Send a real request against your account in the API playground. Errors there link straight back to the error reference.