Notion Api Intro

How to use Notion Api

Easy Introduction to use Notion Api

Start Integration (to get a token)

  1. https://developers.notion.com/ (click Upper right corner of the web)
  2. Start a new integration.
  3. Get your token~

Link the database/note with Integration

Go to the settings of your database/note and connect it with your Integration.

See what you will get (Debug Api)

By Postman or other API tools, you can get the results in standard style (json).

  1. Please set the headers like below:
    headers: {
      "Authorization": {your_token_there},
      "Notion-Version": "2022-06-28",
    },
  2. Send your api request

    Find examples (to retrieve a database) here: https://developers.notion.com/reference/retrieve-a-database

    curl 'https://api.notion.com/v1/databases/[you_token_here]' \
      -H 'Authorization: Bearer '"$NOTION_API_KEY"'' \
      -H 'Notion-Version: 2022-06-28'

    If you use API tools, just input the address above, since you have define the headers.

  3. Get the results

    You can get the results in json type. The description of it can be found here: https://developers.notion.com/reference/database


Click here to connect me at Linkedin~