Skip to content
Get started

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

ParametersExpand Collapse
body: ExtractMarkdownParams { url, effort, geo_target, 2 more }
url: string

URL to fetch and convert to markdown

formaturi
effort?: "min" | "standard" | "max"

Fetch effort level controlling speed vs. capability tradeoff. "min": fastest, no fallback (1-5s). "standard": balanced with enhanced reliability (default, 3-15s). "max": full browser rendering for JS-heavy sites (15-60s).

Accepts one of the following:
"min"
"standard"
"max"
geo_target?: GeoTarget

Optional geotargeting parameters for proxy requests

country?: string

Country code using ISO 3166-1 alpha-2 standard (2 letters, e.g., "US", "GB", "JP"). See: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

metadata?: boolean

Include extracted metadata (Open Graph and HTML metadata) as a separate field in the response

nocache?: boolean

Bypass cache and force fresh data retrieval

ReturnsExpand Collapse
ExtractMarkdownResponse { content, url, metadata }
content: string

The markdown content (includes metadata as YAML frontmatter by default)

url: string

The URL that was converted to markdown

formaturi
metadata?: Metadata { author, created_at, creator, 13 more }

Extracted metadata from the page (only included when metadata parameter is true)

author?: string

Author information from HTML metadata

created_at?: string

Document creation date (ISO 8601)

creator?: string

Creator application (e.g., "Microsoft Word")

description?: string

Page description from Open Graph or HTML

image?: string

Featured image URL from Open Graph

formaturi
keywords?: Array<string>

PDF keywords as array

modified_at?: string

Document modification date (ISO 8601)

page_count?: number

Number of pages (PDF documents)

pdf_version?: string

PDF version (e.g., "1.5")

producer?: string

PDF producer software (e.g., "Adobe PDF Library")

publisher?: string

Publisher information from Open Graph

site_name?: string

Site name from Open Graph

subject?: string

PDF-specific metadata fields (populated for PDF documents) PDF subject or summary

title?: string

Page title from Open Graph or HTML

type?: string

Content type from Open Graph (e.g., article, website)

url?: string

Canonical URL from Open Graph

formaturi

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"
}