Pages-Endpoint Examples

Pages and Database-Entries

In order to access to properties

# Returns a specific page
\Notion::pages()
        ->find($pageId);

# Returns the title of a specific page
\Notion::pages()
        ->find($pageId)
        ->getTitle();

# Returns the Notion page-url of a specific page
\Notion::pages()
        ->find($pageId)
        ->getUrl();

Fetch Page Content

In order to fetch page content, the block children of the page have to be retrieved.

A Notion page is a block and the page id can be used for retrieving its children.

Dive into retrieving of block children: ✨ Blocks