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
- 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.
- Create an internal integration at notion.so/profile/integrations, copy its secret and share the pages or databases you need with it (… menu, Connections).
- Fill in the environment, pick it in the environment menu and send the first request.
Environment variables
| Variable | What it is |
|---|---|
notionTokensecret | Internal integration secret. |
databaseId | The 32-character id in the database URL. |
pageId | Filled by "Create a page in a database"; or any page id. |
Requests
Search and pages
- POSTSearch
/searchPages and databases shared with the integration.
- GETRetrieve a page
/pages/{{pageId}}Page properties.
- GETRead page content
/blocks/{{pageId}}/childrenThe blocks of a page.
- PATCHAppend a paragraph
/blocks/{{pageId}}/childrenAdds a paragraph at the end of the page.
Databases
- POSTQuery a database
/databases/{{databaseId}}/queryRows of the database; add filter and sorts as needed.
- POSTCreate a page in a database
/pagesAdds a row; the title property is usually called Name.