google chrome extension for manipulating browsing history

Any history function available to your extension are listed here: http://developer.chrome.com/extensions/history.html

If they aren't you won't be able to access them. There isn't an undocumented history API for chrome extensions.

You'd probably want to do something like this:

var siteToSearch = 'facebook.com';
chrome.history.search({text: siteToSearch, callback: function(results) {
    //Iterate through the `results` array of `HistoryItem` objects
    //Look for lowest value of `lastVisitTime` OR call `chrome.history.getVisits` with
    //`results[i].url` and then check the returned `VisitItem` for the `visitTime` property
}})

You might want to use a regular expression for matching the URL of the site you are searching for with the result in the browsers history.


It seems that Google moved the documentation at this link

and the snippet included in the old answer can be used by doing:

const siteToSearch = 'facebook.com';
chrome.history.search({text: siteToSearch}, callback: function(results) {
    //Iterate through the `results` array of `HistoryItem` objects
    //Look for lowest value of `lastVisitTime` OR call `chrome.history.getVisits` with
    //`results[i].url` and then check the returned `VisitItem` for the `visitTime` property
}})