# MarkdownifyTransformer

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_transformers/markdownify/MarkdownifyTransformer)

Converts HTML documents to Markdown format with customizable options for handling
links, images, other tags and heading styles using the markdownify library.

## Signature

```python
MarkdownifyTransformer(
    self,
    strip: Optional[Union[str, List[str]]] = None,
    convert: Optional[Union[str, List[str]]] = None,
    autolinks: bool = True,
    heading_style: str = 'ATX',
    **kwargs: Any = {},
)
```

## Description

**Example:**

.. code-block:: python
from langchain_community.document_transformers import MarkdownifyTransformer
markdownify = MarkdownifyTransformer()
docs_transform = markdownify.transform_documents(docs)

More configuration options can be found at the markdownify GitHub page:
https://github.com/matthewwithanm/python-markdownify

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `strip` | `Optional[Union[str, List[str]]]` | No | A list of tags to strip. This option can't be used with the convert option. (default: `None`) |
| `convert` | `Optional[Union[str, List[str]]]` | No | A list of tags to convert. This option can't be used with the strip option. (default: `None`) |
| `autolinks` | `bool` | No | A boolean indicating whether the "automatic link" style should be used when a a tag's contents match its href. Defaults to True. (default: `True`) |
| `heading_style` | `str` | No | Defines how headings should be converted. Accepted values are ATX, ATX_CLOSED, SETEXT, and UNDERLINED (which is an alias for SETEXT). Defaults to ATX. (default: `'ATX'`) |
| `kwargs` | `Any` | No | Additional options to pass to markdownify. (default: `{}`) |

## Extends

- `BaseDocumentTransformer`

## Constructors

```python
__init__(
    self,
    strip: Optional[Union[str, List[str]]] = None,
    convert: Optional[Union[str, List[str]]] = None,
    autolinks: bool = True,
    heading_style: str = 'ATX',
    **kwargs: Any = {},
) -> None
```

| Name | Type |
|------|------|
| `strip` | `Optional[Union[str, List[str]]]` |
| `convert` | `Optional[Union[str, List[str]]]` |
| `autolinks` | `bool` |
| `heading_style` | `str` |


## Properties

- `strip`
- `convert`
- `autolinks`
- `heading_style`
- `additional_options`

## Methods

- [`transform_documents()`](https://reference.langchain.com/python/langchain-community/document_transformers/markdownify/MarkdownifyTransformer/transform_documents)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_transformers/markdownify.py#L7)