API and command to find bookmarks location

view story

http://askubuntu.com – I would like to know if there exists an API and also a command to find the bookmarks file name and path in ubuntu. My application writes to the bookmarks file to add some short cuts. Before ubuntu 11.X the bookmarks file used to be in "/home/myname/.gtk-bookmarks", but post ubuntu 13.0X it is inside "/home/myname/.config/gtk-3.0/bookmarks". If I have to support my application for all versions of ubuntu, then I must not rely on hard coding the path of bookmarks file name/path. Is there an, API and command to find out the path and name of a bookmarks file? (I want a command also because I want (HowTos)