PHPackages                             zlt/laravel-notion-viewer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. zlt/laravel-notion-viewer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zlt/laravel-notion-viewer
=========================

Get Notion blocks with Laravel

v0.0.2(3y ago)010MITPHPPHP ^8.1

Since Dec 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/w99910/laravel-notion-viewer)[ Packagist](https://packagist.org/packages/zlt/laravel-notion-viewer)[ RSS](/packages/zlt-laravel-notion-viewer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Laravel Notion Viewer
=====================

[](#laravel-notion-viewer)

This is a server side package for getting Notion page and blocks.

In order to render notion blocks in your application, please consider using npm package [notion-viewer-client](https://www.npmjs.com/package/notion-viewer-client).

Table Of Contents
-----------------

[](#table-of-contents)

- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [TroubleShooting](#troubleshooting)

Prerequisites
-------------

[](#prerequisites)

Requirements are:

```
"illuminate/support": "^8.0|^9.0",
"php": "^8.1",
"illuminate/http": "^8.0|^9.0"

```

You need to provide API key for getting Notion API.

> If you don't know how to get API key, please consult [this documentation](Getting-Notion-API-Key.md).

Installation
------------

[](#installation)

- Install package via composer

```
composer require laravel-notion-viewer
```

- Publish config file

```
php artisan vendor:publish --tag=laravel-notion-viewer
```

The following routes will be auto registered.

```
/laravel-notion-viewer/data/{id}
/laravel-notion-viewer/link-preview
```

Config file will be

```
'API_KEY' => env('NOTION_API_KEY'),

'API_VERSION' => env('NOTION_API_VERSION'), // default '2022-06-28'

'cache' => [
   // If you want to cache the response, set this to true
   'enabled' => false,

   // specify cache time in seconds
   'time' => 60,
]
```

Usage
-----

[](#usage)

```
use Zlt\LaravelNotionViewer\Notion\Client;
```

- ### Getting Notion Page

    [](#getting-notion-page)

    ```
    Client::getPage('page-id');
    ```
- ### Getting Blocks

    [](#getting-blocks)

    ```
    Client::getBlocks('block-id');
    ```
- ### Getting Notion Page With Blocks

    [](#getting-notion-page-with-blocks)

    ```
    Client::getPageWithBlocks('page-id');
    ```
- ### Getting Recursive Blocks

    [](#getting-recursive-blocks)

    Some blocks have children blocks. In order to get all children blocks, use this method.

    ```
    Client::getRecursiveBlocks('block-id');
    ```
- ### Getting Page with Recursive Blocks

    [](#getting-page-with-recursive-blocks)

    ```
    Client::getPageWithRecursiveBlocks('page-id');
    ```

TroubleShooting
---------------

[](#troubleshooting)

- ### object\_not\_found error

    [](#object_not_found-error)

    If you get `object_not_found` error, please check if you have given your integration access to your Notion Page. See [here](Getting-Notion-API-Key.md#giving-your-integration-access-to-your-notion-page).

Support me
----------

[](#support-me)

If you want to support me, buy me a coffee via **Binance**.

[![binancePayQR](https://camo.githubusercontent.com/f6384ca715d7eca74e3d950d1df9f954456e14ae7acea5f516466b5ff67cfbdf/68747470733a2f2f7a61776c696e74756e2e6d652f42696e616e636550617951522e706e67)](https://camo.githubusercontent.com/f6384ca715d7eca74e3d950d1df9f954456e14ae7acea5f516466b5ff67cfbdf/68747470733a2f2f7a61776c696e74756e2e6d652f42696e616e636550617951522e706e67)

TODO
----

[](#todo)

- Add Tests
- Add more features to cover all Notion API endpoints

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

2

Last Release

1255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8cc3500e43c9d8366ea5b2b974176026c785ee56a3f93445a5262f155e9d37c9?d=identicon)[zawlintun](/maintainers/zawlintun)

---

Top Contributors

[![w99910](https://avatars.githubusercontent.com/u/65523475?v=4)](https://github.com/w99910 "w99910 (8 commits)")

### Embed Badge

![Health badge](/badges/zlt-laravel-notion-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/zlt-laravel-notion-viewer/health.svg)](https://phpackages.com/packages/zlt-laravel-notion-viewer)
```

###  Alternatives

[watson/active

Laravel helper for recognising the current route, controller and action

3253.6M14](/packages/watson-active)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[glhd/conveyor-belt

14797.0k](/packages/glhd-conveyor-belt)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
