Places:History API
Most information from the Browser_History and bookmarks system comes from executing queries on the history system (nsINavHistory.executeQuery/executeQueries). This will give you a nsINavHistoryResult object which will contain a tree structure of the results. The definitions of these structures is in browser/components/places/public/nsINavHistoryService.idl
Executing a query
There are two parts of a query: a list of one or more nsINavHistoryQuery objects, and an nsINavHistoryQueryOptions object. You first need to fill out these structures with the parameters you want. Use nsINavHistoryService.getNewQuery and nsINavHistoryService.getNewQueryOptions to retrieve empty objects. These objects typically have empty values for each possible field, so using them in their initial state will give you all of history in a flat list.