Markdown content
Retrieve a page as markdown
Retrieve the content of a page rendered as markdown.
GET
TypeScript SDK
Use cases
Use this endpoint to retrieve the full content of a Notion page as markdown, instead of working with the block-based API. This is especially useful for agentic systems and developer tools that work natively with markdown. The endpoint also accepts non-navigable block IDs returned inunknown_block_ids from a previous truncated response. Pass these IDs to fetch additional subtrees of a large page.
General behavior
Returns apage_markdown object containing the page content as a markdown string.
Set the markdown_version query parameter to v2 to get Notion-flavored Markdown instead. v2 is recommended. v1 is deprecated. It’s the default on 2026-03-11 and older. On 2026-12-01, v2 is the default and v1 returns a 400 validation_error. See Markdown versions.
RequirementsYour connection must have read content capabilities on the target page in order to call this endpoint. To update your connection’s capabilities, navigate to the Developer portal, select your connection, open the Configuration tab, and scroll to the Capabilities section.Attempting to call this endpoint without read content capabilities returns an HTTP response with a 403 status code.
Unknown blocks
Some blocks may appear as<unknown url="..." alt="..."/> tags in the markdown output. This happens when:
- Truncation: The page exceeds the record limit (approximately 20,000 blocks) and some blocks could not be loaded.
- Permissions: The page contains child pages or other content that is not shared with the connection.
- Unsupported block types: Certain block types (such as bookmarks, embeds, and link previews) are not yet supported in the markdown format.
truncated field is set to true and the unknown_block_ids array contains the affected block IDs.
You can attempt to fetch unloaded blocks by passing their IDs back to this same endpoint as the page_id path parameter. Blocks that are unknown due to permissions will return a 404 error since the connection does not have access.
The
unknown_block_ids array does not distinguish between truncated and inaccessible blocks. Handle object_not_found errors gracefully when re-fetching unknown block IDs.Errors
Returns a 404 HTTP response if the page doesn’t exist, or if the connection doesn’t have access to the page. Returns a 400 or 429 HTTP response if the request exceeds the request limits. Each Public API endpoint can return several possible error codes. See the Error codes section of the Status codes documentation for more information.Authorizations
Headers
The API version to use for this request. The latest version is 2026-12-01.
Available options:
2026-03-11, 2026-12-01 Path Parameters
Query Parameters
The Markdown syntax to use. v2 is Notion-flavored Markdown and is recommended. v1 is enhanced markdown. It's deprecated. It's the default on 2026-03-11 and older. On 2026-12-01, v2 is the default and v1 returns a 400 validation_error.
Available options:
v1, v2