Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search returns no result #583

Open
sagan opened this issue Nov 12, 2024 · 0 comments
Open

Search returns no result #583

sagan opened this issue Nov 12, 2024 · 0 comments

Comments

@sagan
Copy link

sagan commented Nov 12, 2024

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"}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant