TheDocumentation Index
Fetch the complete documentation index at: https://docs.zenrows.com/llms.txt
Use this file to discover all available pages before exploring further.
response_type=markdown parameter tells ZenRows to convert the scraped page’s HTML into clean Markdown before returning the response. Instead of receiving raw HTML that you need to parse yourself, you get structured, readable content that’s ready to process or display.
This is particularly useful for AI pipelines, content extraction workflows, and any use case where you need human-readable text with preserved structure (headings, lists, links, tables) without the noise of HTML tags.
How it works
ZenRows fetches the target page, renders it if needed, and converts the resulting HTML into Markdown. The conversion preserves the semantic structure of the page: headings map to# through ######, lists remain as - items, links keep their text and URL, and tables are converted to Markdown table syntax.
For example, given the following HTML:
Basic Usage
Addresponse_type=markdown to your request parameters:
When to use Markdown response
The Markdown response is the right choice when you need the full text content of a page with its structure preserved, but don’t want to parse HTML yourself. It works well for:- AI and LLM pipelines: feed scraped content directly into language models without pre-processing. Markdown is cleaner and more token-efficient than raw HTML.
- Content extraction and archiving: capture articles, documentation pages, or product descriptions in a portable, readable format.
- Knowledge base ingestion: convert web pages into Markdown for ingestion into vector databases, RAG pipelines, or internal wikis.
- Developer tooling: use Markdown output to power documentation crawlers, content diff tools, or search indexers.
outputs parameter instead. Markdown response converts the entire page, which may include content you don’t need.Best practices
Enablejs_render for dynamic pages: If the page loads content via JavaScript, combine
response_type=markdown with js_render=true. Without it, the Markdown output will only reflect the initial HTML and may be missing key content.
Use wait or wait_for when content loads after a delay: For pages where content appears after a delay or user interaction, add
wait (milliseconds) or wait_for (CSS selector) to ensure the full content is present before conversion.
Expect navigation and boilerplate in the output: The Markdown response converts the full page, including headers, footers, navigation menus, and sidebars. If you need only the main body content, consider post-processing the Markdown to strip boilerplate, or evaluate whether
css_extractor with a targeted selector better fits your use case.
Credits are charged on successful responses: A request using
response_type=markdown is charged when the API returns a 200 status code, regardless of whether the Markdown output contains the content you expected. Test on a small set of URLs before running at scale.
Troubleshooting
The Markdown output is missing most of the page content
The Markdown output is missing most of the page content
js_render=true to your request to ensure ZenRows renders the page fully before converting it. If content still appears incomplete, combine with wait_for targeting a CSS selector that’s only present once the main content has loaded.The output includes a lot of navigation, ads, or boilerplate
The output includes a lot of navigation, ads, or boilerplate
Tables are not converting correctly
Tables are not converting correctly
table elements. If the site uses div-based layouts to simulate tables, they won’t convert cleanly. In that case, use the outputs=tables filter or css_extractor to target the relevant elements directly.I'm getting an error when combining response_type=markdown with outputs
I'm getting an error when combining response_type=markdown with outputs
response_type=markdown converts the entire page to Markdown, while outputs performs targeted data extraction. You can only use one per request. Choose outputs when you need specific data types, and response_type=markdown when you need the full page content as structured text.Pricing
Theresponse_type=markdown parameter is included at no additional cost with all ZenRows requests. You only pay extra for JavaScript Render and Premium Proxy when used.
FAQ (Frequently Asked Questions)
Does response_type=markdown work with js_render?
Does response_type=markdown work with js_render?
response_type=markdown with js_render=true to render JavaScript before the conversion. This is recommended for any page that loads content dynamically.Does it cost more credits to use response_type=markdown?
Does it cost more credits to use response_type=markdown?
response_type=markdown parameter does not add extra credit cost on its own. Credits are calculated based on the other parameters you use, such as js_render or premium_proxy, exactly as they would be for a standard request.Can I use response_type=markdown with the Scraping Browser?
Can I use response_type=markdown with the Scraping Browser?
response_type=markdown is a parameter of the Universal Scraper API. It is not available in Scraping Browser (CDP/Playwright) sessions. In a Scraping Browser session, you control the page directly and can extract and convert content using your own script logic.What Markdown flavor does the conversion follow?
What Markdown flavor does the conversion follow?
Can I use response_type=markdown to feed content into an LLM?
Can I use response_type=markdown to feed content into an LLM?