Photos Library API

  • The Google Photos Library API allows you to manage photos, videos, and albums programmatically through REST resources.

  • The API provides methods to interact with albums, including creating, adding enrichments, managing media items, and sharing (although sharing functionality will be deprecated on March 31, 2025).

  • You can also access and manipulate individual media items, such as retrieving details, updating properties, and performing searches.

  • Shared albums can be accessed, joined, and left, but these features are also scheduled for deprecation on March 31, 2025.

  • All interactions with the API are performed through the service endpoint https://photoslibrary.googleapis.com.

Manage photos, videos, and albums created by your app in Google Photos

Service: photoslibrary.googleapis.com

Service endpoint

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
addEnrichment POST /v1/albums/{albumId}:addEnrichment
Adds an enrichment at a specified position in an app created created album.
batchAddMediaItems POST /v1/albums/{albumId}:batchAddMediaItems
Adds one or more app created media items in a user's Google Photos library to an app created album.
batchRemoveMediaItems POST /v1/albums/{albumId}:batchRemoveMediaItems
Removes one or more app created media items from a specified app created album.
create POST /v1/albums
Creates an album in a user's Google Photos library.
get GET /v1/albums/{albumId}
Returns the app created album based on the specified albumId.
list GET /v1/albums
Lists all albums created by your app.
patch PATCH /v1/albums/{album.id}
Update the app created album with the specified id.

REST Resource: v1.mediaItems

Methods
batchCreate POST /v1/mediaItems:batchCreate
Creates one or more media items in a user's Google Photos library.
batchGet GET /v1/mediaItems:batchGet
Returns the list of app created media items for the specified media item identifiers.
get GET /v1/mediaItems/{mediaItemId}
Returns the app created media item for the specified media item identifier.
list GET /v1/mediaItems
List all media items created by your app from a user's Google Photos library.
patch PATCH /v1/mediaItems/{mediaItem.id}
Update the app created media item with the specified id.
search POST /v1/mediaItems:search
Searches for app created media items in a user's Google Photos library.