Markdown
extract.markdown(ExtractMarkdownParams**kwargs) -> ExtractMarkdownResponse
POST/extract/markdown
Fetches a URL and converts its HTML content to clean Markdown format with optional metadata extraction
Markdown
import os
from tabstack import Tabstack
client = Tabstack(
api_key=os.environ.get("TABSTACK_API_KEY"), # This is the default and can be omitted
)
response = client.extract.markdown(
url="https://example.com/blog/article",
)
print(response.content){
"content": "# Example Article Title\n\nThis is the article content converted to markdown...",
"metadata": {
"author": "Example Author",
"description": "This is an example article description",
"image": "https://example.com/images/article.jpg",
"publisher": "Example Publisher",
"site_name": "Example Blog",
"title": "Example Article Title",
"type": "article",
"url": "https://example.com/blog/article"
},
"url": "https://example.com/blog/article"
}{
"error": "access to internal resources is not allowed"
}{
"error": "failed to convert HTML to Markdown"
}Returns Examples
{
"content": "# Example Article Title\n\nThis is the article content converted to markdown...",
"metadata": {
"author": "Example Author",
"description": "This is an example article description",
"image": "https://example.com/images/article.jpg",
"publisher": "Example Publisher",
"site_name": "Example Blog",
"title": "Example Article Title",
"type": "article",
"url": "https://example.com/blog/article"
},
"url": "https://example.com/blog/article"
}{
"error": "access to internal resources is not allowed"
}{
"error": "failed to convert HTML to Markdown"
}