NotionX / NotionX/react-notion-x
Search returns no result
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Description
It seems that Notion search API now requires a "includePublicPagesWithoutExplicitAccess": true field present in filter object of search request payload. Without that field, search will return an empty result set.
Notion Test Page ID
1197d259b2558072b6e7d0be8e03a215
Without the field:
curl 'https://www.notion.so/api/v3/search' \
-H 'content-type: application/json' \
--data '{"type":"BlocksInAncestor","query":"test","ancestorId":"1197d259-b255-8072-b6e7-d0be8e03a215","filters":{"isDeletedOnly":false,"excludeTemplates":false,"navigableBlockContentOnly":false,"requireEditPermissions":false,"ancestors":[],"createdBy":[],"editedBy":[],"lastEditedTime":{},"createdTime":{},"inTeams":[] },"sort":{"field":"relevance"},"limit":20,"source":"quick_find_input_change"}'
The returned results is empty.
With the field:
curl 'https://www.notion.so/api/v3/search' \
-H 'content-type: application/json' \
--data '{"type":"BlocksInAncestor","query":"test","ancestorId":"1197d259-b255-8072-b6e7-d0be8e03a215","filters":{"isDeletedOnly":false,"excludeTemplates":false,"navigableBlockContentOnly":false,"requireEditPermissions":false,"includePublicPagesWithoutExplicitAccess":true,"ancestors":[],"createdBy":[],"editedBy":[],"lastEditedTime":{},"createdTime":{},"inTeams":[] },"sort":{"field":"relevance"},"limit":20,"source":"quick_find_input_change"}'
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating where the Notion search request and its filters are constructed in the TypeScript code. Reproduce the issue with the provided curl payload and test page ID, then verify that searches return results when the required filter field is included.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nextjs, react, typescript
- Domain
- api, backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100