Skip to content
Docs

Markdown Viewer API documentation

A small, fast REST API for everything markdown — render to safe HTML, beautify, analyze structure, and validate. The same engine that powers our editor, exposed as a developer-friendly API with predictable responses and a generous free tier.

These docs cover every endpoint, every error code, authentication, plan quotas, and a live playground so you can try every call against your own account before you write a single line of code.

Start here

Authentication

Bearer-token auth with revocable, hashed API keys.

Rate limits

Per-plan quotas (free / pro) plus burst protection.

Errors

Stable codes, HTTP statuses, and copy-paste handling examples.

Playground

Send real requests against your account from the browser.

API endpoints

All endpoints live under /api/v1 and accept JSON bodies. Each one returns the same { data: … } / { error: … } envelope — authenticate with Authorization: Bearer YOUR_KEY.

POST
/api/v1/render

Render markdown

Convert markdown into safe, sanitised HTML.

POST
/api/v1/format

Format markdown

Beautify and normalise a markdown document.

POST
/api/v1/analyze

Analyze markdown

Word count, reading time, links, images, structure.

POST
/api/v1/validate

Validate markdown

Lint markdown for common issues.

POST
/api/v1/convert/html-to-markdown

HTML → Markdown

Convert any HTML snippet into clean CommonMark + GFM.

POST
/api/v1/convert/markdown-to-text

Markdown → Plain text

Strip markdown formatting and return prose.

POST
/api/v1/convert/csv-to-table

CSV → Markdown table

Convert CSV (or TSV) to a GFM pipe table.

POST
/api/v1/convert/table-to-csv

Markdown table → CSV

Extract the first GFM table to CSV/TSV.

POST
/api/v1/convert/json-to-markdown

JSON → Markdown

Render JSON as a table or nested list.

POST
/api/v1/extract/outline

Extract outline

Headings with level, slug, and line number.

POST
/api/v1/extract/links

Extract links

Every link with kind + status.

POST
/api/v1/extract/images

Extract images

Image audit with alt text and source classification.

POST
/api/v1/extract/code-blocks

Extract code blocks

Fenced code with language and suggested filename.

POST
/api/v1/extract/tasks

Extract tasks

Task-list items with section + progress.

POST
/api/v1/extract/urls

Extract URLs

Deduped URL list with frequency.

POST
/api/v1/extract/frontmatter

Extract frontmatter

Parse YAML frontmatter + body.

POST
/api/v1/generate/toc

Generate table of contents

Markdown TOC from headings.

POST
/api/v1/generate/slugs

Generate slugs

Slugify a list of heading titles.

POST
/api/v1/audit/headings

Audit headings

Skipped levels + duplicate H1 detection.

POST
/api/v1/audit/gfm

Audit GFM compliance

Single H1, fence langs, link/image hygiene.

POST
/api/v1/audit/readme-score

README health score

0–100 score across 5 weighted sections.

POST
/api/v1/transform/typography

Typography transforms

Smart quotes, em-dashes, ellipsis, NBSP.

POST
/api/v1/transform/redact

Redact secrets

Strip emails, IPs, tokens, keys, JWTs, UUIDs.

POST
/api/v1/transform/normalize-lists

Normalize list markers

Rewrite `*` / `+` bullets to `-`.

POST
/api/v1/transform/callout

Build a callout / admonition

GitHub, Docusaurus, MkDocs, Obsidian flavours.

POST
/api/v1/diff

Diff markdown

Line-oriented added / removed / unchanged.

POST
/api/v1/reading-time

Reading time

WPM + image + code-aware estimate.

POST
/api/v1/split/sections

Split into sections

Chunk by every heading or by level.

What you can build with this API

Render user-generated markdown safely

Power comments, docs, wikis, and forum posts. Every HTML response is sanitised with DOMPurify so embedded XSS payloads never reach your users.

Validate markdown in CI

Lint pull requests for heading-level jumps, inconsistent bullets, missing alt text, and trailing whitespace — all from a single REST call.

Process LLM / AI output

Render ChatGPT, Claude, or Gemini responses to HTML before showing them in your product. Run them through the validator to catch malformed structure.

Generate documentation pipelines

Parse source markdown, extract headings for a table of contents, compute reading time, and render to HTML — all from one API. No parser to bundle in your build.

Resources