Support: support@tinplate.dev · Zero-Retention Edge Security Support Trust Center DPA GitHub Issues
AI Data Prep Tier 1 All-Access

HTML to Markdown API for LLMs & RAG — Strip Boilerplate & Cut Token Costs

Convert noisy web pages or raw HTML into clean, token-efficient Markdown for RAG. Convert raw HTML or public URLs into clean, token-efficient Markdown for LLM RAG pipelines. Strips navs, ads, scripts, and cookie banners.

Interactive Sandbox · No API Key Required 200 OK · Ready
POST /v1/html-to-markdowninput
200 OK sample / live responsejson
{
  "ok": true,
  "data": {
    "title": null,
    "description": null,
    "source_url": null,
    "markdown": "# Release Notes\n\nLatency dropped by **40%**.",
    "estimated_tokens": 11,
    "html_chars": 147,
    "markdown_chars": 44,
    "cached": false
  },
  "meta": {
    "request_id": "req_h2m_01",
    "ms": 2
  }
}
OpenAPI 3.0.3 Get All-Access Key ($29/mo) No signup. No payload storage.
Quickstart Code Examples
curl -X POST "https://api.tinplate.dev/v1/html-to-markdown" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TINPLATE_KEY" \
  -d '{"html":"<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"}'
import { TinplateClient } from "@tinplate/sdk";

const tinplate = new TinplateClient({
  apiKey: process.env.TINPLATE_API_KEY!,
});

const { data, meta } = await tinplate.call("/v1/html-to-markdown", {
  "html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
});
console.log(`[${meta.ms} ms]`, data);
import requests

response = requests.post(
    "https://api.tinplate.dev/v1/html-to-markdown",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_TINPLATE_KEY",
    },
    json={
  "html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
}
)
print(response.json())
const response = await fetch("https://api.tinplate.dev/v1/html-to-markdown", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_TINPLATE_KEY",
  },
  body: JSON.stringify({
  "html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
}),
});
const result = await response.json();
console.log(result);
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "tinplate_html_to_markdown",
    "arguments": {
      "html": "<html><body><nav>Menu</nav><main><h1>Release Notes</h1><p>Latency dropped by <strong>40%</strong>.</p></main><footer>Cookies</footer></body></html>"
    }
  }
}
OpenAPI 3.0.3 Schema Contract

Request Parameters & Response Schema Reference

Request Body Parameters (POST /v1/html-to-markdown)

ParameterType & ConstraintsDescription
url optional string
maxLen: 2048
Public URL to fetch via private fetcher and convert to Markdown.
html optional string
minLen: 1, maxLen: 262144
Raw HTML string to convert directly without fetching.
base_url optional string
maxLen: 2048
Optional base URL for resolving relative links when passing raw html.
include_links optional boolean Preserve hyperlinks as [text](url) (default true).
include_hidden optional boolean Include hidden DOM nodes (hidden, aria-hidden='true', display:none, font-size:0) (default false).
cache optional boolean Allow edge KV caching for public URL fetches (defaults to true only for clean URLs without query strings or userinfo).

Response data Object Fields (200 OK)

FieldTypeDescription
title string | null Field 'title'
description string | null Field 'description'
source_url string | null Field 'source_url'
markdown string Field 'markdown'
estimated_tokens integer Field 'estimated_tokens'
html_chars integer Field 'html_chars'
markdown_chars integer Field 'markdown_chars'
cached boolean Field 'cached'

What LLM HTML-to-Markdown Cleaner API Detects & Validates

  • Removes scripts, styles, SVGs, navbars, footers, sidebars, cookie banners, and hidden DOM nodes
  • Preserves semantic headings, tables, code blocks, links, and lists in clean CommonMark
  • Accepts either raw html string OR a public url fetched via Tinplate's SSRF-isolated Fetcher Worker
  • Reports character reduction percentage and estimated LLM token count
Honest Engineering Boundaries

Known Limitations & Test Verification

Release: v1.0.39 · Verified: 16 November 2026 · Portfolio Median: 0.318 ms in-Worker V8 compute (add 15–65 ms HTTPS RTT) · See Full Portfolio Benchmarks →

  • Static HTML parser; does not execute client-side JavaScript SPAs that render an empty <div id='root'> without SSR.
  • URL fetching enforces a 10s timeout, 1 MB response cap, and blocks private/loopback/metadata IP ranges.

Direct All-Access & Marketplace Plans

Direct Polar All-Access Keys unlock all 42 APIs (49 endpoints), /v1/pipeline, and /mcp on api.tinplate.dev: Pro ($29/mo · 120 req/min · 100k/mo · 128 KB) or Team ($79/mo · 300 req/min · 500k/mo · 256 KB).

PlanMonthly PriceIncluded RequestsRate LimitMax PayloadBest For
BASIC$0.00 / mo500 / month10 req / min64 KBEvaluation & CI smoke tests
PRO$9.99 / mo15,000 / month60 req / min128 KBSolo devs & production apps
ULTRA$29.99 / mo100,000 / month300 req / min256 KBGrowing SaaS & multi-agent pipelines
MEGA$79.99 / mo500,000 / month1,000 req / min256 KBHigh-volume enterprise workloads

Frequently Asked Questions

How much token budget does cleaning HTML into Markdown save?

Typical web pages see a 65% to 90% reduction in tokens after stripping scripts, inline styles, SVGs, and navigation chrome.

Is URL fetching protected against SSRF?

Yes. URL requests run through our isolated edgeguard-fetcher Worker, which blocks RFC1918, loopback, link-local, and cloud metadata IPs at every redirect hop.

Can I pass raw HTML that my own scraper already fetched?

Yes, pass the html field directly for in-memory conversion (typically under 5 ms in deterministic mode) with zero network calls.

Zero Payload Logging

Data Handling, Privacy & Proxy Disclosure

Raw HTML inputs are never cached or logged. Public URL conversions may be cached briefly by URL hash in Cloudflare KV.

Worker Zero-Logging Guarantee: Cloudflare Workers Observability and invocation logging are disabled (observability.enabled = false, head_sampling_rate = 0, invocation_logs = false). Requests via RapidAPI or Zyla traverse marketplace proxies; use a Direct Bearer Key for zero-intermediary routing.

Related Tinplate APIs

POST /v1/json-heal Live

Broken JSON & LLM Output Healer API

Repair malformed or truncated LLM JSON outputs into valid, schema-checked JSON in 1 ms.

POST /v1/prompt-cache-budgeter AI Safety & Agents

Prompt Cache Key & Context Budgeter API

Estimate tokens, optimize message order for prompt caching, and calculate LLM API costs.

POST /v1/robots-llms-analyzer Developer Utilities

robots.txt & llms.txt AI Crawler Analyzer & Generator API

Audit which AI crawlers your robots.txt allows and generate a valid llms.txt file.