REST Resource:

Resource: MediaItem

A single media item.

JSON representation
  "name": string,
  "mediaFormat": enum (MediaFormat),
  "locationAssociation": {
    object (LocationAssociation)
  "googleUrl": string,
  "thumbnailUrl": string,
  "createTime": string,
  "dimensions": {
    object (Dimensions)
  "insights": {
    object (MediaInsights)
  "attribution": {
    object (Attribution)
  "description": string,

  // Union field data can be only one of the following:
  "sourceUrl": string,
  "dataRef": {
    object (MediaItemDataRef)
  // End of list of possible types for union field data.


The resource name for this media item. accounts/{accountId}/locations/{locationId}/media/{mediaKey}


enum (MediaFormat)

The format of this media item. Must be set when the media item is created, and is read-only on all other requests. Cannot be updated.


object (LocationAssociation)

Required when calling CreatePhoto. Describes how this media item is connected to its location. Must be either a category (for example, EXTERIOR) or the ID of a price list item.

This is required when adding new media to a location with media.create. For other types of media, for example, photos on local posts, this will not be present.



Output only. Google-hosted URL for this media item. This URL is not static since it may change over time. For video this will be a preview image with an overlaid play icon.



Output only. Where provided, the URL of a thumbnail image for this media item.


string (Timestamp format)

Output only. Creation time of this media item.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".


object (Dimensions)

Output only. The dimensions (width and height) in pixels.


object (MediaInsights)

Output only. Statistics for this media item.


object (Attribution)

Output only. Attribution information for customer media items. You must display this attribution as provided to your users and must not delete or alter the attribution.



Description for this media item. Descriptions cannot be modified through the Google My Business API, but can be set when creating a new media item that is not a cover photo.

Union field data. The media item's data source. When creating a new media item, either a URL or data ref must be provided.

With the exception of PROFILE and COVER category, all photos must measure a minimum of 250px on the short edge, with a file size of at least 10240 bytes.

All uploaded photos should follow the Business Profile guidelines for photos. data can be only one of the following:



A publicly accessible URL where the media item can be retrieved from.

When creating one of this or dataRef must be set to specify the source of the media item.

If sourceUrl was used when creating a media item, it will be populated with that source URL when the media item is retrieved.

This field cannot be updated.


object (MediaItemDataRef)

Input only. A reference to media item binary data as obtained by the media.startUpload method.

When creating a media item, either




must be set.



Returns metadata for the requested customer media item.


Returns a list of media items associated with a location that have been contributed by customers.