Join us for our Developer Platform Hackathon, May 16-17. Apply now →
import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.dataSources.retrieve({
data_source_id: "d9824bdc-8445-4327-be8b-5b47500af6ce"
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {}
}import { Client } from "@notionhq/client"
const notion = new Client({ auth: process.env.NOTION_API_KEY })
const response = await notion.dataSources.retrieve({
data_source_id: "d9824bdc-8445-4327-be8b-5b47500af6ce"
}){
"object": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"properties": {}
}Retrieves a data source object — information that describes the structure and columns of a data source — for a provided data source ID. The response adheres to any limits to a connection’s capabilities and the permissions of theDocumentation Index
Fetch the complete documentation index at: https://developers.notion.com/llms.txt
Use this file to discover all available pages before exploring further.
parent database.
To fetch data source rows (i.e. the child pages of a data source) rather than columns, use the Query a data source endpoint.

data_sources for that database. There is often only one data source, but when there are multiple, you may have the ID or name of the one you want to retrieve in mind (or you can retrieve each of them). Use that data source ID with this endpoint to get its properties.
To get a data source ID from the Notion app directly, the settings menu for a database includes a “Copy data source ID” button under “Manage data sources”:

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
The API version to use for this request. The latest version is 2026-03-11.
2026-03-11 ID of a Notion data source.