Notion API
Set up API access for reading and writing Notion pages, databases, and blocks.
getapi notion
Prerequisites
- A Notion account
- A Notion workspace where you have owner access
Credentials
| Variable | Description | Sensitive |
|---|---|---|
NOTION_API_KEY |
Internal integration token (starts with ntn_ or secret_) | Secret |
Setup Steps
- 1 Info
- 2 Open URL
- 3 Choice
- 4 Info
- 5 Confirm
- 6 Info
- 7 Input
- 10 Validate
Things to Know
- Integrations can ONLY access pages and databases explicitly shared with them. This is the most common source of 'not found' errors.
- When you share a parent page, all child pages are also accessible. You don't need to share each one individually.
- Notion API has a rate limit of 3 requests per second. Implement retry logic with exponential backoff.
- The Notion API requires a 'Notion-Version' header (e.g., '2022-06-28'). Most Notion client libraries handle this automatically.
- Internal integration tokens do not expire, but they can be revoked from the integrations page.
- If using the API directly (not a client library), you must include both 'Authorization: Bearer <token>' and 'Notion-Version: 2022-06-28' headers.