Databases-Endpoint Examples

Fetch database information

This endpoint provides all structural information about a database.

Get properties, title, icon, cover image, etc.

# Returns a single database
$database = \Notion::databases()

# Get database title

# Get property-information of the database

# Get all keys of the properties (property-names)

# Get database icon and icon-type (emoji, file, external)

# Get database cover and cover-type (file, external)

# Get database url (within Notion)

Fetch all Databases

# This endpoint is not recommended by Notion anymore but is working nevertheless. 
# Use the search endpoint instead.

# Returns all databases of the workspace that were explicitly granted access.

{warning} Watch out:
This endpoint is no longer recommended by Notion and can be removed anytime.
Use ✨ Search instead.