Markdown output
This feature allows you to receive the markdown representation of a web page as an alternative to HTML or parsed JSON. Markdown output provides an easy-to-read format, simplifying integration into various content workflows.
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
.
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.
{
"results": [
{
"content": "# Example Domain\n\nThis domain is for use in illustrative
examples in documents. You may use this\ndomain in literature without
prior coordination or asking for permission.\n\n[More information...]
(https://www.iana.org/domains/example)",
"type": "markdown"
}
]
}
Last updated
Was this helpful?