---
title: "Markdown"
method: POST
path: "/extract/markdown"
tags: ["Extract"]
---

# Markdown

`POST /extract/markdown`

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

## Request body

- V1ExtractMarkdownRequest
  - `content` 'main' | 'full' — Content scope. "main" (default) returns the main article content; "full" returns the whole page, including navigation, footer, and links.
  - `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).
  - `geo_target` GeotargetGeoTarget
    - `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
  - `url` string, uri, required — URL to fetch and convert to markdown

## Response `200`

OK

- V1ExtractMarkdownResponse
  - `content` string, required — The markdown content (includes metadata as YAML frontmatter by default)
  - `metadata` PagemetadataMetadata
    - `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
    - `favicon` string, uri — Favicon URL (resolved to absolute) parsed from <link rel="icon"> / "shortcut icon" / "apple-touch-icon"
    - `image` string, uri — Featured image URL from Open Graph
    - `keywords` string[] — PDF keywords as array
    - `modified_at` string — Document modification date (ISO 8601)
    - `page_count` integer — 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, uri — Canonical URL from Open Graph
  - `url` string, uri, required — The URL that was converted to markdown

## Other responses

- `400` — Bad request - URL is required
- `401` — Unauthorized - Invalid or missing Bearer token
- `402` — Payment Required - organization is out of credits
- `422` — Invalid URL or inaccessible resource
- `429` — Too Many Requests - rate limit exceeded
- `500` — Server error

## Changes

- **2026-08-10** `f3f7ba7d83e4` — 5 info
  - added the new optional request property `content`
  - added the non-success response with the status `402`
  - added the non-success response with the status `429`
  - added `#/components/schemas/pagemetadata.Metadata` to the `metadata` response property `allOf` list for the response status `200`
  - …1 more
- **2026-03-12** `8f80078ef30b` — 1 info
  - added the new optional request property `effort`
- **2026-01-30** `48ec35c63b70` — 9 info
  - added the new optional request property `geo_target`
  - added the optional property `metadata/allOf[#/components/schemas/markdown.Metadata]/created_at` to the response with the `200` status
  - added the optional property `metadata/allOf[#/components/schemas/markdown.Metadata]/creator` to the response with the `200` status
  - added the optional property `metadata/allOf[#/components/schemas/markdown.Metadata]/keywords` to the response with the `200` status
  - …5 more

[Change history](https://skmtc.dev/mozilla-ocho/apis/tabs-api/changes/extract/markdown/post.md)

---

[API](https://skmtc.dev/mozilla-ocho/apis/tabs-api.md) · [All operations](https://skmtc.dev/mozilla-ocho/apis/tabs-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mozilla-ocho/tabs-api/revisions/f3f7ba7d83e4/schema)
