- Symptom
- object_not_found from notion.dataSources.query with an ID taken from the page URLdatabases.query flagged as deprecated after upgrading @notionhq/client to v5Query that worked on 2022-06-28 fails after moving to Notion-Version 2025-09-03
- Cause
- Since 2025-09-03 a database is a container that holds one or more data sources, and each data source has its own ID. The URL shows the database ID, while query and page creation now take the data source ID.
- Fix
- Retrieve the database once with Notion-Version 2025-09-03, read data_sources[].id, and use that ID for queries and page parents. In the app, database settings > Manage data sources > Copy data source ID gives the same value.
- Apply
const db = await notion.databases.retrieve({ database_id: DATABASE_ID }); const dataSourceId = db.data_sources[0].id; const res = await notion.dataSources.query({ data_source_id: dataSourceId });- Affected
- Notion-Version 2025-09-03 and later; @notionhq/client 5.0.0 and later
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders