6

Is there a more efficient way to get the list of all databases in notion? I have tried using the https://api.notion.com/v1/databases endpoint but it's deprecated now. Another option is the /search endpoint but it is returning all the records within the database as well.

Can someone provide a better way to list all databases which are accessed by an integration?

1 Answers1

3

you need to filter for databases in the /search endpoint to only get databases back. In Python your payload would look like this:

payload = {
    'filter': {
        'value': 'database',
        'property': 'object'
    }
}
Jonas Scholz
  • 485
  • 5
  • 15