PHPackages                             thelufenk/notion - 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. [API Development](/categories/api)
4. /
5. thelufenk/notion

ActiveLibrary[API Development](/categories/api)

thelufenk/notion
================

Notion PHP SDK

1.0.1(2y ago)04MITPHPPHP ^7.4|^8.0

Since May 25Pushed 2y agoCompare

[ Source](https://github.com/theLufenk/notion-php-sdk)[ Packagist](https://packagist.org/packages/thelufenk/notion)[ Docs](https://github.com/theLufenk/notion-php-sdk)[ GitHub Sponsors](https://github.com/Codecycler)[ RSS](/packages/thelufenk-notion/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

Notion PHP SDK
==============

[](#notion-php-sdk)

[![](https://github.com/codecyclernl/notion-php-sdk/raw/main/banner.png)](https://github.com/codecyclernl/notion-php-sdk/raw/main/banner.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7b761edf87fa1c576b6fa1bb26e41efdd1cb4d304be774e872f67e9629a0899b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636f64656379636c65722f6e6f74696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codecycler/notion)[![Total Downloads](https://camo.githubusercontent.com/140b6d93de170ed96bb98f1f19484448a8ae8dc9652f61a815b9875a43d92c21/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f64656379636c65722f6e6f74696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/codecycler/notion)

---

This is an unofficial PHP SDK for the new public Notion API. It's work in progress as we didn't get the change to be included to the private beta.

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

[](#installation)

You can install the package via composer:

```
composer require codecycler/notion
```

Usage
-----

[](#usage)

### Getting all databases attached to your integration.

[](#getting-all-databases-attached--to-your-integration)

```
use Notion\Notion;

$databaseOptions = new Notion($token)
    ->database()
    ->ids();
```

### Querying a database by id

[](#querying-a-database-by-id)

```
use Notion\Notion;

$databaseOptions = new Notion($token)
    ->database($databaseId)
    ->query()
    ->get();
```

### Query database by property

[](#query-database-by-property)

```
$nameFilter = (new Notion\Filters\TextFilter())
    ->equals('Name', 'Notion is awesome!');

$database = $client->database('e3161af3-ff12-43c5-9f42-02eea4ab4cbf')
  ->query()
  ->filter($nameFilter)
  ->get();

foreach ($database->pages as $page) {
  $name = $page->name;
  $status = $page->status;
}
```

### Getting a page by id

[](#getting-a-page-by-id)

```
$page = $client->page('9b0ff081-1af8-4751-92d6-9e07fbd5c20d')->get();

$name           = $page->name;          // Property: 'Name'
$showOnWebsite  = $page->showOnWebsite; // Property: 'Show on website'
```

### Creating a new page in a database

[](#creating-a-new-page-in-a-database)

```
$database = $client->database('e3161af3-ff12-43c5-9f42-02eea4ab4cbf')->get();

$page = $database->newPage();

$page->name = 'New page created with the Notion API';
$page->showOnWebsite = true;

$page->save();
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sebastiaan Kloos](https://github.com/codecyclernl)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% 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 ~1 days

Total

2

Last Release

1080d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/203de04087748a855a31770b9852d0995d69d8aa1514c781745d88e9c6e47299?d=identicon)[theLufenk](/maintainers/theLufenk)

---

Top Contributors

[![SebastiaanKloos](https://avatars.githubusercontent.com/u/6506510?v=4)](https://github.com/SebastiaanKloos "SebastiaanKloos (60 commits)")[![theLufenk](https://avatars.githubusercontent.com/u/13207546?v=4)](https://github.com/theLufenk "theLufenk (3 commits)")[![Divi](https://avatars.githubusercontent.com/u/1122160?v=4)](https://github.com/Divi "Divi (1 commits)")[![jdrieghe](https://avatars.githubusercontent.com/u/12606789?v=4)](https://github.com/jdrieghe "jdrieghe (1 commits)")[![xpundel](https://avatars.githubusercontent.com/u/1384653?v=4)](https://github.com/xpundel "xpundel (1 commits)")

---

Tags

notioncodecycler

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/thelufenk-notion/health.svg)

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

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[fiveam-code/laravel-notion-api

Laravel Wrapper for the Notion API

435224.4k1](/packages/fiveam-code-laravel-notion-api)[dcblogdev/laravel-microsoft-graph

A Laravel Microsoft Graph API (Office365) package

168285.5k1](/packages/dcblogdev-laravel-microsoft-graph)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[jasara/php-amzn-selling-partner-api

A fluent interface for Amazon's Selling Partner API in PHP

1344.8k1](/packages/jasara-php-amzn-selling-partner-api)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)

PHPackages © 2026

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