npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

notion-puller

v0.2.0

Published

Pull Notion pages and databases to local markdown and CSV files

Downloads

12

Readme

notion-pull

Pull Notion pages and databases to local markdown and CSV files.

Setup

1. Create a Notion Integration

  1. Go to https://www.notion.so/my-integrations
  2. Click New integration
  3. Give it a name (e.g. "notion-pull")
  4. Select the workspace you want to access
  5. Copy the Internal Integration Secret (starts with ntn_)

2. Share Pages/Databases with the Integration

For each page or database you want to pull:

  1. Open the page or database in Notion
  2. Click the ... menu in the top right
  3. Scroll to Connections and click Connect to
  4. Select your integration

3. Install

Requires Bun v1.0+.

# Clone and install
git clone <repo-url> && cd notion-pull
bun install

# Or install globally after building
bun run build
npm install -g .

Usage

Set your token as an environment variable (recommended):

export NOTION_TOKEN=ntn_xxxxx

Pull a Page

# By URL
bun run dev https://www.notion.so/My-Page-abc123def456

# By page ID
bun run dev abc123def456abc123def456abc123de

# By UUID
bun run dev abc123de-f456-abc1-23de-f456abc123de

Pull a Database

# By URL
bun run dev https://www.notion.so/workspace/abc123def456?v=...

# By database ID
bun run dev abc123def456abc123def456abc123de

Options

-t, --token <token>    Notion integration token (overrides NOTION_TOKEN)
-o, --output <dir>     Output directory (default: ./output)
--type <type>          Force type: "page" or "database" (auto-detected)
-d, --depth <number>   Max depth for following relations (default: 2)
-h, --help             Show help

Examples

# Pull to a specific directory
bun run dev --output ./docs https://notion.so/my-workspace/My-Page-abc123

# Pull a database with token flag
bun run dev --token ntn_xxxxx --type database abc123def456

# Limit relation depth
bun run dev --depth 1 https://notion.so/my-workspace/abc123

Output

Pages

Each page is saved as a markdown file with YAML frontmatter:

output/
  My Page Title.md
---
title: "My Page Title"
created: 2025-01-15T10:30:00.000Z
last_edited: 2025-02-01T14:22:00.000Z
---

# Heading

Page content here...

Databases

Each database gets a directory with a CSV index and markdown files for entries that have page content:

output/
  My Database/
    _index.csv
    Entry One.md
    Entry Two.md

Related databases (via relation properties) are pulled recursively with cycle detection.

Building

# Build distributable
bun run build

# Type check
bun run typecheck

License

MIT