Skip to content

Configuration Reference

This page documents all configuration types and their defaults across all languages.

Document-level metadata extracted from <head> and top-level elements.

Contains all metadata typically used by search engines, social media platforms, and browsers for document indexing and presentation.

Field Type Default Description
title str | None None Document title from <title> tag
description str | None None Document description from <meta name="description"> tag
keywords list\[str\] [] Document keywords from <meta name="keywords"> tag, split on commas
author str | None None Document author from <meta name="author"> tag
canonical_url str | None None Canonical URL from <link rel="canonical"> tag
base_href str | None None Base URL from <base href=""> tag for resolving relative URLs
language str | None None Document language from lang attribute
text_direction TextDirection | None None Document text direction from dir attribute
open_graph dict\[str, str\] {} Open Graph metadata (og:* properties) for social media Keys like “title”, “description”, “image”, “url”, etc.
twitter_card dict\[str, str\] {} Twitter Card metadata (twitter:* properties) Keys like “card”, “site”, “creator”, “title”, “description”, “image”, etc.
meta_tags dict\[str, str\] {} Additional meta tags not covered by specific fields Keys are meta name/property attributes, values are content

Comprehensive metadata extraction result from HTML document.

Contains all extracted metadata types in a single structure, suitable for serialization and transmission across language boundaries.

Field Type Default Description
document DocumentMetadata — Document-level metadata (title, description, canonical, etc.)
headers list\[HeaderMetadata\] [] Extracted header elements with hierarchy
links list\[LinkMetadata\] [] Extracted hyperlinks with type classification
images list\[ImageMetadata\] [] Extracted images with source and dimensions
structured_data list\[StructuredData\] [] Extracted structured data blocks

Main conversion options for HTML to Markdown conversion.

Use ConversionOptions.builder() to construct, or the default constructor for defaults.

Field Type Default Description
heading_style HeadingStyle HeadingStyle.ATX Heading style to use in Markdown output (ATX # or Setext underline).
list_indent_type ListIndentType ListIndentType.SPACES How to indent nested list items (spaces or tab).
list_indent_width int 2 Number of spaces (or tabs) to use for each level of list indentation.
bullets str "-*+" Bullet character(s) to use for unordered list items (e.g. "-", "*").
strong_em_symbol str "*" Character used for bold/italic emphasis markers (* or _).
escape_asterisks bool False Escape * characters in plain text to avoid unintended bold/italic.
escape_underscores bool False Escape _ characters in plain text to avoid unintended bold/italic.
escape_misc bool False Escape miscellaneous Markdown metacharacters ([]()# etc.) in plain text.
escape_ascii bool False Escape ASCII characters that have special meaning in certain Markdown dialects.
code_language str "" Default language annotation for fenced code blocks that have no language hint.
autolinks bool True Automatically convert bare URLs into Markdown autolinks.
expand_abbreviations bool True Append the title of an <abbr> in parentheses (default True).
include_blockquote_citations bool True Append the cite URL after a blockquote (default True).
default_title bool False Emit a default title when no <title> tag is present.
br_in_tables bool False Render <br> elements inside table cells as literal line breaks.
compact_tables bool False Emit tables without column padding (compact GFM format). When True, column widths are not computed and cells are emitted with no trailing spaces. Separator rows use exactly --- per column. Produces token-efficient output suitable for RAG / LLM contexts. Default False (aligned padding preserved).
highlight_style HighlightStyle HighlightStyle.DOUBLE_EQUAL Style used for <mark> / highlighted text (e.g. ==text==).
extract_metadata bool True Populate result.metadata with <head> / <meta> extraction (title, description, Open Graph, Twitter Card, JSON-LD, …). Default True. Disabling skips the metadata pass only — table extraction into result.tables runs unconditionally.
whitespace_mode WhitespaceMode WhitespaceMode.NORMALIZED Controls how whitespace sequences are normalised in the converted output. - WhitespaceMode.Normalized (default) — collapses consecutive whitespace characters (spaces, tabs, newlines) to a single space, matching browser rendering behaviour. - WhitespaceMode.Strict — preserves all whitespace exactly as it appears in the source HTML, including runs of spaces and embedded newlines. Choose Strict only when the source HTML uses deliberate whitespace (e.g. pre-formatted content outside <pre> tags). For most documents Normalized produces cleaner output.
strip_newlines bool False Strip all newlines from the output, producing a single-line result.
wrap bool False Wrap long lines at wrap_width characters.
wrap_width int 80 Maximum output line width in characters when wrap is True (default 80). Lines are broken at word boundaries so that no line exceeds this length. A value of 0 is treated as “no limit” — equivalent to leaving wrap disabled. Has no effect when wrap is False.
convert_as_inline bool False Treat the entire document as inline content (no block-level wrappers).
sub_symbol str "" Markdown notation for subscript text (e.g. "~").
sup_symbol str "" Markdown notation for superscript text (e.g. "^").
newline_style NewlineStyle NewlineStyle.SPACES How to encode hard line breaks (<br>) in Markdown.
code_block_style CodeBlockStyle CodeBlockStyle.BACKTICKS Style used for fenced code blocks (backticks or tilde).
keep_inline_images_in list\[str\] [] HTML tag names whose <img> children are kept inline instead of block.
preprocessing PreprocessingOptions — Options for the HTML pre-processing pass applied before conversion begins. Pre-processing runs before the HTML is handed to the converter and can perform operations such as unwrapping redundant wrapper elements, removing tracking pixels, and normalising vendor-specific markup. See PreprocessingOptions for the full set of knobs. Defaults to the standard preprocessing options, which enables the standard cleaning passes. Set individual fields on PreprocessingOptions (or construct via ConversionOptions.builder) to opt in or out of specific passes.
encoding str "utf-8" Expected character encoding of the input HTML (default "utf-8").
debug bool False Emit debug information during conversion.
strip_tags list\[str\] [] HTML tag names whose content is stripped from the output entirely.
preserve_tags list\[str\] [] HTML tag names that are preserved verbatim in the output.
skip_images bool False Skip conversion of <img> elements (omit images from output).
inline_data_media InlineDataMedia InlineDataMedia.KEEP What the output shows for an image or embedded media element whose address is an inline data: URL: the URL with its payload (InlineDataMedia.Keep, the default), the alt text alone, or nothing. See InlineDataMedia for the elements it covers.
hidden_content HiddenContent HiddenContent.DROP Which text that a browser does not show at first the output holds: none of it (HiddenContent.Drop, the default), the text a reader can get to in the page, such as an inactive tab panel (HiddenContent.Reachable), or that text and the content of <template> and <noscript> (HiddenContent.All). No choice writes a script or a style sheet as text. See HiddenContent for each kind of hidden markup.
url_escape_style UrlEscapeStyle UrlEscapeStyle.ANGLE URL encoding strategy for link and image destinations. Controls how special characters in URL destinations are escaped: - UrlEscapeStyle.Angle (default) — wraps the destination in angle brackets when it contains spaces or newlines. Some parsers misinterpret > inside such a destination. - UrlEscapeStyle.Percent — percent-encodes every character that is not an RFC 3986 unreserved character or /, producing a destination that all Markdown parsers handle correctly even when the URL contains <, >, spaces, or parentheses.
link_style LinkStyle LinkStyle.INLINE Link rendering style (inline or reference).
output_format OutputFormat OutputFormat.MARKDOWN Target output format (Markdown, plain text, etc.).
include_document_structure bool False Include structured document tree in result.
extract_images bool False Extract inline images from data URIs and SVGs.
max_image_size int 5242880 Maximum decoded image size in bytes (default 5MB).
max_input_size int | None None Maximum accepted HTML input size in bytes. WebAssembly builds default to DEFAULT_WASM_MAX_INPUT_SIZE (2 MiB) to avoid an uncatchable stack-exhaustion trap on unusually large DOMs. Native builds default to None. Set Some(bytes) to choose another limit or None to disable it.
capture_svg bool False Capture SVG elements as images.
infer_dimensions bool True Infer image dimensions from data.
max_depth int | None None Maximum conversion traversal depth (default: 1024). None uses 1024; explicit values are clamped to that same ceiling. Nodes at or beyond the limit, including their text and descendants, are skipped and a DepthLimitExceeded warning is returned. Structural elements such as html and body count toward the depth. Raw HTML preservation and SVG serialization use separate 64-level guards.
exclude_selectors list\[str\] [] CSS selectors for elements to exclude entirely (element + all content). Unlike strip_tags (which removes the tag wrapper but keeps children), excluded elements and all their descendants are dropped from the output. A selector matches an element by its own properties: a tag name (nav), .class, #id, an attribute ([hidden], [role=banner], and the ~=, ^=, $= and *= forms), *, and these joined with no space (div.note, a[href$="share"]). One entry can hold a comma-separated list of such selectors (nav, footer). Write a tag name in lower case. A selector with a combinator (.menu a, div > p, h2 + p, h2 ~ p) or a pseudo-class (li:first-child) matches nothing, and the conversion reports no error. In a comma-separated list, such a member can stop the other members of the list too: give each selector as an entry of its own. Invalid selectors are silently skipped at conversion time. Example: [".cookie-banner", "#ad-container", "[role='complementary']"]
data_as_elements list\[str\] | None None Elements whose data-as attribute names the element they stand for. Mintlify writes a paragraph as <span data-as="p">. An element in this list that has a data-as attribute is converted as the element the attribute names, so adjacent <span data-as="p"> elements become separate paragraphs. The attribute can name p, h1 to h6, li, ul, ol, blockquote, pre or div; any other value leaves the element as it is. Tag names are matched without regard to case. None (the default) uses ["span", "div"]. Some of an empty list turns the feature off.
tier_strategy TierStrategy TierStrategy.AUTO Which conversion tier to use. - TierStrategy.Auto (default) — automatically choose the best path. - TierStrategy.Tier2 — always use the Tier-2 DOM-walk path. - TierStrategy.Tier1 — always attempt Tier-1 (testkit only).
base_url str | None None Base URL to resolve relative href/src destinations against. When set, every relative link and image/media destination (a href, img src and its lazy-load fallbacks, srcset, graphic url/href/xlink:href/src, iframe/audio/video/source src) is resolved to an absolute URL before being written to the Markdown output, so the result is followable without the reader knowing where the source HTML came from. A <base href> in the document, if present, is honored the way a browser honors it: it is itself resolved against base_url, and that combined result becomes the effective base every other relative reference resolves against. Non-hierarchical schemes (mailto:, tel:, javascript:, data:) and already-absolute URLs are left unchanged. An unset (default) or unparseable base_url, and a relative reference that fails to resolve, leave the original attribute text unchanged – this option never panics and never corrupts a destination it cannot confidently resolve. Default None — no resolution, output byte-identical to versions before this option existed.
visitor VisitorHandle | None None Optional visitor for custom traversal logic. When set, the visitor’s callbacks are invoked for matching HTML elements during conversion, allowing custom output, skipping, or HTML preservation. See HtmlVisitor.

HTML preprocessing options for document cleanup before conversion.

Field Type Default Description
enabled bool True Enable HTML preprocessing globally
preset PreprocessingPreset PreprocessingPreset.STANDARD Preprocessing preset level (Minimal, Standard, Aggressive)
remove_navigation bool True Remove navigation elements (nav, breadcrumbs, menus, sidebars)
remove_forms bool True Remove form elements (forms, inputs, buttons, etc.)

The primary result of HTML conversion and extraction.

Contains the converted text output, optional structured document tree, metadata, extracted tables, images, and processing warnings.

Field Type Default Description
content str | None None Converted text output in the selected format: Markdown, Djot, or plain text.
document DocumentStructure | None None Structured document tree with semantic elements. Populated when the include_document_structure option is True. None otherwise (the default), which avoids the overhead of building the tree. When present, the tree mirrors the converted document: headings open Group sections, paragraphs and list items carry inline TextAnnotations, and tables reference the same TableGrid data exposed in the result’s tables field. Note: this field is independent of the metadata feature flag. Document structure collection is always available at runtime; it is gated only by the runtime option, not by a compile-time feature.
metadata HtmlMetadata — Extracted HTML metadata (title, OG, links, images, structured data).
tables list\[TableData\] [] Extracted tables with structured cell data and markdown representation. Table data is collected by the same pass that builds Self.document, so it is populated only when the include_document_structure option is True. With the default options this is an empty list even for input that contains tables — the tables still appear in Self.content as rendered Markdown.
warnings list\[ProcessingWarning\] [] Non-fatal processing warnings.

A structured table grid with cell-level data including spans.

Field Type Default Description
rows int — Number of rows.
cols int — Number of columns.
cells list\[GridCell\] [] All cells in the table as a flat, sparse list. The list is ordered by (row, col) but is **not** a dense rows × cols matrix: cells that are covered by a spanning cell (via row_span > 1 or col_span > 1) do not appear in the list. Only the top-left “origin” cell of a span is present, with its row_span and col_span fields set accordingly. To reconstruct the full visual grid, iterate over all cells and mark the rectangular region [row .. row+row_span, col .. col+col_span] as occupied by that cell. Any (row, col) position that is not the origin of any cell is covered by a span from an earlier cell. The length of this list is ≤ rows * cols. An empty table (rows == 0 || cols == 0) produces an empty list.

Code block fence style in Markdown output.

Determines how code blocks (<pre><code>) are rendered in Markdown.

Variant Description
Indented Indented code blocks (4 spaces). CommonMark standard.
Backticks Fenced code blocks with triple backticks. Default (GFM). Supports language hints.
Tildes Fenced code blocks with tildes (~~~). Supports language hints.

Heading style options for Markdown output.

Controls how headings (h1-h6) are rendered in the output Markdown.

Variant Description
Underlined Underlined style (=== for h1, — for h2).
Atx ATX style (# for h1, ## for h2, etc.). Default.
AtxClosed ATX closed style (# title #, with closing hashes).

Which text that a browser does not show at first the output holds.

The choice answers one question: can a reader get to the text? It does not depend on how the page hides it.

Markup Drop Reachable All
An element with the hidden attribute, any value (hidden="until-found" too) dropped kept kept
An element with inline display: none, visibility: hidden or font-size: 0 dropped kept kept
An element of an inline <svg> with display="none" or visibility="hidden" dropped kept kept
A declarative shadow root: a <template> whose shadowrootmode is open or closed dropped kept kept
Any other <template>, and <noscript> dropped dropped kept
<script>, <style>, comments, the value of <input type="hidden"> dropped dropped dropped

aria-hidden is not hidden for this option. It takes an element away from assistive technology only: a browser still shows the element, so a reader sees its text, and every choice keeps it. One rule is older than this option and does not change with it: for an inline <svg aria-hidden="true"> no choice writes the title, the description or the label of the graphic.

Every choice also keeps what the converter never treated as hidden: inert, a closed <details> or <dialog>, <datalist> and <option> text, and an element hidden by a class name, a style sheet rule, opacity, content-visibility, a zero size or an off-screen position. The converter reads the inline style attribute only. It does no layout and reads no style sheet, so it cannot tell that a rule in a style sheet hides an element.

A kept element converts like the same element without the attribute or style. Kept <template> and <noscript> content converts where it is written, as if the two tags were not there: a row in a <template> inside a <table> is a row of that table, and the content of a declarative shadow root comes before the other children of its host element. Slots are not resolved. All keeps <noscript> content with every preprocessing preset. A <template> or <noscript> in the document head holds metadata (<link>, <meta>, <style>), not text for a reader, and no choice keeps it. A document with no <head> tag has a head too: it starts at the doctype, at the <html> tag or at the first metadata element, and it ends where the body starts.

Variant Description
Drop Drop the text a browser does not show at first. Default.
Reachable Keep the text of elements that are in the page and that the page can show: an inactive tab panel, a collapsed section, an answer shown on a click, a declarative shadow root.
All Keep what Reachable keeps, and the content of <template> and <noscript>. A reader gets to that text only after a script copies it into the page, or with scripting off.

Highlight rendering style for <mark> elements.

Controls how highlighted text is rendered in Markdown output.

Variant Description
DoubleEqual Double equals syntax (==text==). Default. Pandoc-compatible.
Html Preserve as HTML (==text==). Original HTML tag.
Bold Render as bold (**text**). Uses strong emphasis.
None Strip formatting, render as plain text. No markup.

What the output shows for an image, an embedded media element, or a link, whose address is an inline data: URL.

Applies to <img> (including its lazy-load attributes, its srcset candidates and the <source> elements of a <picture> around it), <graphic>, inline <svg>, <video>, <audio> (including their nested <source> elements), <iframe>, and a link (<a href>) whose own address is a data: URL.

With AltTextOnly or DropElement, an element that also has an address that is not data: uses that address instead. The document structure follows the markdown: a dropped image has no node, and an image written as its alt text has no address. A link whose only content the choice removed is dropped with it.

A link has no attribute separate from its own text to use as a caption, so AltTextOnly and DropElement do the same thing to a link’s data: address: write the link’s text with no destination. Unlike an image, a link’s text is never dropped along with the address.

Variant Description
Keep Write the data: URL as the destination, payload included. Default.
AltTextOnly Write the alt text (the text of an <svg>, the fallback content for <video> and <audio>) without a destination.
DropElement Write nothing for the element.

Link rendering style in Markdown output.

Controls whether links and images use inline text syntax or reference-style [text][1] syntax with definitions collected at the end.

Variant Description
Inline Inline links: text. Default.
Reference Reference-style links: [text][1] with [1]: url at end of document.

List indentation character type.

Controls whether list items are indented with spaces or tabs.

Variant Description
Spaces Use spaces for indentation. Default. Width controlled by list_indent_width.
Tabs Use tabs for indentation.

Line break syntax in Markdown output.

Controls how soft line breaks (from <br> or line breaks in source) are rendered.

Variant Description
Spaces Two trailing spaces at end of line. Default. Standard Markdown syntax.
Backslash Backslash at end of line. Alternative Markdown syntax.

Output format for conversion.

Specifies the target markup language format for the conversion output.

Variant Description
Markdown Standard Markdown (CommonMark compatible). Default.
Djot Djot lightweight markup language.
Plain Plain text output (no markup, visible text only).

HTML preprocessing aggressiveness level.

Controls the extent of cleanup performed before conversion. Higher levels remove more elements.

Variant Description
Minimal Minimal cleanup. Remove only essential noise (scripts, styles).
Standard Standard cleanup. Default. Removes navigation, forms, and other auxiliary content.
Aggressive Aggressive cleanup. Remove extensive non-content elements and structure.

Text directionality of document content.

Corresponds to the HTML dir attribute and bdi element directionality.

Variant Wire value Description
LeftToRight ltr Left-to-right text flow (default for Latin scripts)
RightToLeft rtl Right-to-left text flow (Hebrew, Arabic, Urdu, etc.)
Auto auto Automatic directionality detection

Controls which conversion tier is used.

Variant Wire value Description
Auto auto Automatically pick the best tier for the input (default). Runs the classifier against the prescan report and uses Tier-1 when eligible; falls back to Tier-2 on bail or when the classifier routes to Tier-2.
Tier2 tier2 Always use the Tier-2 (DOM parse + walk) path, skipping Tier-1.
Tier1 tier1 Force the Tier-1 byte scanner; if it bails, fall back to Tier-2. Testkit-only; not stable API.

URL encoding strategy for link and image destinations.

Controls how special characters in URL destinations are handled when they require escaping to produce valid Markdown.

The Angle variant (default) wraps the destination in angle brackets: [text](<url with spaces>). This is the CommonMark-specified escape hatch but breaks when the URL itself contains >.

The Percent variant percent-encodes every character that is not an RFC 3986 unreserved character or /, producing a destination safe for all Markdown parsers: [text](url%20with%20spaces).

Variant Description
Angle Wrap destinations that contain spaces or newlines in angle brackets. Default.
Percent Percent-encode all characters that are not RFC 3986 unreserved or /.

Whitespace handling strategy during conversion.

Determines how sequences of whitespace characters (spaces, tabs, newlines) are processed.

Variant Description
Normalized Collapse multiple whitespace characters to single spaces. Default. Matches browser behavior.
Strict Preserve all whitespace exactly as it appears in the HTML.