Overview
Retrieves a database object by its ID. Returns information about the database including its title, description, parent, data sources, and metadata.Parameters
The ID of the database to retrieve. Can be a raw ID or a Notion database URL.
Optional authentication token to override the client’s default token for this request.
Response
Returns aDatabaseObjectResponse or PartialDatabaseObjectResponse.
Always
database.The ID of the database.
The title of the database as an array of rich text objects.
The description of the database as an array of rich text objects.
The parent of the database. Can be a page, block, workspace, or another database.
Whether the database is displayed inline in the parent page.
Whether the database is in the trash.
Whether the database is locked from editing in the Notion app UI.
ISO 8601 timestamp when the database was created.
ISO 8601 timestamp when the database was last edited.
Array of data source references contained in this database. Each reference includes an ID and name.
The icon of the database, or
null if none is set.The cover image of the database, or
null if none is set.The URL of the database in Notion.
The public URL of the database if it is publicly accessible, otherwise
null.Examples
Retrieve a database
Retrieve and check database properties
Extract database ID from URL
Access data sources
To query the contents of a database, use
notion.dataSources.query() with one of the data source IDs from the data_sources array.