My original problem was that I couldn't find the database ID for an INLINE Notion database.
ANSWER: As shown in @salim-khatib's answer in the text above.
Although I now had the database ID I still couldn't access the database (object not found). So I decided to use the Notion Search API. With this API I still couldn't find the database object I was looking for.
After a lot of searching I finally figured out what I had done wrong:
According to the Notion documentation on the Search API: Notion Search API, it is very clear that the Search API only returns ORIGINAL database objects and not LINKED database objects as these would be duplicates. This was my problem, I had linked to a database object that was on a page that I had not shared with my integration. Once I did the Share the database could be found without a problem.