A serverless wrapper for the private Notion API. It provides fast and easy access to your Notion content. Ideal to use Notion your CMS.
The API is designed to be hosted on lamdba@edge. You can test the api on hosted version of this project on notionedge.zoop.sh.You can also host it yourself. Lambda@Edge does not offer any free plan. Yet the cost of lambda is very nominal.
Use with caution. This is based on the private Notion API. We can not gurantee it will stay stable.
- 🍭 Easy to use – Receive Notion data with a single GET request
- 🗄 Table Access – Get structured data from tables & databases
- 🛫 CORS Friendly – Access your data where you need it
- ✨ Easy to Extend – Add your own routes as per your needs.
- Use it as a data source for blogs and documentation. Create a table with pages and additional metadata. Query the
/tablesendpoints every time you want to render a list of all pages.
Load page data
Returns all block data for a given page. For example, you can render this data with
Load data from table
Authentication for private pages
All public pages can be accessed without authorization. If you want to fetch private pages there are two options.
- You can set the
Authorization: Bearer <NOTION_TOKEN>header to authorize your requests.
Receiving the token
To obtain your token, login to Notion and open your DevTools and find your cookies. There should be a cookie called
token_v2, which is used for the authorization.
Deployment is done using serverless. Serverless yml exists in the project directory. You need use serverless profile to provide aws credentails / profile.
You can check out it's source GitHub.