Notion Python SDK

2.7.0 · active · verified Tue Mar 17

Official Python client for the Notion API, maintained by the community (ramnes/notion-sdk-py). Current version is 2.7.0 (Oct 2025). Notion API itself is versioned separately — the SDK version and the API version are two different things. Multiple breaking API versions have shipped in 2024-2026.

Warnings

Install

Imports

Quickstart

Minimal Notion read using notion-client 2.7.x.

import os
from notion_client import Client

notion = Client(auth=os.environ['NOTION_TOKEN'])

# query a database
results = notion.databases.query(
    database_id='YOUR_DATABASE_ID'
)

# retrieve a page
page = notion.pages.retrieve(page_id='YOUR_PAGE_ID')
print(page['properties'])

view raw JSON →