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

@relayfile/adapter-notion

v0.3.5

Published

Notion adapter for relayfile — maps Notion databases, pages, blocks, and comments to relayfile VFS paths

Readme

@relayfile/adapter-notion

Relayfile adapter for Notion. It ingests databases, pages, blocks, markdown content, and comments into the relayfile VFS and supports writeback for page properties, markdown content, comments, and page creation inside databases.

Quick Start

npm install
npm test
npm run build
import { RelayFileClient } from '@relayfile/sdk';
import { NotionAdapter } from '@relayfile/adapter-notion';

const relay = new RelayFileClient({
  baseUrl: process.env.RELAYFILE_BASE_URL ?? 'https://api.relayfile.com',
  token: process.env.RELAYFILE_TOKEN ?? '',
});

const adapter = new NotionAdapter(relay, undefined, {
  token: process.env.NOTION_TOKEN ?? '',
  databaseIds: ['database-id'],
  pageIds: ['page-id'],
});

await adapter.bulkIngest('workspace-id');

Create a Notion internal integration in the Notion developer dashboard, grant it access to the target databases/pages, and use the integration token as NOTION_TOKEN.

VFS Layout

/notion/databases/{database_id}/metadata.json
/notion/databases/{database_id}/pages/{page_id}.json
/notion/databases/{database_id}/pages/{page_id}/properties.json
/notion/databases/{database_id}/pages/{page_id}/content.md
/notion/databases/{database_id}/pages/{page_id}/blocks/{block_id}.json
/notion/databases/{database_id}/pages/{page_id}/comments.json
/notion/pages/{page_id}.json
/notion/pages/{page_id}/properties.json
/notion/pages/{page_id}/content.md
/notion/pages/{page_id}/comments.json

Supported Property Types

Writeable property serializers are included for:

  • title
  • rich_text
  • number
  • select
  • multi_select
  • status
  • date
  • people
  • files
  • checkbox
  • url
  • email
  • phone_number
  • relation

Read-only Notion properties such as formula, rollup, created_time, and last_edited_time are preserved in ingested JSON but rejected during writeback.

Markdown Content Support

The adapter uses the Notion markdown content endpoints when enabled and falls back to rendering block trees when those endpoints are unavailable. Notion’s current markdown endpoints are GET /v1/pages/{page_id}/markdown and PATCH /v1/pages/{page_id}/markdown, and the adapter defaults those calls to Notion-Version: 2026-03-11.

Classic database/page/block APIs still default to Notion-Version: 2022-06-28 because that version preserves the legacy database schema and POST /v1/databases/{id}/query behavior this package targets. Override either version through apiVersion and markdownApiVersion if your workspace needs a different combination.

Poll-Based Sync

Notion webhooks are not broadly available across all plans, so the adapter includes poll-based sync helpers:

  • Database pages are queried with last_edited_time > cursor.
  • Standalone pages are scanned through POST /v1/search, sorted by last_edited_time.
  • The sync cursor is an ISO timestamp watermark.

Writeback

  • Editing *.json page files maps to PATCH /v1/pages/{page_id}.
  • Editing properties.json next to a page maps to PATCH /v1/pages/{page_id}.
  • Editing content.md maps to PATCH /v1/pages/{page_id}/markdown.
  • Editing comments.json creates a new comment with POST /v1/comments.
  • Writing to /notion/databases/{database_id}/pages creates a new page with POST /v1/pages.