7

I'd like to be able to export the history from chrome so I can keep track of things like, for example, how many wikipedia articles I've looked at in the last week - all I'm really looking for is a url and a timestamp (I'm on a mac, if it turns out you can do this from the command line)

Where would I start? Would be great if it was the sort of thing that I could run as a cronjob...

2

4 Answers 4

10

Close Chrome, then enter the following in your command line (the exact paths will vary, the following are for Mac OS X):

/usr/bin/sqlite3 ~/Library/Application\ Support/Google/Chrome/Default/History > history.log <<EOF
select * from urls;
EOF

The history will then be in a file called history.log in your home directory (or any directory you switched to in Terminal)

Or for a user-friendly alternative, I recommend the History Trends Unlimited extension mentioned in the answer below.

3
  • Or copy the History db file to elsewhere in the filesystem and do the sqlite analysis w/o having to quit Chrome. Commented Jun 29, 2012 at 13:44
  • deleting the forward slash after 'Application' in the code provided at least a working filepath in the finder, i guess the / is a typo?
    – Sibe Jan
    Commented Mar 8, 2017 at 20:06
  • @SibeJan, nope, in Terminal you have to put \s before space in filenames :)
    – tog22
    Commented Oct 6, 2020 at 16:06
4

Also take a look at the History Trends Unlimited extension (full disclosure: I'm the developer). It does some of the analysis for you, but also has the option to export your history so you can do your own.

3
  • interesting, but when downloading the history, i'll get an alphabetical list of sites... or is something likte this "U1483029737222.5261" a time-stamp?
    – Sibe Jan
    Commented Mar 8, 2017 at 15:54
  • Yes, that is a timestamp (the numbers after the "U" are milliseconds since the Unix epoch). At the bottom of the Trends page is an "Export Raw Data" button; that will generate a file with a human-readable timestamp.
    – randy
    Commented Mar 9, 2017 at 16:55
  • Great, @randy! You fixed my problem. Thanks!
    – Sibe Jan
    Commented Mar 12, 2017 at 19:57
2

I just created a Chrome extension that exports your Chrome history in csv and json called Export History, and it works on mac (and linux and windows).

2
0

I have the same question, and came half-way: in the Finder, type shift-command-g (go to folder...) and fill in ~/Library/Application Support/Google/Chrome/Default/History. Now you've found the history sglite. Copy this file elsewhere or quit Chrome and open this file in e.g. DB Browser for SQLite But how to interpret the data, and find/make a simple list of URL's + timestamps... no idea!

update: found it. see comments above.

1
  • please improve your answer by including the information in the comments.
    – xypha
    Commented Mar 22, 2017 at 7:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .