## Markdown

**post** `/extract/markdown`

Fetches a URL and converts its HTML content to clean Markdown format with optional metadata extraction

### Body Parameters

- `url: string`

  URL to fetch and convert to markdown

- `content: optional "main" or "full"`

  Content scope. "main" (default) returns the main article content; "full" returns the whole page, including navigation, footer, and links.

  - `"main"`

  - `"full"`

- `effort: optional "min" or "standard" or "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).

  - `"min"`

  - `"standard"`

  - `"max"`

- `geo_target: optional GeotargetGeoTarget`

  Optional geotargeting parameters for proxy requests

  - `country: optional 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: optional boolean`

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

- `nocache: optional boolean`

  Bypass cache and force fresh data retrieval

### Returns

- `content: string`

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

- `url: string`

  The URL that was converted to markdown

- `metadata: optional object { author, created_at, creator, 14 more }`

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

  - `author: optional string`

    Author information from HTML metadata

  - `created_at: optional string`

    Document creation date (ISO 8601)

  - `creator: optional string`

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

  - `description: optional string`

    Page description from Open Graph or HTML

  - `favicon: optional string`

    Favicon URL (resolved to absolute) parsed from <link rel="icon"> / "shortcut icon" / "apple-touch-icon"

  - `image: optional string`

    Featured image URL from Open Graph

  - `keywords: optional array of string`

    PDF keywords as array

  - `modified_at: optional string`

    Document modification date (ISO 8601)

  - `page_count: optional number`

    Number of pages (PDF documents)

  - `pdf_version: optional string`

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

  - `producer: optional string`

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

  - `publisher: optional string`

    Publisher information from Open Graph

  - `site_name: optional string`

    Site name from Open Graph

  - `subject: optional string`

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

  - `title: optional string`

    Page title from Open Graph or HTML

  - `type: optional string`

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

  - `url: optional string`

    Canonical URL from Open Graph

### Example

```http
curl https://api.tabstack.ai/v1/extract/markdown \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $TABSTACK_API_KEY" \
    --max-time 180 \
    -d '{
          "url": "https://example.com/blog/article",
          "content": "main",
          "effort": "standard",
          "metadata": true
        }'
```

#### Response

```json
{
  "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"
}
```
