1

I am new to notion API and what to get the list of databases using search API.

When I execute

curl -X POST 'https://api.notion.com/v1/search'   -H 'Authorization: Bearer '"$NOTION_API_KEY"''   -H 'Content-Type: application/json'   -H 'Notion-Version: 2022-06-28'   --data '{"filter":{"value":"database","property":"object"},"sort":{"direction":"ascending","timestamp":"last_edited_time"}}'

It returns empty results

{
  "object": "list",
  "results": [],
  "next_cursor": null,
  "has_more": false,
  "type": "page_or_database",
  "page_or_database": {}
}

But there is database in my workspace

enter image description here

tbhaxor
  • 1,659
  • 2
  • 13
  • 43

0 Answers0