[Solved!] How to Get Notion Database Id

Why you need to get a notion database ID

In order to access and manipulate the data stored in your Notion account, you need to get a Notion Database ID. To do this, log in to your Notion account and click the gear icon in the top right corner. Then select the Database ID option and copy the string of numbers.

This is what you will need to use with the Notion API, which will allow you to access and manipulate your data. Without the Database ID, you will not be able to use the Notion API.

How to get notion database id in detail Steps

  1. First, find the page you wish to get the Database ID for in Notion.
  2. Once you have the page, look at the URL for the page. The Database ID will be the part of the URL after your workspace name and before the question mark (?).
  3. Copy the ID and paste it somewhere you can easily find later.
  4. If you are creating an integration for others, you can use the Search endpoint to get all databases your integration has access to.
  5. Once you have the Database ID, you must add your integration to the database. To do this, click the 3 dots, under Connections, there is an Add connections button.
https://www.notion.so/<long_hash_1>?v=<long_hash_2>  

If your URL looks like below, then <long_hash_1> is the database ID and <long_hash_2> is the view ID. We’ll need to find our database ID to connect to the database we’ve created. Head to your workspace and copy the alphanumeric characters in your URL between notion.so/ and ?.

Here is a official tutorial form Notion website:

Where can I find my database's ID?

Here's a quick procedure to find the database ID for a specific database in Notion:

Open the database as a full page in Notion. Use the Share menu to Copy link. Now paste the link in your text editor so you can take a closer look. The URL uses the following format:

https://www.notion.so/{workspace_name}/{database_id}?v={view_id}

Find the part that corresponds to {database_id} in the URL you pasted. It is a 36 character long string. This value is your database ID.
Note that when you receive the database ID from the API, e.g. the search endpoint, it will contain hyphens in the UUIDv4 format. You may use either the hyphenated or un-hyphenated ID when calling the API.

How do I get a notion inline database ID?

What is a notion inline database?

A Notion Inline Database is a special type of database that is embedded within a Notion page. Unlike a regular database, an Inline Database allows you to create and view entries on the same page, without having to switch between different views. As a result, it is much easier and faster to view, edit, and manage data in an Inline Database.

What problems do you encounter if you use the notion inline database ID?

Using the Notion Inline Database ID can lead to some limitations when using the Notion API, due to the page URL structure not including the database ID. This means that the database ID won't be visible for you in the page URL structure. But don't worry, just follow the following steps.

Specific steps on how to get a notion inline database ID

To get a Notion Inline Database ID, follow these steps:

  1. Enter the page that contains the Inline Database.
  2. Check the title of the Inline Database and click the "Expand to Full screen" icon, which looks like a two-way arrow.
  3. Check the URL structure. It will look like https://www.notion.so/example123?v=example123
  4. Copy the alphanumeric characters in the URL between notion.so/ and ?. This is your database ID.

Real life example of how notion database id can be used with the notion api

Using the Notion API, you can access the Database ID and use it to perform operations on the database. For example, you can use the Database ID to query a list of specific database entries based on properties like name, description, etc.

You can also use the Database ID to get a list of all entries in a database, as well as add, update, and delete entries. Additionally, you can use the Database ID to create and manage custom views on databases.

Let's try to add a page to the example database above. The endpoint has two required parameters: parent and properties.

When adding a page to a database, the parent parameter must be a database parent. We can build this object for the example database. Your code should looks like this:

{
  "type": "database_id",
  "database_id": "2f26ee68-df30-4251-aad4-8ddc420cba3d"
}

FAQ

Do you need a notion membership to use the notion api?

No, you do not need a Notion membership to use the Notion API. All you need is a valid API key and the appropriate permissions to access data in Notion.

What can we do with the notion database id?

With the Notion Database ID, you can use the Notion API to perform operations on the database. This includes querying a list of specific database entries based on properties like name, description, etc., getting a list of all entries in a database, adding, updating, and deleting entries, and creating and managing custom views on databases.

What third party integration platforms use Notion API?

Several third-party integration platforms use the Notion API, including Zapier, Integromat, and Segment. These platforms allow you to connect Notion with other apps and services and automate various tasks, such as creating or updating database entries, sending notifications, and more.

How do you reference databases in Notion?

In Notion, you can reference databases by using the Database Block. This block allows you to embed a database from a Table, Board, or Calendar into your document. Additionally, you can reference databases by using internal links. This allows you to link to a specific database entry or view within a database.

Mentioned Resources

  1. Easily Find a Notion Database ID - YouTube
  2. Where to find Database Id for my database in Notion? - Stack Overflow
  3. Working with databases
  4. Connect your tools to Notion with the API