Markdown API

URL to markdown API

Send the address of a web page and get its content back as markdown, for LLM context, retrieval pipelines, search indexes or AI agents. The page is rendered in a headless Chromium browser first, so content that JavaScript builds is included, and navigation, ads and cookie banners stay out.

Example request and response

The markdown is shortened here: the script of example.com adds the same text in five more languages, and that text is part of the markdown too. Without response_type=json, the answer is the markdown itself as text/markdown. Errors come back as JSON with a status code. All parameters are in the markdown documentation.

curl -G "https://api.screenshotbase.com/v1/take" \
  --data-urlencode "url=https://example.com" \
  -d format=markdown \
  -d response_type=json \
  -H "apikey: YOUR-API-KEY"
{
  "url": "https://example.com/",
  "title": "Example Domain",
  "description": null,
  "markdown": "# Example Domain\n\nThis domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes.\n\n…\n\n[Learn more](https://iana.org/help/example-domains)\n"
}

Response fields

markdown
The content as markdown: headings, paragraphs, nested lists, links and images with absolute URLs, GitHub-flavored tables, and fenced code blocks with the language when the page marks it.
title
The page's Open Graph title, else the title of the article or of the document; null if there is none.
description
The page's meta description (or its Open Graph or Twitter description); null if there is none.
url
The page's final URL, after redirects.

Use cases

LLM context

Give a model the text and structure of a page without its HTML markup, for summaries, extraction or answers about the page.

Retrieval (RAG) pipelines

Convert documentation, articles or help centers to markdown and split them by heading before you embed them.

Search indexes

Index the readable content of pages, including single-page apps whose text only exists after JavaScript has run.

Content migration

Move pages from an old CMS into a docs-as-code repository or a knowledge base as markdown files.

AI agents

Through the MCP server, an agent calls the take tool with format: "markdown" and gets the markdown back as text, without storing a file.

Start on the free plan

Markdown conversion is part of every plan, including the free plan with 300 requests a month. Each conversion counts as one request, also when you store it with upload=true; conversions that fail are not counted. Paid plans start at $15 a month for 3,000 requests.

Frequently asked questions

Main content or the whole page?

By default (markdown_main_content_only=1) you get the article of the page, starting with its main heading, without navigation, sidebars, headers, footers and banners. When no clear article is found, or the detection would lose tables or code blocks, the main region of the page is used. markdown_main_content_only=0 converts the whole page body.

Are ads and cookie banners removed?

For markdown, block_cookie_banners and block_ads are on by default, and consent dialogs and hidden elements are always left out. To leave out more, list CSS selectors in hide_selectors.

What is not included?

Scripts, styles, form controls, embedded media and frames, tracking pixels and consent dialogs. Content inside iframes and shadow DOM is not part of the markdown.

How long can a conversion take, and how large can a page be?

A conversion must finish within about 12 seconds of the start of the request; a slower one answers 408. Very large pages, with more than about 2 million characters of HTML or a conversion that needs too much memory, answer 422. Neither is billed.

Is the markdown stored?

Only when you ask for it. With upload=true, it is stored as a .md file and you get JSON with its URL, which anyone with the URL can open. Otherwise the API returns the markdown and does not keep it.

Can I test without using my quota?

Yes. A sandbox API key returns placeholder markdown without rendering the page and costs nothing (X-Cost: 0).

Related

More free tools

Start using our Screenshot API for free today!

Get 300 requests / month for free