Block
A block object represents a piece of content within Notion. The API translates the headings, toggles, paragraphs, lists, media, and more that you can interact with in the Notion UI as different block type objects.
For example, the following block object represents a Heading 2 in the Notion UI:
Use the Retrieve block children endpoint to list all of the blocks on a page.
Keys
Fields marked with an * are available to integrations with any capabilities. Other properties require read content capabilities in order to be returned from the Notion API. Consult the integration capabilities reference for details.
Block types that support child blocks
Some block types contain nested blocks. The following block types support child blocks:
- Bulleted list item
- Callout
- Child database
- Child page
- Column
- Heading 1, when the
is_toggleableproperty istrue - Heading 2, when the
is_toggleableproperty istrue - Heading 3, when the
is_toggleableproperty istrue - Numbered list item
- Paragraph
- Quote
- Synced block
- Table
- Template
- To do
- Toggle
Only the block type objects listed in the reference below are supported. Any unsupported block types appear in the structure, but contain a type set to "unsupported".
Block type objects
Every block object has a key corresponding to the value of type. Under the key is an object with type-specific block information.
Many block types support rich text. In cases where it is supported, a rich_text object will be included in the block type object. All rich_text objects will include a plain_text property, which provides a convenient way for developers to access unformatted text from the Notion block.
Audio
Audio block objects contain a file object detailing information about the audio file.
Supported audio types
The following file types can be attached with external URLs in the API as well as in the Notion app UI:
.mp3.wav.ogg.oga.m4a
A wider set of audio files is supported in the File Upload API and can be attached using a file_upload ID.
Supported file upload types
See the file upload reference for a list of supported file extensions and content types when attaching a File Upload to a block.
Audio blocks only support file types in the “audio” section of the table.
Bookmark
Bookmark block objects contain the following information within the bookmark property:
Breadcrumb
Breadcrumb block objects do not contain any information within the breadcrumb property.
Bulleted list item
Bulleted list item block objects contain the following information within the bulleted_list_item property:
Callout
Callout block objects contain the following information within the callout property:
Child database
Child database block objects contain the following information within the child_database property:
Creating and updating child_database blocks
To create or update child_database type blocks, use the Create a database and the Update a database endpoints, specifying the ID of the parent page in the parent body param.
Child page
Child page block objects contain the following information within the child_page property:
Creating and updating child_page blocks
To create or update child_page type blocks, use the Create a page and the Update page endpoints, specifying the ID of the parent page in the parent body param.
Code
Code block objects contain the following information within the code property:
Column list and column
Column lists are parent blocks for columns. They do not contain any information within the column_list property.
Columns are parent blocks for any block types listed in this reference except for other columns. They do not require any information within the column property, but a width_ratio number between 0 and 1 can be provided to customize the width of a column relative to others in the same column list. When omitted, the default is to use equal widths for all columns. When provided, width_ratios should add up to 1.
Columns can only be appended to column_lists.
When creating a column_list block via Append block children, the column_list must have at least two columns, and each column must have at least one child.
Retrieve the content in a column list
Follow these steps to fetch the content in a column_list:
-
Get the
column_listID from a query to Retrieve block children for the parent page. -
Get the
columnchildren from a query to Retrieve block children for thecolumn_list. -
Get the content in each individual
columnfrom a query to Retrieve block children for the uniquecolumnID.
Divider
Divider block objects do not contain any information within the divider property.
Embed
Embed block objects include information about another website displayed within the Notion UI. The embed property contains the following information:
The Notion app uses a 3rd-party service, iFramely, to validate and request metadata for embeds given a URL. This works well in a web app because Notion can kick off an asynchronous request for URL information, which might take seconds or longer to complete, and then update the block with the metadata in the UI after receiving a response from iFramely.
We chose not to call iFramely when creating embed blocks in the API because the API needs to be able to return faster than the UI, and because the response from iFramely could actually cause us to change the block type. This would result in a slow and potentially confusing experience as the block in the response would not match the block sent in the request.
The result is that embed blocks created via the API may not look exactly like their counterparts created in the Notion app.
For example, the following object can be passed to the Append block children endpoint:
For other video sources, see Supported video types.
Equation
Equation block objects are represented as children of paragraph blocks. They are nested within a rich text object and contain the following information within the equation property:
File
File block objects contain the following information within the file property:
Headings
All heading block objects, heading_1, heading_2, and heading_3, contain the following information within their corresponding objects:
Image
Image block objects contain a file object detailing information about the image.
Supported external image types
The image must be directly hosted. In other words, the url cannot point to a service that retrieves the image. The following image types are supported:
.bmp.gif.heic.jpeg.jpg.png.svg.tif.tiff
Supported file upload types
See the file upload reference for a list of supported file extensions and content types when attaching a File Upload to a block.
Image blocks only support file types in the “image” section of the table.
Link Preview
Link Preview block objects contain the originally pasted url:
The link_preview block can only be returned as part of a response. The API does not support creating or appending link_preview blocks.
Mention
A mention block object is a child of a rich text object that is nested within a paragraph block object. This block type represents any @ tag in the Notion UI, for a user, date, Notion page, Notion database, or a miniaturized version of a Link Preview.
A mention block object contains the following fields:
Numbered list item
Numbered list item block objects contain the following information within the numbered_list_item property:
Paragraph
Paragraph block objects contain the following information within the paragraph property:
A PDF block object represents a PDF that has been embedded within a Notion page. It contains the following fields:
Supported file upload types
See the file upload reference for a list of supported file extensions and content types when attaching a File Upload to a block.
PDF blocks only support a type of .pdf.
Quote
Quote block objects contain the following information within the quote property:
Synced block
Similar to the Notion UI, there are two versions of a synced_block object: the original block that was created first and doesn’t yet sync with anything else, and the duplicate block or blocks synced to the original.
An original synced block must be created before corresponding duplicate block or blocks can be made.
Original synced block
Original synced block objects contain the following information within the synced_block property:
Duplicate synced block
Duplicate synced block objects contain the following information within the synced_from object:
The API does not supported updating synced block content.
Table
Table block objects are parent blocks for table row children. Table block objects contain the following fields within the table property:
table_width can only be set when the table is first created.
Note that the number of columns in a table can only be set when the table is first created. Calls to the Update block endpoint to update table_width fail.
Table rows
Follow these steps to fetch the table_rows of a table:
-
Get the
tableID from a query to Retrieve block children for the parent page. -
Get the
table_rowsfrom a query to Retrieve block children for thetable.
A table_row block object contains the following fields within the table_row property:
When creating a table block via the Append block children endpoint, the table must have at least one table_row whose cells array has the same length as the table_width.
Table of contents
Table of contents block objects contain the following information within the table_of_contents property:
Template
As of March 27, 2023 creation of template blocks will no longer be supported.
Template blocks represent template buttons in the Notion UI.
Template block objects contain the following information within the template property:
To do
To do block objects contain the following information within the to_do property:
Toggle blocks
Toggle block objects contain the following information within the toggle property:
Video
Video block objects contain a file object detailing information about the video.
Supported video types
.amv.asf.avi.f4v.flv.gifv.mkv.mov.mpg.mpeg.mpv.mp4.m4v.qt.wmv- YouTube video links that include
embedorwatch.
E.g.https://www.youtube.com/watch?v=[id],https://www.youtube.com/embed/[id]
Vimeo video links are not currently supported by the video block type. However, they can be embedded in Notion pages using the embed block type. See Embed for more information.
Supported file upload types
See the file upload reference for a list of supported file extensions and content types when attaching a File Upload to a block.
Video blocks only support file types in the “video” section of the table.