Blog Detail


Effortless Notion integrations with Laravel Notion API cover image

arrow_back Effortless Notion integrations with Laravel Notion API

Laravel Notion API is an awesome package that provides a simple and crisp way to access the Notion API endpoints, query data, and update existing entries.


You can install the package via composer:

composer require fiveam-code/laravel-notion-api


The Notion API requires an access token and a Notion integration, the Notion documentation explains how this works. It’s important to grant access to the integration within your Notion account to enable API access.

Add your Notion API token to your .env file:


Basic Usage


use FiveamCode\LaravelNotionApi\Notion; 

# Access through Facade (token has to be set in .env)

# Custom instantiation (necessary if you want to access more than one NotionApi integration)
$notion = new Notion($apiToken, $apiVersion); // version-default is 'v1'

Fetch Page Information

// Returns a specific page


// Returns a collection of pages and databases of your workspace (included in your integration-token)

Query Database

// Queries a specific database and returns a collection of pages (= database entries)
$sortings = new Collection();
$filters = new Collection();

  ->add(Sorting::propertySort('Ordered', 'ascending'));
  ->add(Sorting::timestampSort('created_time', 'ascending'));

  ->add(Filter::textFilter('title', ['contains' => 'new']));
// or
  ->add(Filter::rawFilter('Tags', ['multi_select' => ['contains' => 'great']]));
      ->filterBy($filters) // filters are optional
      ->sortBy($sortings) // sorts are optional
      ->limit(5) // limit is optional

For more details, please head over to the documentation.

Important Note

If you are a business and want to leverage Laravel for your next PHP-based web application, CRM Software, E-commerce application, SAAS application, or any custom web application development for your custom requirements, you must discover an amazing team with experience in the Laravel framework. So Codebrisk is here to help you with your tailored requirements regarding Laravel Development. Please feel free to send us an email at or get in touch with us, our business person will get back to you.

Published at : 14-09-2022

Author : Rizwan Aslam
Rizwan Aslam

I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.

Launch your project

Launch project