如何检索我的 Google 搜索历史记录?
在 Google 网络历史记录界面中,我可以看到我多年来使用过的所有搜索查询,以及我针对特定查询访问的页面。有没有办法使用计算机程序检索此历史记录?我找不到可以执行此操作的 Google API。您知道有一种工具可以做到这一点,或者建议一种实现这一目标的方法吗?
In the Google Web History interface I can see all the search queries I have used over the years, and the pages I visited for a particular query. Is there a way I can retrieve this history using a computer program? I couldn't find a Google API that does it. Do you know of a tool that can do this, or suggest a way to achieve this?
上面接受的答案中的 RSS 提要不再存在。 Google 不提供允许您检索 Google 搜索的 API,但它确实允许您通过 谷歌搜索历史。此下载无法以编程方式执行,因为它将存档保存到用户的 Google 驱动器中。
一种可能的破解方法是使用浏览器自动化工具来抓取历史页面,例如 此存储库是的。修改此脚本将允许您获取最新的搜索。我能够将其用于我的项目。
The RSS feed in the accepted answer above does not exist anymore. Google does not provide an API that allows you retrieve Google searches, but it does allow you to download an archive of all past searches, via google search history. This download cannot be performed programmatically, as it saves the archive to the user's google drive.
A possible hacky workaround is using browser automation tools to scrape the history page, like this repository does. Modifying this script would allow you to get the most recent searches. I was able to use this for my project.