According to https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/bookmarks/search i can search bookmark tree nodes with a either a string or a query. According to the description this query can be a url or a title. But at least searching by title does not return any search results.
For example, if there is a folder inside the bookmark tree nodes with the title “test” and i initiate a search with
var searching = browser.bookmarks.search({title: "test"});
The result is empty. However if i use
var searching = browser.bookmarks.search({url: "https://someurl.com"});
this works as expected and i get the as return the needed bookmark node with all details.
In my opinion this is a huge bug which needs to be fixed, because there is no other way to find folders, since folders didn’t have a url to search for.