Markdown
client.extract.markdown(ExtractMarkdownParams { url, effort, geo_target, 2 more } body, RequestOptionsoptions?): ExtractMarkdownResponse { content, url, metadata }
POST/extract/markdown
Fetches a URL and converts its HTML content to clean Markdown format with optional metadata extraction
Parameters
Returns
Markdown
import Tabstack from '@tabstack/sdk';
const client = new Tabstack({
apiKey: process.env['TABSTACK_API_KEY'], // This is the default and can be omitted
});
const response = await client.extract.markdown({ url: 'https://example.com/blog/article' });
console.log(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"
}