Markdown Output
Request markdown-formatted output from the Oxylabs Web Scraper API by setting "markdown": true in your payload - ideal for AI workflows and lightweight content.
This feature allows you to receive the markdown representation of a web page as an alternative option to HTML or parsed JSON. Markdown output provides an easy-to-read format, simplifying integration into various content workflows.
Markdown format is especially useful when working with LLMs due to its light weight and clear syntax. It's the de-facto standard for the RAG (retrieval-augmented generation) use case, especially when it concerns ingesting web data.
Usage
To get the markdown content of a web page in the response, set the "markdown": true in your request payload. By default, this parameter is set to false. When it is set, markdown becomes the default output of the job and replaces the HTML in the response; to receive both, request them explicitly as shown in the second example below.
Request example
Here's how to submit a request for markdown output:
POST https://data.oxylabs.io/v1/queries{
"url": "https://example.com",
"markdown": true
}You can also add ?type=raw,markdown in the Real-Time API endpoint URL to get both the markdown and the raw HTML result.
POST https://realtime.oxylabs.io/v1/queries?type=raw,markdown{
"url": "https://example.com",
"markdown": true
}Response example
The response will contain the content of the web page formatted in markdown as a string. This string will include standard markdown syntax for headings, paragraphs, lists, links, images, and other structured elements present on the page.
Last updated
Was this helpful?

