For AI agents: a documentation index is available at /llms.txt
Skip to main content

markdown

Returns the page's content converted to Markdown. The HTML is fetched from the page (optionally scoped to a selector) and converted server-side, with script/style/noscript/iframe nodes stripped.

**Usage Example:**

mutation Markdownify {
goto(url: "https://example.com") {
status
}
markdown {
markdown
}
}

**Field Definition:**

markdown(
selector: String
timeout: Float
visible: Boolean = false
): MarkdownResponse

Arguments

markdown.selector ● String scalar

The DOM selector to scope the Markdown conversion to. Defaults to the whole document.

markdown.timeout ● Float scalar

The maximum amount of time, in milliseconds, to wait for the selector to appear, overriding any defaults. Default timeout is 30 seconds, or 30000.

markdown.visible ● Boolean scalar

Whether or not to convert the element only if it's visible

Type

MarkdownResponse object

Response returned after converting the page content to Markdown