pages.retrieveMarkdown
Retrieves a page’s content rendered as Notion-flavored Markdown.Method Signature
Parameters
The ID of the page (or block) to retrieve as markdown. Non-navigable block IDs from truncated responses can be passed here to fetch their subtrees.
Whether to include meeting note transcripts. Defaults to
false.- When
true: Full transcripts are included in the markdown - When
false: A placeholder with the meeting note URL is shown instead
Bearer token for authentication. Overrides the client-level authentication.
Response
Always
"page_markdown"The ID of the page or block
The page content rendered as enhanced Markdown
Whether the content was truncated due to exceeding the record count limit
Block IDs that could not be loaded (appeared as
<unknown> tags in the markdown). Pass these IDs back to this endpoint to fetch their content separately.Examples
Basic Markdown Retrieval
Save Page as Markdown File
Include Meeting Transcripts
Handle Truncated Content
pages.updateMarkdown
Updates a page’s content using Notion-flavored Markdown. You can insert new content or replace existing content ranges.Method Signature
Parameters
The ID of the page to update.
The type of update operation. One of:
"insert_content"- Insert new content into the page"replace_content_range"- Replace a range of existing content
For insert_content type:
Configuration for inserting new content.
For replace_content_range type:
Configuration for replacing existing content.
Bearer token for authentication. Overrides the client-level authentication.
Response
Same asretrieveMarkdown - returns a PageMarkdownResponse with the updated content.
Examples
Insert Content at End
Insert Content After Specific Text
Replace Content Range
Replace with Permission to Delete
Update Documentation from Git
Append Daily Log Entry
Content Selection Format
Theafter and content_range parameters use an ellipsis format to select content:
- Start text: The beginning of the content range
- End text: The end of the content range
- Ellipsis (
...): Separator between start and end
Examples:
"## Introduction...## Methods"- Selects from “Introduction” heading to “Methods” heading"First paragraph...Last paragraph"- Selects text between these paragraphs"# Title...---"- Selects from title to a divider
Notion-Flavored Markdown
Notion’s markdown flavor supports:- Standard Markdown syntax (headings, lists, bold, italic, etc.)
- Code blocks with syntax highlighting
- Tables
- Callouts and quotes
- Links and inline mentions
- LaTeX equations
- Embeds and media
Important Notes
The
truncated field in the response indicates if the page has more content than can be returned in a single response. Use the unknown_block_ids to fetch additional content.Related Methods
- pages.create - Create a page with markdown content
- pages.retrieve - Retrieve page properties and metadata
- blocks.children.list - List block children for detailed structure