I'm trying to get all the pages of my Notion workspace but the search method returns an empty response while there is pages on my personal workspace.
Code :
import { Client, LogLevel } from '@notionhq/client'
const notion = new Client({
auth: '<hidden>',
logLevel: LogLevel.DEBUG
})
const databasesQuery = await notion.search({})
console.log(databasesQuery)
Output
@notionhq/client info: request start { method: 'post', path: 'search' }
@notionhq/client info: request success { method: 'post', path: 'search' }
{ object: 'list', results: [], next_cursor: null, has_more: false }