Templates · Productivity

Notion API collection template

Search, read and create Notion pages and query databases.

What's inside

Search your Notion workspace, read a page and its blocks, query a database, create a page in it and append a paragraph.

6 requests in 2 folders · Base URL https://api.notion.com/v1 · Bearer token

Set it up

  1. Open Notion API in Requestarium (or in the app: Import, Start from a template) and import it. You get the collection and a "Notion API" environment.
  2. Create an internal integration at notion.so/profile/integrations, copy its secret and share the pages or databases you need with it (… menu, Connections).
  3. Fill in the environment, pick it in the environment menu and send the first request.

Environment variables

VariableWhat it is
notionTokensecretInternal integration secret.
databaseIdThe 32-character id in the database URL.
pageIdFilled by "Create a page in a database"; or any page id.

Requests

Search and pages

  • POST
    Search /search

    Pages and databases shared with the integration.

  • GET
    Retrieve a page /pages/{{pageId}}

    Page properties.

  • GET
    Read page content /blocks/{{pageId}}/children

    The blocks of a page.

  • PATCH
    Append a paragraph /blocks/{{pageId}}/children

    Adds a paragraph at the end of the page.

Databases

  • POST
    Query a database /databases/{{databaseId}}/query

    Rows of the database; add filter and sorts as needed.

  • POST
    Create a page in a database /pages

    Adds a row; the title property is usually called Name.