I understand that the chrome.bookmarks API (documented at http://goo.gl/tIb6V6) is meant to be used to develop Chrome Extensions (to be used, of course, within the Chrome browser) that access/manipulate my Chrome Bookmarks. I have even used that API to write my own such extension. However, I am looking for a way to develop an app that does the same thing, but is runnable independently from the Chrome Browser, e.g. as a native app, written in one's favorite language (Python, Java, etc.), that would run on one's favorite OS (Mac OS X, Linux, etc.). To that end, is there an API (e.g. a RESTful API, but I'm not picky) that enables me to access/manipulate my Chrome Bookmarks, which I would then access from outside of the Chrome Browser?
Asked
Active
Viewed 1,639 times
4
-
No. But you can load the extension that uses the `chrome.bookmarks` API, and either use a server backend (in your native app) or [native messaging](https://developer.chrome.com/extensions/messaging#native-messaging) to communicate with your app. If you want read-only access, using sqlite to read the bookmark database would also work. – Rob W Nov 04 '14 at 15:51
-
1Thanks for your reply Rob. The "native messaging" bit was particularly interesting. I did not know it existed. BTW, I came across an iOS native app (http://goo.gl/bKK64) that seems to do the read-only access that you described (list/search bookmarks in that app), and in that case through a Google Drive intermediary file that holds a periodically refreshed copy of the user's Chrome Bookmarks. The periodical refresh happens through a companion intermediary Chrome extension that the user is instructed to install in a desktop version of Chrome that she uses. – rinaus Nov 07 '14 at 12:06
-
1Chrome internally stores the bookmarks in a sqlite database. If you use that database, then you can only read, not write (or db corruption ensues). However, when you use the `chrome.bookmarks` API via an auxilary extension, then you can also modify bookmarks if you wish. Technically, it is be possible for that iOS app to also implement bookmark write access using the same infrastructure. – Rob W Nov 07 '14 at 12:10
-
I'm not sure what you mean by "use the chrome.bookmarks API via an auxiliary extension". Is this something like what you described above, employing "server backend or native messaging"? If not, I would appreciate any references to material that would clue me in on how to implement such an "auxiliary entension". For the sake of focusing the discussion, let's assume that we are talking about implementing such a native app on iOS, where Chrome extensions are not available, as far as I know, and hence having a native app there communicating with it would not be in the cards. – rinaus Nov 07 '14 at 12:33
-
By auxiliary extension, I mean that the extension is only offerred to support another application (the iOS app in your example). The extension collects data via the bookmarks API, and sends it to your app via some transport channel (native messaging, server backend, copy-paste, QR-codes, pigeons, ...). – Rob W Nov 07 '14 at 12:36
-
I liked the "QR-codes & pigeons" bit! Thank you for the humor, we all need it :-) So, in the iOS native app discussion focus, since the Chrome extension stuff does not exist there (or am I wrong about this?), the suggestion is to have the "auxiliary extension" run, logged into the user's Google account, on a remote host where the Chrome extension stuff exists and have requests/replies going back and forth (via pigeons or whatever :-) between it and such an iOS native app (say running on the user's iPhone)? BTW Rob, Thanks for the instructive discussion here. I'm learning a lot from it. – rinaus Nov 07 '14 at 13:07
-
Exactly as you stated. Perhaps there is also a Google API to access bookmarks after authentication (I don't know, look it up if you want to know whether it exists). – Rob W Nov 07 '14 at 13:18
1 Answers
1
Another option is to load the Chrome Bookmarks file directly from:
~/Library/Application Support/Google/Chrome/Default/Bookmarks
It's a plain json file, so just load it, construct an Object and do whatever you can imagine.
We are pretty like it so far~

rankun203
- 21
- 1
- 6