Google Photos Photos Library

Manage photos, videos, and albums in Google Photos

Client Libraries. Client libraries provide high-level views and basic building blocks of Google Photos Library API functionality, making it easier to develop apps quickly. Installation instructions and code examples are bundled with each client library and are available on GitHub. Except as otherwise noted, the content of this page is licensed. There are many cloud storage services available today, and Apple and Google offer two of the more popular options. Switching can feel like a daunting task, but Apple makes it easy to move your iCloud library to Google Photos. Appleā€™s transfer service can bring a copy of your iCloud photos and videos over to your Google Photos. The Library API lets you read, write and share photos & videos in Google Photos. Samples The REST/Photoframe sample shows how to use the REST API in a Node.JS web application to build an interactive photo frame that loads photos from a user's Google Photos library.

Service: photoslibrary.googleapis.com

Service endpoint

Photos

A service endpoint is a base URL that specifies the network address of an API service. One service might have multiple service endpoints. This service has the following service endpoint and all URIs below are relative to this service endpoint:

  • https://photoslibrary.googleapis.com

REST Resource: v1.albums

Methods
addEnrichmentPOST /v1/albums/{albumId}:addEnrichment
Adds an enrichment at a specified position in a defined album.
batchAddMediaItemsPOST /v1/albums/{albumId}:batchAddMediaItems
Adds one or more media items in a user's Google Photos library to an album.
batchRemoveMediaItemsPOST /v1/albums/{albumId}:batchRemoveMediaItems
Removes one or more media items from a specified album.
createPOST /v1/albums
Creates an album in a user's Google Photos library.
getGET /v1/albums/{albumId}
Returns the album based on the specified albumId.
listGET /v1/albums
Lists all albums shown to a user in the Albums tab of the Google Photos app.
patchPATCH /v1/albums/{album.id}
Update the album with the specified id.
sharePOST /v1/albums/{albumId}:share
Marks an album as shared and accessible to other users.
unsharePOST /v1/albums/{albumId}:unshare
Marks a previously shared album as private.

REST Resource: v1.mediaItems

Methods
batchCreatePOST /v1/mediaItems:batchCreate
Creates one or more media items in a user's Google Photos library.
batchGetGET /v1/mediaItems:batchGet
Returns the list of media items for the specified media item identifiers.
getGET /v1/mediaItems/{mediaItemId}
Returns the media item for the specified media item identifier.
listGET /v1/mediaItems
List all media items from a user's Google Photos library.
patchPATCH /v1/mediaItems/{mediaItem.id}
Update the media item with the specified id.
searchPOST /v1/mediaItems:search
Searches for media items in a user's Google Photos library.

REST Resource: v1.sharedAlbums

Methods
getGET /v1/sharedAlbums/{shareToken}
Returns the album based on the specified shareToken.
joinPOST /v1/sharedAlbums:join
Joins a shared album on behalf of the Google Photos user.
leavePOST /v1/sharedAlbums:leave
Leaves a previously-joined shared album on behalf of the Google Photos user.
listGET /v1/sharedAlbums
Lists all shared albums available in the Sharing tab of the user's Google Photos app.

Using the Google Photos Library API your app can read, write, and share photos and videos inGoogle Photos.

The Library API is a RESTfulAPI with JSON payload. The structureof the API is based on the product concepts of Google Photos:

  • Library: media stored in the user'sGoogle Photos account.
  • Albums: media collections which can beshared with other users.
  • Media items: photos, videos, andtheir metadata.
  • Sharing: feature that enables users toshare their media with other users.
Try our Google Photos APIs Codelab. This codelab walks you through building a mobile application that uses the sharing and upload functionality of the Google Photos Library API in Flutter.

Authorization

Like other Google REST APIs, the Library API uses OAuth2.0 to handle authorization.Your app can request access to the user's Google Photos library via thevarious authorizationscopes provided by theAPI.

Note that the Library API does not support service accounts; to use thisAPI, users must be signed in to a valid Google Account.

Using the Library API

Before you get started on your app development, keep the following in mind:

  • UX guidelines for designing your app
  • The Library API limits andquotas

Explore the API

Google Photos Photos Library Size

To try out the Library API without writing any code, use the API Exploreravailable in the reference documentation.

Here are some methods to try using the API Explorer:

  • List your albums.
  • Apply filters to a media itemsearch.

Check out our code sample that shows some of the keyfeatures of the Library API.

Partner program

Google Photos Macos Photos Library

You can integrate with the Google Photos Library API without joining the partner program.However, if your app is likely to exceed the general availability quotalimit, or if you require acommercial agreementto use the Library API, express interest in the Google Photospartner program.

Learn more

Google Photos Image Library

Some places to go from here:

Google Photos Photos Library Download

  • Get started: configure your project andtry out the sample.
  • Guides: the how-to guides and concepts aroundusing the Library API.
  • Reference: the API reference documentation
  • Support: the support options forrequesting help or giving feedback.