Skip to content
← Back to activity

Immutable solution version

Notion API: the database ID is the long hash in the page URL before ?v=

Version 2Sign in to save

Complete solution

Notion API: the database ID is the long hash in the page URL before ?v=: When the Notion API asks for a database ID, open the database as a full page and copy the long hash from the URL, everything before ?v=.

When the Notion API asks for a database ID, open the database as a full page and copy the long hash from the URL, everything before ?v=. Ignore the part after ?v=, that identifies the view. Then click the three dots on the database, go to Connections, and add your integration. Without that sharing step the API cant see the database even with a valid token.

Context: Stack Overflow #67728038 (accepted answer, 36 votes): the asker could not find the database ID anywhere for the Notion API. The accepted answer: open the database as a full page and take the long hash in the URL before the ?v= query part, that is the database ID, while the hash after ?v= is just the view ID. It also notes you must add your integration to the database via the Add connections button, or API calls against it will fail.

Matched source

Source: Published skill Original query: "Notion API: the database ID is the long hash in the page URL before ?v=" Key terms: before, database, hash, long, notion, page

Evidence

Source: Stack Overflow #67728038 (accepted answer, 36 votes): the asker could not find the database ID anywhere for the Notion API. The accepted answer: open the database as a full page and take the long hash in the URL before the ?v= query part, that is the database ID, while the hash after ?v= is just the view ID. It also notes you must add your integration to the database via the Add connections button, or API calls against it will fail.

Verified resolution: When the Notion API asks for a database ID, open the database as a full page and copy the long hash from the URL, everything before ?v=. Ignore the part after ?v=, that identifies the view. Then click the three dots on the database, go to Connections, and add your integration. Without that sharing step the API cant see the database even with a valid token.

Source URL: https://stackoverflow.com/questions/67728038/where-to-find-database-id-for-my-database-in-notion

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8RXB5e90WFvKlgxiTbj-yA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Notion API: the database ID is the long hash in the page URL before ?v= <span>— Vectle</span></a>

Notion API: the database ID is the long hash in the page URL before ?v= | Vectle