The Google Photos API is a disaster

February 2017 ยท 5 minute read

I’ve been recently trying to make my photo library more public. To begin with, I’ve been keeping all my photos in Google Photos. It’s nice and all with its unlimited storage and the auto-upload from Android, but it’s impossible to share many albums or ad hoc photos at once.

I noticed that Flickr had introduced a 1TB free tier so I dusted off my old account and set to work to bring my collection there.

After some search and trying out different methods, I settled on forking a software called flickrsmartsync. I would put my “important” photos to semi-large albums and download them one by one as ZIP files through the Google Photos web interface, and then I would name them appropriately and upload as folders via flickrsmartsync. Note: I initially tried Flickr’s web uploader, but it works exceptionally badly for bulk uploads.

Downloading albums as ZIPs works well enough, but it doesn’t retain all metadata and it’s a bit too manual. I love my metadata though, so I investigated if I could create a AWS Lambda or “serverless” service to stream data and metadata (photos, videos, and their timestamps, descriptions, etc.) from Google Photos to Flickr directly.

I dug into the rabbit hole and it went… really deep.

Google Photos does NOT have its own API. Instead, there are two APIs which can be currently used: 1. The Picasa Web API, which is semi-deprecated and will probably disappear in the coming years. 2. Google Drive API, which has its own “space” or section for Google Photos.

The Picasa Web API

The Picasa Web API is an instance of an old and crufty GData API which is slowly being discontinued from all Google services. It is more faithful to the original data and metadata, but it’s also quite crufty and has some recent hard limitations which cannot be worked around. The most severe is that it is impossible to list more than 10,000 photos in the default pseudo-album, which contains all photos. 1

Secondly, though I could list all the albums from Google Photos, there were some problems and I could not find some photos from the right albums.

One nice feature though, is that the Picasa Web API gives publically accessible URLs for all photos. This allows for embedding all (original quality) photos in other websites. But then again, these links will probably eventually stop working, so is it worth it…

The Google Drive API

The Google Drive API is much nicer, and has interesting new features.

However, there were some really bizarre things:

  1. Apparently any changes made in the Google Drive side of Google Photos are NOT reflected back to Google Photos. 2
  2. Google Drive photo IDs have no relation to Picasa Web photo IDs, so it is impossible to combine the data reliably (unless the photo filenames are unique).
  3. Google Drive API does not have ANY album metadata. It only lists the photos themselves.
  4. Reportedly, some photos are not visible in Google Drive. So should I trust this to get all my data? 3

Google Takeout or manual album download

Manually downloading photos seems to be the most reliable option by far.

In some way, this would make sense. Google probably invests more effort into making sure these critical features work, rather than making sure the lesser-used APIs do.

I would have initially just dumped the Google Takeout to Flickr but it’s a huge pain to download a 34 GB zip of photos with limited internet when travelling, and it’s also difficult to impossible to resume the download, when interrupted, so I opted to look for some alternative methods.

Conclusions

File storage is one thing, and Google Photos seems to excel at it. It’s free, easy to use, automatic, etc. But there’s no control of sharing.

Sharing Google Photos albums is a disaster. I personally would like to share all my public photos in one go. Google Photos does not allow this.

Migrating, mirroring, syncing, or backing up from Google Photos is difficult, especially due to metadata concerns.

It makes sense to ensure that the more important metadata is managed in some other place. When you “need it”, it’s probably too late, the APIs are deprecated, stop working, or require way too much effort.

Owning my own data is nice and all, but I don’t want to manage infrastructure. It’s not worth it (IMO). But there should be a way to (cheaply) keep the most important data/metadata managed competently in one logical place. Google Photos and other services function well for dumb file storage, but for smart, shareable file/photo storage, the metadata needs to be managed well, somewhere.

I wish there was a small business opportunity here, but it kind of sounds like it’s not worth the hassle, and there would be too little money in preserving personal metadata, since most people probably don’t really care too much if they lose some of it, as long as they have their piles of files more or less somewhere. So, while it would be nice to work on this a little bit, there are many many problems out there that people care more about (and are also more profitable, as profitability correlates with real world problem solving).

comments powered by Disqus