Supported Formats
HTML Pages
Generic HTML documents and web pages
RSS/Atom Feeds
News feeds and blog syndication
Wikipedia
Wikipedia articles with clean extraction
YouTube
Video metadata and transcripts
Bing Search
Bing search results pages
HTML Pages
Dependencies
Features
- Extracts main content from
<body>tag - Removes
<script>and<style>blocks - Converts HTML elements to Markdown equivalents
- Preserves links, images, tables, and formatting
- Extracts page title from
<title>tag
Usage
Implementation
- Converter Class:
HtmlConverter(_html_converter.py) - Accepted Extensions:
.html,.htm - MIME Types:
text/html,application/xhtml - Markdown Engine: Custom
_CustomMarkdownifybased onmarkdownifylibrary
RSS/Atom Feeds
Dependencies
Features
- Supports both RSS 2.0 and Atom 1.0 formats
- Extracts feed title and description
- Converts each item/entry to a section
- Parses HTML content within feed items
- Preserves publication dates
Usage
Output Format
RSS Feed:Implementation
- Converter Class:
RssConverter(_rss_converter.py) - Accepted Extensions:
.rss,.atom,.xml - MIME Types:
application/rss+xml,application/atom+xml,text/xml - Detection: Checks for
<rss>or<feed>root elements - XML Parser:
defusedxml.minidom(secure XML parsing)
Wikipedia
Dependencies
Features
- Extracts main article content only
- Removes navigation, sidebars, and infoboxes
- Preserves article structure and formatting
- Includes article title as H1 heading
- Works with any language Wikipedia
Usage
Output Format
Implementation
- Converter Class:
WikipediaConverter(_wikipedia_converter.py) - URL Pattern:
https?://[a-z]{2,3}.wikipedia.org/ - Content Selector:
<div id="mw-content-text"> - Title Selector:
<span class="mw-page-title-main">
YouTube
Dependencies
Features
- Extracts video title and description
- Retrieves video metadata (views, keywords, duration)
- Downloads video transcript in multiple languages
- Falls back gracefully if transcript unavailable
Usage
Output Format
Implementation
- Converter Class:
YouTubeConverter(_youtube_converter.py) - URL Pattern:
https://www.youtube.com/watch?v=* - Metadata Source: Meta tags and
ytInitialDataJSON - Transcript API:
youtube-transcript-apilibrary - Languages: Defaults to
["en"], customizable viayoutube_transcript_languages
Transcript Options
- Try to fetch transcript in first language (Spanish)
- Fall back to second language (French) if unavailable
- Fall back to third language (English) if unavailable
- Attempt auto-translation if no direct transcript exists
Bing Search Results
Dependencies
Features
- Extracts organic search results
- Removes ads and navigation
- Decodes Bing redirect URLs to actual destination URLs
- Preserves result snippets and links
Usage
Output Format
Implementation
- Converter Class:
BingSerpConverter(_bing_serp_converter.py) - URL Pattern:
https://www.bing.com/search?q=* - Result Selector: Elements with class
b_algo - URL Decoding: Base64 decodes redirect URLs from
uparameter
Common Patterns
Fetching Web Content
Processing Multiple URLs
Error Handling
Implementation Notes
Converter Priority
MarkItDown checks converters in this order for web content:- WikipediaConverter - Checks URL matches Wikipedia domain
- YouTubeConverter - Checks URL matches YouTube watch page
- BingSerpConverter - Checks URL matches Bing search
- RssConverter - Checks for RSS/Atom root elements
- HtmlConverter - Generic fallback for all HTML
Source Files
Next Steps
Other Formats
CSV, JSON, XML, ZIP, EPUB, Jupyter notebooks
Python API
Learn more about the programmatic interface