Extract article to Markdown
extractExtract the main article from rendered HTML and return clean Markdown with metadata and diagnostics. Uses only the provided HTML with no outbound requests.
Instructions
Extract the main article from already-rendered (post-JavaScript) HTML and return clean Markdown plus metadata and diagnostics. The server fetches nothing: html is the only source, and url (optional) is used solely to absolutize relative links. Hand it the output of document.documentElement.outerHTML from a browser/devtools capture.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gfm | No | Enable GitHub-Flavored Markdown: tables, strikethrough, and task lists. | |
| url | No | Origin URL for absolutizing relative links and images. NEVER fetched — origin context only. | |
| html | Yes | Already-rendered HTML (post-JavaScript), e.g. the result of document.documentElement.outerHTML from a browser/devtools capture. This is the ONLY input the server reads; it makes no outbound requests. | |
| format | No | Returned payload format: 'markdown' (default), 'html', 'text', or 'json' (emits {metadata, content, diagnostics}). | markdown |
| images | No | Image handling: 'keep' (inline ), 'drop', 'src-only' (bare URL text), or 'reference' (link-reference style). | keep |
| maxChars | No | Truncate markdown/text output at a block boundary; never splits a fenced code block. Ignored for html/json formats. | |
| maxNodes | No | Hard cap on elements parsed (Readability maxElemsToParse). Safety/perf guard for very large documents. | |
| sanitize | No | Run DOMPurify over the extracted/fragment HTML before conversion (strips scripts, event handlers, and iframes). | |
| selectors | No | Scope the extracted/converted content by CSS selector before processing. | |
| extraction | No | Readability scoring aggressiveness: 'balanced' (default), 'aggressive', or 'conservative'. Maps to Readability's scorer knobs. | balanced |
| cleanChrome | No | Strip browser chrome (scrollbars, consent/cookie banners, fixed nav and overlays) before conversion. These elements poison Readability density scoring and clutter fragment output. | |
| keepClasses | No | Retain all CSS classes on extracted nodes. Defaults false, which strips non-language classes. | |
| headingStyle | No | Markdown heading style: 'atx' (#) or 'setext' (underlining with = / -). | atx |
| metadataMode | No | Prepend a metadata block to the markdown/text payload: 'none' (default), 'yaml', or 'json'. | none |
| codeBlockStyle | No | Markdown code-block style: 'fenced' (triple backticks) or 'indented' (four-space). | fenced |
| wordsPerMinute | No | Reading speed (words per minute) used to compute metadata.readingTimeMin. | |
| minArticleLength | No | Minimum article character length below which extraction falls back to the selector cascade (Readability charThreshold). | |
| readabilityOverrides | No | Escape hatch: a record spread verbatim into the Readability options. Unstable and unvalidated; overrides the extraction/keepClasses/maxNodes/minArticleLength knobs. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The human/LLM-readable payload — Markdown/html/text, or the serialized JSON when format=json. | |
| metadata | Yes | Resolved article metadata. Each field is the first non-empty value across a priority cascade. | |
| diagnostics | Yes | Pipeline telemetry describing what was extracted, sanitized, and removed. | |
| schemaVersion | Yes | Structured-content schema version. Bumps only on breaking shape changes to this object. |