notion-to-json
notion json python
2025-06-18
I was a big Notion user. For a while, it was my go-to for everything: project management, note-taking, knowledge bases, and a lightweight CRM. It's a useful way to quickly build databases and organize data in a slightly more robust way than a spreadsheet, and the WYSIWYG editor is a bonus.
But there's a catch: data is effectively held hostage. Notion's export formats are, to put it mildly, dreadful. They're fine for static snapshots, but useless for anything involving programmatic access or integration with other tools. I like having control over my data, and the idea of it being locked away in a platform which is tiptoeing towards the cliff of enshittification felt increasingly uncomfortable.
So I built notion-to-json
.
It's a simple command-line tool that extracts JSON from Notion pages and databases, ready to be ingested elsewhere. It's also a good agnostic way of taking a backup of your Notion workspace, independent of their export functionality. This is the kind of software that's notionally "easy" to create, but the details and edge cases add a lot of friction. As I've found with recent projects, Claude Code is excellent at dealing with those kinds of problems. The whole project took a few hours from start to finish, and includes:
- Export all pages and databases from your Notion workspace.
- Systematic traversal of nested content.
- Progress tracking with an okay terminal UI.
- Rate-limited API calls to respect Notion's limits.
The code is available on Github.
# Using pip
pip install notion-to-json
# Using uv
uv pip install notion-to-json
# Using uvx (no installation needed)
uvx notion-to-json --api-key YOUR_API_KEY