notion-api
SafeNotes & PKM
Notion API CLI: search, query databases, create pages.
SKILL.md
# notion-api (generic)
This skill provides a small Node-based CLI for the Notion API. It’s designed to be shareable: **no hard-coded database IDs and no secrets in the repo**.
## Auth
Provide a Notion integration token via either:
- `NOTION_KEY` env var, or
- `~/.config/notion/api_key` (first line)
Also make sure the target pages/databases are shared with your integration in Notion.
## Commands (CLI)
Run via:
- `node scripts/notion-api.mjs <command> ...`
### Search
```bash
node scripts/notion-api.mjs search "query" --page-size 10
```
### Query a data source (database query)
```bash
node scripts/notion-api.mjs query --data-source-id <DATA_SOURCE_ID> --page-size 10
# optionally pass raw JSON body:
node scripts/notion-api.mjs query --data-source-id <ID> --body '{"filter": {...}, "sorts": [...], "page_size": 10}'
```
### Create a page in a database
```bash
node scripts/notion-api.mjs create-page --database-id <DATABASE_ID> --title "My item" --title-prop Name
```
## Output
All commands print JSON to stdout.
## Notes
- Notion API version header defaults to `2025-09-03` (override with `NOTION_VERSION`).
- Rate limits apply; prefer `page_size` and minimal calls.
More in Notes & PKM
apple-mail
SafeApple Mail.app integration for macOS. Read inbox, search emails, send emails, reply.
apple-notes
SafeManage Apple Notes via the `memo` CLI on macOS (create, view, edit, delete, search, move.
bear-notes
SafeCreate, search, and manage Bear notes via grizzly CLI.
better-notion
SafeFull CRUD for Notion pages, databases, and blocks. Create, read, update, delete, search, and query.