Google Picker

JSON Guide

When a user selects one or more items, the Google Picker API returns a JSON-formatted object in the callback. Depending on the view from which the selection was made, different fields are present in this data object.

{
 Response.ACTION: action,
 Response.VIEW: [
   view_id,
   undefined,
   view_options {
     query: user_query,
     parent: parent_ID,
     ...
   }
 ],
 Response.DOCUMENTS: [
   {
     Document.ADDRESS_LINES: [
       address_line,
       ...
     ],
     Document.AUDIENCE: audience,
     Document.DESCRIPTION: description,
     Document.DURATION: duration,
     Document.EMBEDDABLE_URL: embed_URL,
     Document.ICON_URL: icon_URL,
     Document.ID: item_id,
     Document.IS_NEW: is_new,
     Document.LAST_EDITED_UTC: timestamp,
     Document.LATITUDE: latitude_value,
     Document.LONGITUDE: longitude_value,
     Document.MIME_TYPE: MIME_type,
     Document.NAME: item_name,
     Document.PARENT_ID: parent_ID,
     Document.PHONE_NUMBERS:
       {
         type: phone_type,
         number: phone_number,
       }
       ...
     ],
     Document.SERVICE_ID: service_id,
     Document.THUMBNAILS: [
       {
         Thumbnail.URL: thumbnail_URL,
         Thumbnail.WIDTH: thumbnail_width,
         Thumbnail.HEIGHT: thumbnail_height
       }
       ...
     ],
     Document.TYPE: type,
     Document.URL: item_URL
   },
   ...
 ]
 Response.PARENTS: [
   {
     Document.AUDIENCE: audience,
     Document.DESCRIPTION: description,
     Document.LAST_EDITED_UTC: timestamp,
     Document.MIME_TYPE: MIME_type,
     Document.NAME: item_name,
     Document.ICON_URL: icon_URL,
     Document.ID: item_ID,
     Document.IS_NEW: is_new,
     Document.SERVICE_ID: service_id,
     Document.THUMBNAILS: [
       {
         Thumbnail.URL: thumbnail_URL,
         Thumbnail.WIDTH: thumbnail_width,
         Thumbnail.HEIGHT: thumbnail_height
       }
       ...
     ],
     Document.TYPE: type,
     Document.URL: item_URL,
   },
   ...
   }
}
actionThe Action taken by the user to close the picker dialog.
address_lineThe address of a picked location.
audienceThe Audience of a Picasa Web Albums photo album.
descriptionA description of the item, if provided.
durationThe duration of a picked video.
embed_URLA URL for an embeddable version of the item.
icon_URLA URL for a publicly accessible version for an icon, if available.
is_newTrue if the picked item was uploaded then immediately picked.
item_URLA URL linking directly to the item.
item_idID of the picked item.
item_nameName of the picked item.
latitude_valueLatitude of a picked location (or of where the photo was taken if it has geo data), in degrees.
longitude_valueLongitude of a picked location (or of where the photo was taken if it has geo data), in degrees.
MIME_typeThe MIME type of the picked item (not valid for maps).
parent_IDID of parent item, if applicable.
phone_numberThe phone number of a picked location.
phone_typeThe type of phone number for a picked location.
service_idA ServiceId that describes the service this file was picked from.
thumbnail_heightThe height of the publicly accessible thumbnail.
thumbnail_URLA URL for the publicly accessible thumbnail.
thumbnail_widthThe width of the publicly accessible thumbnail.
timestampThe number of milliseconds since January 1, 1970, 00:00:00 GMT.
typeThe Type of the picked item.
user_queryQuery string, if one was set in View.setQuery().
view_IDThe ViewId of the View the item was picked from.
view_optionsAdditional information, if known. Otherwise undefined.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.