Then Apply
Back to Then Apply
EDGE API // Cloudflare Workers · MIT

web-to-markdown

Clean, dense, LLM-ready Markdown — from any page or raw HTML.

web-to-markdown strips navigation, ads, cookie banners and scripts, and turns what's left into Markdown sized for an LLM's context window. It runs as a CLI, a TypeScript/JS library, or an authenticated API on Cloudflare Workers — same conversion core behind all three.

Handles static HTML and framework-hydrated pages (Next.js, Nuxt, JSON-LD) without a headless browser — when a client-rendered page arrives empty, it reads the data the framework already serialized into the response. It never executes JavaScript, so for pages whose content only exists after their own code runs, with nothing embedded to fall back on, this isn't the right tool.

npx @karlangas12/web-to-markdown

See it in action

A fixed input/output pair showing what the conversion actually produces.

# Building Next-Gen AI Microservices

Model Context Protocol allows seamless tool execution.

```bash
npx @karlangas12/web-to-markdown https://example.com
```

Static example — not a live API call.

HTTP API

Authenticated edge API

Every /v1/* request needs an API key sent as x-api-key (an Authorization: Bearer header is also accepted). GET /salud is a public health check and needs no key.

cURL / POST /v1/convert
# Fetch clean Markdown via API
curl -X POST https://web-to-markdown.karlangas12.workers.dev/v1/convert \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "options": {"extract_metadata": true}}'
                

Request

  • Base URL: web-to-markdown.karlangas12.workers.dev
  • Body: exactly one of url or html
  • Options: include_images, extract_metadata (both default false)

Rate-limit headers

  • RateLimit-Limit — quota for your plan
  • RateLimit-Remaining — requests left in the window
  • RateLimit-Reset — Unix timestamp when it resets
PRICING

Simple, metered pricing

Billing runs through Polar.sh as Merchant of Record. The API key is delivered by email right after checkout.

Community

Free

€0 / month
  • 500 requests / month
  • Full API + CLI + SDK access
  • No credit card to try the CLI locally
Get Free API Key
Production

Pro

€5 / month
  • 2,000 requests / month
  • API key delivered by email at checkout
  • Same Cloudflare Workers API, higher quota
Get Pro API Key — €5/mo
Copied to clipboard!