API Docs/Content & LLM
POST

URL to Markdown API

Free Public API

Strip clutter, extract clean structured Markdown, and save up to 88% tokens for RAG pipelines.

Try in Live Web Tool
POSThttps://api.headless-lender.com/api/v1/markdown
Public: No Key Needed•Highest Free Quota: 1,000 Req/Mo + 10h Browsers (No Card Required)

Overview & Architecture

Convert any dynamic, JavaScript-rendered web page into ultra-clean, token-efficient Markdown. Powered by mdream and Readability algorithms, it strips navigation, footers, and scripts while preserving headlines, tables, code blocks, and metadata.

Up to 88% token reduction compared to raw HTML
Automatic YAML frontmatter extraction (title, author, timestamp)
Tracking query parameter stripping (UTM, ref)
Zero cold-start cloud browser pool
Playwright Execution & Valkey Caching Pipeline

Because this endpoint utilizes full headless Chromium rendering, dynamic JavaScript and single-page apps (SPAs) are executed completely before conversion:

1. Cold Scrape (Cache MISS)~800ms – 2.5s

Chromium initializes, fetches the URL, executes client JavaScript, resolves DOM mutations, and generates output.

2. Repeat Request (Cache HIT)~5ms – 15ms

Returned instantly from Valkey/Redis cache with header X-Lender-Cache: HIT (15-minute TTL).

Code Integration Examples

Instant Public Endpoint: Zero configuration, no API key needed. Want our highest free quota? Get 1,000 free requests/month + 10 hours of cloud browsers with a free key (No credit card required).
curl -X POST https://api.headless-lender.com/api/v1/markdown \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
    "engine": "mdream",
    "minimal": true,
    "cleanUrls": true,
    "includeFrontmatter": true
  }'

Headers & Authentication Standard

1. Public Access (No Key)

No Authorization header required. Simply send a JSON POST request. Perfect for quick prototypes, small scripts, and low-volume scraping.

Content-Type: application/json

2. Free API Key (Highest Free Quota)

1,000 Req/Mo Free

Sign up in 10s with no credit card required. Unlocks 1,000 free monthly requests, 600 browser minutes (10 hours), 120 req/min burst limits, and cache-bypass controls.

Authorization: Bearer hl_live_your_api_key_here
Access ModeMonthly QuotaCloud Browser TimeBurst LimitCredit CardAction
Public AnonymousDaily IP Allowance5-min trial sandbox10 req/minNoneInstant (No Setup)
Free Account (Highest Quota)1,000 Req / Month600 Mins (10 Hours)120 req/minZero ($0 forever)Claim Free Key →

Request Body Parameters

FieldTypeRequiredDefaultDescription
urlstringrequired—Target webpage URL to render and convert.
engine'mdream' | 'hybrid' | 'turndown'optional'mdream'Markdown conversion engine. 'mdream' is fastest and saves the most tokens; 'hybrid' combines Readability with mdream.
minimalbooleanoptionaltrueAggressively strip layout boilerplate, navigation bars, headers, and footers.
isolateMainbooleanoptionaltrueAuto-detect and isolate the primary <main> or <article> content container.
cleanUrlsbooleanoptionaltruePurge tracking parameters (UTM, fbclid, etc.) from extracted links.
includeFrontmatterbooleanoptionaltrueInclude YAML metadata frontmatter with title, source, and timestamp.
includeImagesbooleanoptionaltrueRetain markdown image tags ![alt](src) or strip them for text-only LLMs.
waitUntil'domcontentloaded' | 'load' | 'networkidle'optional'domcontentloaded'Browser navigation wait condition before extraction.

Response Schema & Example

200 OK — application/jsonDuration: ~800ms (Cold) / ~8ms (Cached)
{
  "url": "https://en.wikipedia.org/wiki/Artificial_intelligence",
  "title": "Artificial intelligence - Wikipedia",
  "engine": "mdream",
  "markdown": "---\ntitle: \"Artificial intelligence\"\nsource: \"https://en.wikipedia.org/wiki/Artificial_intelligence\"\ntimestamp: \"2026-10-23T09:40:00.000Z\"\n---\n\n# Artificial intelligence\n\n**Artificial intelligence** (AI) is the intelligence of machines or software...",
  "wordCount": 1840,
  "characterCount": 11200,
  "estimatedTokens": 2947,
  "rawHtmlTokens": 24500,
  "tokenSavingsPercent": 88,
  "readingTimeMinutes": 9,
  "isArticle": true,
  "durationMs": 380
}