Method: mediaItems.list

List all media items from a user's Google Photos library.

HTTP request

GET https://photoslibrary.googleapis.com/v1/mediaItems

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
pageSize

integer

Maximum number of media items to return in the response. Fewer media items might be returned than the specified number. The default pageSize is 25, the maximum is 100.

pageToken

string

A continuation token to get the next page of the results. Adding this to the request returns the rows after the pageToken. The pageToken should be the value returned in the nextPageToken parameter in the response to the listMediaItems request.

Request body

The request body must be empty.

Response body

List of all media items from the user's Google Photos library.

If successful, the response body contains data with the following structure:

JSON representation
{
  "mediaItems": [
    {
      object (MediaItem)
    }
  ],
  "nextPageToken": string
}
Fields
mediaItems[]

object (MediaItem)

Output only. List of media items in the user's library.

nextPageToken

string

Output only. Token to use to get the next set of media items. Its presence is the only reliable indicator of more media items being available in the next request.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/photoslibrary
  • https://www.googleapis.com/auth/photoslibrary.readonly
  • https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata