Google Bookmarks API Guide

Wesley13
• 阅读 820

Many Web 2.0 applications are built on top of a Web API. This technology allows for rich and versatile communication between browser and web site or between two web sites. Google is a leader in the publication of its services through public interfaces such as the ones for Search, Google Maps, Picasa, Calendar and many others, which you can read about in their Google Code web site. However, they have not yet published an API for Google Boomarks. Several people have tried to reverse engineer Google Bookmarks, and bookmarked.mobi has collected here the information that was previously scattered over the internet, plus some of our own.

We have organized this page in terms of the actions that can be performed with this API. All actions require the user to be logged in to his or her Google account. POST actions require a ...&sig=... parameter with the signature key.

The zx parameter with a random unique value is recommened for GET and POST requests as a proxy cache defeater, but it is not really required. Here's an example: ...&zx=hihi40f1q5g1MA...

Create one bookmark

Method: POST
Address: http://www.google.com/bookmarks/mark
Form fields:

bkmk= url
title= title
annotation= notes
labels= comma-separated list of labels

Hidden form fields:

prev="/lookup"
sig= valid sig key

Landing page: a page with all the bookmarks created so far.

Edit one bookmark

Use the same method as to add a bookmark. If URL already exists, bookmark will be edited/updated.

Start creation of a bookmark

Method: GET

Address: http://www.google.com/bookmarks/mark?op=add

Parameters:

output=popup | ?
bkmk= url
title= title
annotation= notes
labels= comma separated list of labels

Landing page: the link creation page, with all the fields already filled in. The user still needs to press the "Add bookmark" button in this form to complete the creation of the bookmark. This kind of action is useful for a bookmarklet, for example.

Upload an XML file with all bookmarks

Description: this is an efficient method for applications to upload bookmarks. With a single POST, all bookmarks are submitted. One important limiations is that it does not accept annotations. The reason for this limitation is that the upload capability was written to migrate "IE favorites" to Google Bookmarks, and IE favorites don't have annotations. The action of importing bookmarks does not remove the existing ones. See also the XML export option below.

Method: POST

Address: http://www.google.com/bookmarks/mark?op=upload

Form fields: this form contains a single field. Because of the way the XML POST request is handled on the server side, the XML file is split at the first equal side, going one half to the name of the field and the other to the value. The name of the field must be ""

We have created a page with an example of such a form: the Google Bookmarks API XML Upload Form.

Lookup one record given a certain criteria

http://www.google.com/bookmarks/lookup?q=label:label2&output=xml

XML Data Access

Description: From all the export options, this is the best one if you are trying to build a web application on top of the Google Bookmarks service.

Method: GET

Address: http://www.google.com/bookmarks/?output=xml

Parameters:

num= a large number (if parameter is ommited, only 25 bookmarks are returned)

RSS Data Access

Description: Certain tools can handle an RSS but cannot handle any XML file.

Address: http://www.google.com/bookmarks/?output=rss

"Bookmarks File" data access

Description: Compatible with most browsers and bookmark sites

Address: http://www.google.com/bookmarks/bookmarks.html

Limitations of the Google Bookmarks API

Well, the first limitation of the Google Bookmarks is that (as of Feb 2009), there is no Google Bookmarks API... All we have is a collection of reverse engineered URL's and their parameters.

Here are the main obstacles to using the Google Bookmarks data in a mobile web application:

  • Neither of the authentication methods recognized by Google (OAuth and AuthSub) apply to Google Bookmarks access.
  • To get the XML with all bookmarks, the GET request has to have the appropriate Cookies set by (and for) the google.com domain. These cookies are not available (for writing by or reading to) the mobile web app domain.
  • Getting all the bookmarks at once may be slow on a mobile device. What is needed is to get just the labels first, but there is no known URL for this.
  • It is not possible to use the Google AJAX Feed API for Google Bookmarks, because Google AJAX Feed API works only with public feeds.
  • As far as we can tell, it is not possible to use an iFrame to get the XML because the iFrem GET request also doesn't carry the google.com cookies.
  • The POST action to add/edit a bookmark requires a sig parameter, which, as far as we can tell, is only available for not just "registered" but also "secure" appplications.
点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
待兔 待兔
3个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Stella981 Stella981
3年前
Android So动态加载 优雅实现与原理分析
背景:漫品Android客户端集成适配转换功能(基于目标识别(So库35M)和人脸识别库(5M)),导致apk体积50M左右,为优化客户端体验,决定实现So文件动态加载.!(https://oscimg.oschina.net/oscnet/00d1ff90e4b34869664fef59e3ec3fdd20b.png)点击上方“蓝字”关注我
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Wesley13 Wesley13
3年前
Java日期时间API系列35
  通过Java日期时间API系列1Jdk7及以前的日期时间类(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwww.cnblogs.com%2Fxkzhangsanx%2Fp%2F12032719.html)中得知,Java8以前除了java.sql.Timestamp扩充
Wesley13 Wesley13
3年前
35岁是技术人的天花板吗?
35岁是技术人的天花板吗?我非常不认同“35岁现象”,人类没有那么脆弱,人类的智力不会说是35岁之后就停止发展,更不是说35岁之后就没有机会了。马云35岁还在教书,任正非35岁还在工厂上班。为什么技术人员到35岁就应该退役了呢?所以35岁根本就不是一个问题,我今年已经37岁了,我发现我才刚刚找到自己的节奏,刚刚上路。
Stella981 Stella981
3年前
Google地球出现“无法连接到登录服务器(错误代码:c00a0194)”解决方法
Google地球出现“无法连接到登录服务器(错误代码:c00a0194)”解决方法参考文章:(1)Google地球出现“无法连接到登录服务器(错误代码:c00a0194)”解决方法(https://www.oschina.net/action/GoToLink?urlhttps%3A%2F%2Fwww.codeprj.com%2Fblo
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
9个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这