GithubHelp home page GithubHelp logo

therohitdas / notion-page-to-html-api Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asnunes/notion-page-to-html-api

0.0 1.0 0.0 69 KB

Vercel API wrapper to notion-page-to-html library

Home Page: notion-page-to-html-api.vercel.app

License: MIT License

JavaScript 11.19% TypeScript 88.81%

notion-page-to-html-api's Introduction

Cover image

notion-page-to-html-api

Vercel API wrapper to notion-page-to-html library. It converts public notion pages to html.

Supported features

Most of native Notion blocks are currently supported:

  • Headings
  • Text With Decorations
  • Quote
  • Image
  • YouTube Videos
  • Code
  • Math Equations
  • To-do
  • Checkbox
  • Bulleted Lists
  • Numbered Lists
  • Toggle Lists
  • Divider
  • Callout
  • Nested blocks

Embeds and tables are not supported yet.

Basic Usage

GET /html

Returns full Notion page as html.

It accepts one single query param: id. It's the Notion Page uuid at the end of page's link like example bellow

https://www.notion.so/asnunes/Simple-Page-Text-2-4d64bbc0634d4758befa85c5a3a6c22f

Page must be public when request is sent. It can be private afterward. All images dependencies are converted to base64 to prevent further Notion API calls.

API call example:

https://notion-page-to-html-api.vercel.app/html?id=4d64bbc0634d4758befa85c5a3a6c22f

GET /cover

Returns Notion page cover image if it exists. If no cover is found, it returns 404.

It accepts one single query param: id. It's exactly like /html route.

API call example:

https://notion-page-to-html-api.vercel.app/cover?id=4d64bbc0634d4758befa85c5a3a6c22f

GET /icon

Returns Notion page icon if it exists. It can be an image (custom icon) or plain/text (emoji). If no icon is found, it returns 404.

It accepts one single query param: id. It's exactly like /html route.

API call example:

https://notion-page-to-html-api.vercel.app/icon?id=4d64bbc0634d4758befa85c5a3a6c22f

GET /title

Returns Notion page title as plain text.

It accepts one single query param: id. It's exactly like /html route.

API call example:

https://notion-page-to-html-api.vercel.app/title?id=4d64bbc0634d4758befa85c5a3a6c22f

This project was deployed on Vercel. Feel free to host it by yourself if it pleases you.

notion-page-to-html-api's People

Contributors

asnunes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.