Extract Markdown Output API

Use output=md, the /search.md endpoint or the Accept: text/markdown header to get the page's main content as Markdown, without navigation, ads, cookie banners, sidebars and other boilerplate. When no main content is found, the whole page is converted. include_tags and exclude_tags change which content is used; with include_tags, all of the visible selected content is converted. Map mode returns the list of URLs, and crawl mode returns the Markdown of each page under its URL.

The JSON response has the same Markdown in markdown, up to 50,000 characters. Set include_markdown=false to leave it out.

API examples

Page Markdown output: md


Markdown Example

![A Light in the Attic](https://books.toscrape.com/media/cache/fe/72/fe72f0532301ec28892ae79a629a293c.jpg)

# A Light in the Attic

£51.77

In stock (22 available)

---

## Product Description

It's hard to imagine a world without A Light in the Attic. This now-classic collection of poetry and drawings from Shel Silverstein celebrates its 20th anniversary with this special edition. ...

## Product Information

| UPC | a897fe39b1053632 |
| --- | --- |
| Product Type | Books |
| Price (excl. tax) | £51.77 |
| Price (incl. tax) | £51.77 |
| Tax | £0.00 |
| Availability | In stock (22 available) |
| Number of reviews | 0 |

Keep only the title and paragraphs include_tags: h1, p


Markdown Example

# Coffee

**Coffee** is a beverage [brewed](https://en.wikipedia.org/wiki/Coffee_brew) from roasted, ground [coffee beans](https://en.wikipedia.org/wiki/Coffee_bean). Dark-colored and [bitter](https://en.wikipedia.org/wiki/Bitterness), coffee has a [stimulating effect](https://en.wikipedia.org/wiki/Stimulant) on humans due to its [caffeine](https://en.wikipedia.org/wiki/Caffeine) content; however [decaffeinated](https://en.wikipedia.org/wiki/Decaffeinated) coffee is also commercially available. There are also various [coffee substitutes](https://en.wikipedia.org/wiki/Coffee_substitute).

Coffee production begins when the seeds from coffee cherries, the *[Coffea](https://en.wikipedia.org/wiki/Coffea)* plant's fruits, are separated to produce unroasted green coffee beans. The "beans" are [roasted](https://en.wikipedia.org/wiki/Coffee_roasting) and then ground into fine particles. ...

...

Markdown in the JSON response


JSON Example

{
  ...
  "meta_tags": {...},
  "markdown": "![A Light in the Attic](https://books.toscrape.com/media/cache/fe/72/fe72f0532301ec28892ae79a629a293c.jpg)\n\n# A Light in the Attic\n\n£51.77\n\nIn stock (22 available)\n\n---\n\n## Product Description\n\n...\n\n## Product Information\n\n| UPC | a897fe39b1053632 |\n| --- | --- |\n| Product Type | Books |\n...",
  "inline_links": [...],
  ...
}