notion-search-retrieve

Featured

Search Notion workspaces and retrieve pages, databases, and block content using the Notion API. Use when querying databases with filters, searching across a workspace, paginating large result sets, or extracting page content. Trigger with phrases like "notion search", "query notion database", "notion retrieve page", "notion pagination", "notion filter", "notion blocks", "notion get content".

AI & Automation 2,249 stars 312 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Notion Search & Data Retrieval ## Overview Search across a Notion workspace, query databases with compound filters, retrieve individual pages, and extract nested block content. Covers the full read path: workspace-level search, database queries with filter/sort/pagination, page retrieval, and recursive block tree traversal. ## Prerequisites - `@notionhq/client` installed (`npm install @notionhq/client`) - Notion integration token with read access to target pages/databases - Integration added to target pages via the Share menu in Notion - Completed `notion-install-auth` setup ## Instructions ### Step 1: Search the Workspace Call `notion.search()` to find pages and databases. The integration only sees content explicitly shared with it. ```typescript import { Client } from '@notionhq/client'; const notion = new Client({ auth: process.env.NOTION_TOKEN }); // Search for pages matching a query const searchResults = await notion.search({ query: 'meeting notes', filter: { property: 'object', value: 'page', // 'page' or 'database' }, sort: { direction: 'descending', timestamp: 'last_edited_time', }, page_size: 20, }); for (const result of searchResults.results) { if (result.object === 'page' && 'properties' in result) { const titleProp = Object.values(result.properties) .find(p => p.type === 'title'); const title = titleProp?.type === 'title' ? titleProp.title.map(t => t.plain_text).join('') : 'Untitled'; ...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Related Skills