{"id":23453793,"url":"https://github.com/elsayed85/notion","last_synced_at":"2026-05-18T05:39:15.737Z","repository":{"id":56977035,"uuid":"367309027","full_name":"elsayed85/notion","owner":"elsayed85","description":null,"archived":false,"fork":false,"pushed_at":"2021-05-14T09:54:54.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-04-10T23:53:41.712Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsayed85.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null},"funding":{"github":"elsayed85"}},"created_at":"2021-05-14T09:08:23.000Z","updated_at":"2022-05-12T10:21:00.000Z","dependencies_parsed_at":"2022-08-21T11:20:32.440Z","dependency_job_id":null,"html_url":"https://github.com/elsayed85/notion","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnotion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnotion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnotion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnotion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsayed85","download_url":"https://codeload.github.com/elsayed85/notion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317704,"owners_count":21083528,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T02:29:50.713Z","updated_at":"2026-05-18T05:39:10.705Z","avatar_url":"https://github.com/elsayed85.png","language":"PHP","funding_links":["https://github.com/sponsors/elsayed85"],"categories":[],"sub_categories":[],"readme":"# This is my package For Notion Api\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require elsayed85/notion\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --provider=\"Elsayed85\\Notion\\NotionServiceProvider\" --tag=\"notion-config\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    \"base\" =\u003e \"https://api.notion.com\",\n    'version' =\u003e '2021-05-13'\n];\n```\n\nAdd Notion Api To your env\n\nin config/services.php\n```\n'notion' =\u003e [\n        'client_id' =\u003e env('NOTION_CLIENT_ID'),\n        'client_secret' =\u003e env('NOTION_CLIENT_SECRET'),\n        'token' =\u003e env('NOTION_TOKEN')\n]\n```\n\nin .env add \n```\n# for public\nNOTION_CLIENT_ID=\nNOTION_CLIENT_SECRET=\n\n# for internal\nNOTION_TOKEN=\n```\n\n\n## Usage\n\n```php\n$notion = new Elsayed85\\Internal\\Notion();\n\n$start_cursor = null;\n$page_size = 20;\n\n// https://developers.notion.com/reference/get-databases\n$notion-\u003edatabases($start_cursor , $page_size);\n\n// https://developers.notion.com/reference/post-database-query\n$notion-\u003equeryDatabase(\"2f611956-c64b-4588-ab64-2f013ac42527\");\n\n// https://developers.notion.com/reference/get-database\n$notion-\u003edatabase(\"2f611956-c64b-4588-ab64-2f013ac42527\");\n\n// https://developers.notion.com/reference/get-users\n$notion-\u003eusers();\n\n// https://developers.notion.com/reference/get-user\n $notion-\u003euser(\"73e41e87-0ae2-4ef0-bd21-a9d352c07a47\");\n\n // https://developers.notion.com/reference/post-search\n $notion-\u003esearch(\"hassan\", 'last_edited_time');\n\n\n// https://developers.notion.com/reference/get-page\n $notion-\u003epage(\"cdd93f5f-1626-4388-9a02-78779663a3aa\")\n\n// https://developers.notion.com/reference/post-page\n $notion-\u003ecreatePage(\n        \"2f611956-c64b-4588-ab64-2f013ac42527\",\n        \"database_id\",\n        [\n            'Name' =\u003e [\n                'title' =\u003e [\n                    0 =\u003e [\n                        'text' =\u003e [\n                            'content' =\u003e 'Tuscan Kale',\n                        ],\n                    ],\n                ],\n            ],\n            'Email' =\u003e [\n                'email' =\u003e \"test@gmail.com\",\n            ],\n        ],\n        [\n            0 =\u003e [\n                'object' =\u003e 'block',\n                'type' =\u003e 'heading_2',\n                'heading_2' =\u003e [\n                    'text' =\u003e [\n                        0 =\u003e [\n                            'type' =\u003e 'text',\n                            'text' =\u003e [\n                                'content' =\u003e 'Lacinato kale',\n                            ],\n                        ],\n                    ],\n                ],\n            ],\n            1 =\u003e [\n                'object' =\u003e 'block',\n                'type' =\u003e 'paragraph',\n                'paragraph' =\u003e [\n                    'text' =\u003e [\n                        0 =\u003e [\n                            'type' =\u003e 'text',\n                            'text' =\u003e [\n                                'content' =\u003e 'Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.',\n                                'link' =\u003e [\n                                    'url' =\u003e 'https://en.wikipedia.org/wiki/Lacinato_kale',\n                                ],\n                            ],\n                        ],\n                    ],\n                ],\n            ],\n        ]\n    );\n\n\n// https://developers.notion.com/reference/patch-page\n     $notion-\u003eupdatePage(\n        \"cdd93f5f-1626-4388-9a02-78779663a3aa\",\n        [\n            'Name' =\u003e [\n                'title' =\u003e [\n                    0 =\u003e [\n                        'text' =\u003e [\n                            'content' =\u003e 'Tuscan Kale',\n                        ],\n                    ],\n                ],\n            ],\n            'Email' =\u003e [\n                'email' =\u003e \"test@gmail.com\",\n            ],\n        ],\n        [\n            0 =\u003e [\n                'object' =\u003e 'block',\n                'type' =\u003e 'heading_2',\n                'heading_2' =\u003e [\n                    'text' =\u003e [\n                        0 =\u003e [\n                            'type' =\u003e 'text',\n                            'text' =\u003e [\n                                'content' =\u003e 'Lacinato kale',\n                            ],\n                        ],\n                    ],\n                ],\n            ],\n            1 =\u003e [\n                'object' =\u003e 'block',\n                'type' =\u003e 'paragraph',\n                'paragraph' =\u003e [\n                    'text' =\u003e [\n                        0 =\u003e [\n                            'type' =\u003e 'text',\n                            'text' =\u003e [\n                                'content' =\u003e 'Lacinato kale is a variety of kale with a long tradition in Italian cuisine, especially that of Tuscany. It is also known as Tuscan kale, Italian kale, dinosaur kale, kale, flat back kale, palm tree kale, or black Tuscan palm.',\n                                'link' =\u003e [\n                                    'url' =\u003e 'https://en.wikipedia.org/wiki/Lacinato_kale',\n                                ],\n                            ],\n                        ],\n                    ],\n                ],\n            ],\n        ]\n    );\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n-   [elsayed85](https://github.com/elsayed85)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fnotion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsayed85%2Fnotion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fnotion/lists"}