Skip to content
Get started

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

ParametersExpand Collapse
url: str

URL to fetch and convert to markdown

formaturi
effort: Optional[Literal["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: Optional[GeoTarget]

Optional geotargeting parameters for proxy requests

country: Optional[str]

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: Optional[bool]

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

nocache: Optional[bool]

Bypass cache and force fresh data retrieval

ReturnsExpand Collapse
class ExtractMarkdownResponse:
content: str

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

url: str

The URL that was converted to markdown

formaturi
metadata: Optional[Metadata]

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

author: Optional[str]

Author information from HTML metadata

created_at: Optional[str]

Document creation date (ISO 8601)

creator: Optional[str]

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

description: Optional[str]

Page description from Open Graph or HTML

image: Optional[str]

Featured image URL from Open Graph

formaturi
keywords: Optional[List[str]]

PDF keywords as array

modified_at: Optional[str]

Document modification date (ISO 8601)

page_count: Optional[int]

Number of pages (PDF documents)

pdf_version: Optional[str]

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

producer: Optional[str]

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

publisher: Optional[str]

Publisher information from Open Graph

site_name: Optional[str]

Site name from Open Graph

subject: Optional[str]

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

title: Optional[str]

Page title from Open Graph or HTML

type: Optional[str]

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

url: Optional[str]

Canonical URL from Open Graph

formaturi

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