# Method: mediaItems.batchGet

- [HTTP request](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#body.request_body)
- [Response body](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#body.response_body)
  - [JSON representation](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#body.BatchGetMediaItemsResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#body.aspect)
- [MediaItemResult](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#MediaItemResult)
  - [JSON representation](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#MediaItemResult.SCHEMA_REPRESENTATION)
- [Try it!](https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#try-it)

Returns the list of app created media items for the specified media item identifiers. Items are returned in the same order as the supplied identifiers.

### HTTP request

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

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `mediaItemIds[]` | `string` Required. Identifiers of the media items to be requested. Must not contain repeated identifiers and cannot be empty. The maximum number of media items that can be retrieved in one call is 50. |

### Request body

The request body must be empty.

### Response body

Response to retrieve a list of app createdmedia items.

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

| JSON representation |
|---|
| ``` { "mediaItemResults": [ { object (`https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#MediaItemResult`) } ] } ``` |

| Fields ||
|---|---|
| `mediaItemResults[]` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#MediaItemResult`)`` Output only. List of media items retrieved. Note that even if the call to mediaItems.batchGet succeeds, there may have been failures for some media items in the batch. These failures are indicated in each `https://developers.google.com/photos/library/reference/rest/v1/mediaItems/batchGet#MediaItemResult.FIELDS.status`. |

### Authorization scopes

Requires one of the following OAuth scopes:

- `
  https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata`

## MediaItemResult

Result of retrieving a media item.

| JSON representation |
|---|
| ``` { "status": { object (`https://developers.google.com/photos/library/reference/rest/v1/Status`) }, "mediaItem": { object (`https://developers.google.com/photos/library/reference/rest/v1/mediaItems#MediaItem`) } } ``` |

| Fields ||
|---|---|
| `status` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/Status`)`` If an error occurred while accessing this media item, this field is populated with information related to the error. For details regarding this field, see `https://developers.google.com/photos/library/reference/rest/v1/Status`. |
| `mediaItem` | ``object (`https://developers.google.com/photos/library/reference/rest/v1/mediaItems#MediaItem`)`` Media item retrieved from the user's library. It's populated if no errors occurred and the media item was fetched successfully. |