

Google Photos API - ldcdc
https://developers.google.com/photos
Use the Google Photos API to build smarter photo and video features for your product.<p>Developer site: <a href="https:&#x2F;&#x2F;developers.google.com&#x2F;photos" rel="nofollow">https:&#x2F;&#x2F;developers.google.com&#x2F;photos</a><p>With the API you can help users transfer, share and bring their content into your app more easily (including features like auto-organized categories and creating link-shareable albums).<p>API is now launched to General Availability, with official client libraries and sample apps for Java &amp; PHP (and more in the works!).<p>Large app integrations are also encouraged to join the Google Photos Partner Program. Check the developer site for more info.
======
andrewstuart
There's alot of comments here about Google shutting down its services.

Here's what Amazon does with products it no longer wants:

Consider SimpleDB, one of the first of the Amazon web services and effectively
dead. But still has a live page, and still works and is online
[https://aws.amazon.com/simpledb/](https://aws.amazon.com/simpledb/)

But is not listed in the Amazon Web Services product lineup:

[https://aws.amazon.com/products/](https://aws.amazon.com/products/)

Presumably if you had built something on it many years ago (which I did), it
would still be working today. Maybe the lesson for Google is that instead of
killing things, leave them working but without future development. And instead
of radical pricing change, make pricing change for new customers and leave the
old ones on the existing pricing. Sure people might be unhappy about the
changes but they are less likely to be enraged and lose trust in Google.

This post from Amazon Web Services CTO
[https://www.allthingsdistributed.com/2016/03/10-lessons-
from...](https://www.allthingsdistributed.com/2016/03/10-lessons-
from-10-years-of-aws.html) says:

5\. APIs are forever

This was a lesson we had already learned from our experiences with Amazon
retail, but it became even more important for AWS’s API-centric business. Once
customers started building their applications and systems using our APIs,
changing those APIs becomes impossible, as we would be impacting our
customer’s business operations if we would do so. We knew that designing APIs
was a very important task as we’d only have one chance to get it right.

~~~
zaarn
>5\. APIs are forever

Microsoft does a lot of work in that direction too, there are workarounds and
fallbacks to older API behavior everywhere around the place.

I think this is also compatible with Linus' mantra; "Don't break userspace".
(Obviously there is a limit, Linus did elaborate on those limits recently).

I really don't like it when APIs stop working. There are plenty of ways to get
people off the old API without disrupting them or annoying anyone, as you
mention, an option is to simply stop advertising the old version and maybe
make it more expensive (or less accessible) to new customers.

Having a stable API that I can bet a product for 10 years (or more) on is
something that developers (and users) like and should be a huge plus when
deciding between product offerings from companies.

------
highace
_Use the Google Photos API to build smarter photo and video features for your
product_... until we deprecate the API in a couple years time and leave you up
shit creek.

~~~
ariwilson
This is a tired meme given that the number of Google services closed has been
mostly going down since 2013. See also
[https://en.wikipedia.org/wiki/List_of_Google_products#Discon...](https://en.wikipedia.org/wiki/List_of_Google_products#Discontinued_products_and_services)

    
    
      2006 3
      2007 4
      2008 5
      2009 7
      2010 4
      2011 16
      2012 19
      2013 11
      2014 7
      2015 6
      2016 11 (actually 8 if you don't count things that got merged into other things)
      2017 4
      2018 2

~~~
RobertRoberts
I don't care anymore. I am now in the process of removing Google Maps from
every system we run because of their screwing over their users and their devs.
I have thousands of dollars of time to spend ahead of me because of the
changes to Google Maps this past month alone.

I get it, it's expensive to run maps, it's not free. But this is multiple-
times burned by these guys. So the threshold of toleration is lower with
Google than other businesses/services.

Nothing free from Google is ever going on anymore of my sites or software
unless it is setup with an alternative already in place so when they do
_anything_ ridiculous, they can be dropped instantly. But as of right now, the
plan is a complete purge of Google.

~~~
stevenwoo
What are you switching to for web and mobile users for maps?

~~~
nevi-me
I'm doing what the parent post is doing, switching to OpenMapTiles which I'll
be running on my own. Still using Google maps on Android because it's free and
doesn't generate enough volume to cost me much.

I too take caution with Google APIs after the maps price hike. I've also
abandoned Twitter API after their streaming API shutdown

------
abhisuri97
Their acceptable use policy seems to be fishy

> Innovate, don't duplicate

> Don’t make a substitute for Google Photos or use this API to create, train,
> or improve (directly or indirectly) a similar or competing product or
> service. For instance, if your app’s primary aim is to provide a general
> purpose photo gallery app, it’s a substitute for Google Photos.

~~~
reitanqild
Ouch. I didn't catch that.

IANAL, but this seems to rule out the use of this API in a number of places
where it would be useful (plugin for open source photo management seems to be
directly targeted etc).

I can understand why they don't want to allow me to train my image recognition
software using their API, but this phrasing makes me really wonder what it is
for except syncing.

~~~
ldcdc
Thanks, that's helpful feedback. If you have a specific use case in mind,
please drop us a note through the partner program and our team can provide you
with specific guidance: [https://developers.google.com/photos/partner-
program/](https://developers.google.com/photos/partner-program/)

~~~
reitanqild
Not a partner so not sure my feedback is relevant there, but an obvious use
case would be integration, probably as a plugin into all kind of open source
galleries, photo browsers, organizers etc.

Also, generally the wording is vague enough to cover almost anything, which
means at some point, sooner or later you might have to rely on the judgement
of some random future googler to prevent all your integrations being
destroyed.

------
photos_victim
Wow, fantastic! This will allow me to drag Google’s sync app for Mac directly
into the trash, which I’ve been dying to do for years! Then I can write some
kind of program that finds the duplicated medium, small, and thumbnail sizes
of all my photos, and the cropped faces, that Google senselessly uploaded from
my Aperture/Photos library to the tune of 4 million+ garbage files. This API
could make it possible for me to actually get value from Google Photos again.

~~~
sketchthat
Please build this. Google's Sync app is terrible. I don't understand their
logic - if you have a high res photo on Google Photos, but the original on
your PC (Which will be higher quality) it won't overwrite it. You need to
delete the cloud version and upload the original. It's stupid - I had a free
Photo account with "high res" photo syncing for free, then I moved to a paid
account and I have to delete all my photos and re-sync - which doesn't work on
Mac, so now I only have 1/2 my photos backed up... So annoying.

~~~
mceachen
Hi there! I haven't launched yet, but you're throwing me a softball here.

I am building it: [https://PhotoStructure.com](https://PhotoStructure.com)

Cleaning up the mess left from early-adopting N photo apps and websites that
subsequently shut down is why I took on this project. I've got 20-odd hard
drives that have accumulated over the years, filled with backups and libraries
from Apple Photos, Aperture, Picasa, several hundred gigs of Google Takeout
tarballs, and other ancient DAM apps. I wanted a single, organized, deduped,
copy of my photos and videos. Skip the thumbnails, the files that are missing
original EXIF headers, or have suffered bitrot.

Finally, I've got a single folder hierarchy I can rsync to my NAS or wherever,
and know I got everything. There's a simple SQLite db I use for persistence,
and a web server that sits on top of it that makes browsing and searching your
whole library feel serendipitous.

So yeah, it's Google Photos that lives on your bookshelf. Viva the distributed
web! I'm looking into the applicability of dat and ipfs for secure sharing
soon.

I've got a limited number of beta users trying it out right now. If you're
willing to share your feedback, please consider signing up. The beta is free.

~~~
Terretta
I have on the order of terabytes of digital photos from QuickTake through
Nikon's various Ds to the Sony A9, with various pocketables and all the
generations of iPhone along the way. I have a quarter million iCloud Photos
images, 30K on Flickr, etc.

So this looks fantastic! Subscribed ... very willing to be a beta tester and
provide detailed feedback.

However, the problem I'm finding is a small percentage of file corruption from
all the storage upgrading and copying over the years, meaning no given file
can be 100% trusted to be a valid original.

I haven't found any file or photo deduplication tools with the savvy to figure
out which of two identically sized and timestamped files is the least corrupt
image.

In many cases, a second generation is viewable while the original is present
but unusable. This most often applies to very old Aperture libraries that got
copied from NAS to NAS over the years, where a "master" may be corrupt but it
still has a viewable generated high res cache as a JPEG.

Implication is the "structure" of the image files themselves has to be
analyzed ... is this an uncorrupted viewable image?

Note that with JPEGs and various flavors of RAW, renderers will still happily
open and display the file but what humans view can evidence bit rot.
Conversely, some files are detected as corrupt by file examination, but can be
viewed without problem.

To offer "principle of least loss" for mass merge of diverse collections, this
would have to be figured out.

~~~
mceachen
> which of two identically sized and timestamped files is the least corrupt
> image

What I've found on my older hard drive backups was file corruption due to
bitrot or file truncation.

I use `jpegtran` to validate JPEG bytestreams, `dcraw` to validate RAW images,
and ``ffmpeg` to validate videos. At least for my quarter-million-file corpus,
those tools detect corruption sufficient enough for me to want to skip the
file. I actually had to write a bit rotter to write tests for this, and do
glitch inspection.

> To offer "principle of least loss" for mass merge of diverse collections,
> this would have to be figured out

Every unique SHA gets copied into your library (if you have copies enabled),
but any given asset will have 1 or more asset files (that are merged in the UI
and DB). To minimize risk from bugs^H^H^H^H "undiscovered features,"
PhotoStructure never moves or deletes files excluding it's own cache and db.

------
est
[https://developers.google.com/photos/library/guides/api-
limi...](https://developers.google.com/photos/library/guides/api-limits-
quotas#photo-storage-quality)

> All media items uploaded to Google Photos using the API are stored in full
> resolution at original quality. They count toward the user’s storage.

Are there some commercial decision behind this?

Currently the Google uploader is worse than the previous backup tool, and you
can't make third party uploader with this API.

~~~
ldcdc
Thanks for the question. This is something the team is actively considering
in:
[https://issuetracker.google.com/issues/111193036](https://issuetracker.google.com/issues/111193036)

Our primary concern is ensuring that users have full control over the quality
of media that's added to their library (so currently the API defaults to
always uploading in original quality).

Clearly there are ways that problem can be solved, so please suggest this use
case in the issuetracker and star the issue (so we have a sense of developer
interest & you can be kept in the loop on updates).

~~~
reitanqild
Please also tak a look at this:
[https://news.ycombinator.com/item?id=17956695](https://news.ycombinator.com/item?id=17956695)

As I read it now it limits the usage so broadly and vaguely that I'd be
hesitant to put any serious effort into it.

------
owaislone
Slightly unrelated:

Google Photos is a great product but for me it has one huge drawback. You
cannot remove a person from a shared album after adding them. You or anyone an
album is shared with can accidentally share the album with any other person
and once that happens, only way to stop them from accessing your photos is to
delete the whole album. Deleting the album means losing all photos, comments
and likes added by others. Also sharing an album always generates a link that
can be used by anyone to access the album. I haven't found a way to share only
with people without generating the link.

------
judge2020
Looking through the documentation, this can be concerning:

> Photo storage and quality

> All media items uploaded to Google Photos using the API are stored in full
> resolution at original quality. They count toward the user’s storage.

It would be nice to specify a photo to be stored as "high resolution" like you
may as a gphotos user. Every photo uploaded via the API counting towards a
user's storage might deter them from using the integration.

~~~
steve19
I guess you could just do the same type of resizing they do before uploading
although I agree it should be built into thr API.

~~~
scrollaway
If a resized photo is stored in "original quality" mode, that's still counting
as quota. "Lossy quality" mode photos straight up don't count.

------
acgh213
With some work this could replace the desktop app Google bought and
discontinued (Picasa) and remove the dependency on Drive Sync

------
willcodeforfoo
Finally! This looks great, there was a way to get access to Google Photos via
the Drive API but a dedicated one is a nice surprise.

However... I noticed a clause that requires a "Commercial license" if your app
prints photos:

> If your product transfers a user’s photos onto physical goods (such as photo
> prints or t-shirts) and you charge money for this service, you must have a
> Commercial license. For more information, see the Google Photos partner
> program.

Anyone know how much this costs or why this is the case?

------
jwong_
I hope we get something besides Backup and Sync as a replacement for Google
Photos Uploader. My workflow broke when Backup and Sync doesn't work the same
way, and not as consistent. I can't only upload photos, and it seems to try to
vacuum up other files, so I've just told it to stop since they broke the
Googel Photos Uploader API.

------
scarcely
Would it be possible to hack together a usable manual tagging system via the
API? I don't mean the automatic face tagging, or built-in tagging
functionality (I assume Google Photos doesn't have it). I mean would it be
possible to use the API to insert keywords into the description fields and
reliably search the description fields

------
czue
Ooh wow this looks like I can finally add a bunch of features to my "google
photos in your new tabs" chrome extension
([http://www.photosnewtab.com/](http://www.photosnewtab.com/))

------
zbrozek
Maybe I'll finally be able to de-dupe the low-resolution photos Picasa
uploaded against the higher-resolution photos that photo importer tool
uploaded. I'll just have to write the de-duping tool myself. Great!

------
vojta_letal
I want to be able to sync tagged faces from photos to contacts. Or at least
access the tagged face via the API.

My photos, my contacts. What's the big deal?

------
anentropic
someone tell Apple

I have to do a tedious manual export and upload to get photos from Apple
Photos desktop app to Google Photos cloud

(and I don't want a sync app that uploads everything)

------
m-p-3
Here is Google shutting down another API (which are forever until they're
not), and still no sign of a Google Keep API.

Come on Google, you can do better than this.

------
ayy_lmao
>enjoying a soon to be deprecated API at the price of letting the G access to
all your data I shiggy diggy

------
mamcx
What about timing. I need a API for sync photos for my mobile app. Now what to
use?

------
scottydelta
Won't this enable hackers to make apps to steal people's images/photos given
that many users don't think twice before authorizing apps to collect all the
data they want just like we saw recently in case of top trending apps stealing
data on Apple Store?

