Picasa Web Albums Data API

Developer's Guide: Protocol

Picasa Web Albums allows client applications to view and update albums, photos, and comments in the form of Google Data API feeds. Your client application can use the Picasa Web Albums Data API to create new albums, upload photos, add comments, edit or delete existing albums, photos, and comments, and query for items that match particular criteria.

Contents

Audience

This document is intended for programmers who want to write client applications that can interact with Picasa Web Albums. It provides a series of examples of basic Data API interactions using raw XML/HTTP, with explanations. After reading this document, you can learn more about interacting with the API using our client libraries by reading the language-specific examples found on the other sections of this document.

For Picasa Web Albums Data API reference information, see the reference guide.

This document assumes that you understand the general ideas behind the Google Data APIs protocol. Each example in this document first shows how to use the bare protocol to interact with Picasa Web Albums.

Creating an account

You may want to sign up for a Picasa Web Albums account for testing purposes.

Authorizing requests

When your application requests non-public user data, it must include an authorization token. The token also identifies your application to Google.

About authorization protocols

We recommend using OAuth 2.0 to authorize requests.

The Picasa Web Albums Data API also supports older authorization options, such as OAuth 1.0, AuthSub, or ClientLogin; however, in most cases we don't recommend using those other options. If your application already uses those options, we recommend migrating to OAuth 2.0 if possible.

If your application has certain unusual authorization requirements, such as logging in at the same time as requesting data access (hybrid) or domain-wide delegation of authority (2LO), then you cannot currently use OAuth 2.0 tokens. In such cases, you must instead use OAuth 1.0 tokens.

Authorizing requests with OAuth 2.0

Requests to the Picasa Web Albums Data API for non-public user data must be authorized by an authenticated user.

The details of the authorization process, or "flow," for OAuth 2.0 vary somewhat depending on what kind of application you're writing. The following general process applies to all application types:

  1. When you create your application, you register it with Google. Google then provides information you'll need later, such as a client ID and a client secret.
  2. Activate the Picasa Web Albums Data API in the Services pane of the Google APIs Console. (If it isn't listed in the Console, then skip this step.)
  3. When your application needs access to user data, it asks Google for a particular scope of access.
  4. Google displays an OAuth dialog to the user, asking them to authorize your application to request some of their data.
  5. If the user approves, then Google gives your application a short-lived access token.
  6. Your application requests user data, attaching the access token to the request.
  7. If Google determines that your request and the token are valid, it returns the requested data.

Some flows include additional steps, such as using refresh tokens to acquire new access tokens. For detailed information about flows for various types of applications, see Google's OAuth 2.0 documentation.

Here's the OAuth 2.0 scope information for the Picasa Web Albums Data API:

https://picasaweb.google.com/data/

To request access using OAuth 2.0, your application needs the scope information, as well as information that Google supplies during application registration (such as the client ID and/or the client secret).

Tip: The Google APIs client libraries can handle some of the authorization process for you. They are available for a variety of programming languages; check the Libraries and Samples page for more details.

Specifying a version

Every request that you send using the Data API should specify version 2 of the API.

To specify a version number, use the GData-Version HTTP header:

GData-Version: 2

Alternatively, if you can't set HTTP headers, you can specify v=2 as a query parameter in the URL. But the HTTP header is preferred where possible.

Note: The client libraries supply appropriate version headers automatically, so don't use the v=2 query parameter when you're using a client library.

Working with albums

Albums are the way Picasa Web Albums groups photos into useful sets. These albums can be public or unlisted, and have their own properties such as a geographic location, a description, or a date.

You do not have to authenticate to retrieve data about public albums, but in order to create, update, or delete content you must authenticate using one of the methods discussed in the authentication section.

Requesting a list of albums

To get a feed listing all of the albums belonging to user userID, send an HTTP request like the following to Picasa Web Albums:

GET https://picasaweb.google.com/data/feed/api/user/userID

Note: The string default can be used in place of a real user ID, in which case the server uses the ID of the user whose credentials authenticated the request.

The server returns a feed of album entries, which looks similar to the following:

<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
    xmlns:exif='http://schemas.google.com/photos/exif/2007'
    xmlns:geo='http://www.w3.org/2003/01/geo/wgs84_pos#'
    xmlns:gml='http://www.opengis.net/gml'
    xmlns:georss='http://www.georss.org/georss'
    xmlns:batch='http://schemas.google.com/gdata/batch'
    xmlns:media='http://search.yahoo.com/mrss/'
    xmlns:gphoto='http://schemas.google.com/photos/2007'
    xmlns:gd='http://schemas.google.com/g/2005'
    gd:etag='W/"CkABRXY8fip7ImA9WxVVGE8."'>
  <id>https://picasaweb.google.com/data/feed/api/user/liz</id>
  <updated>2009-03-12T01:19:14.876Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/photos/2007#user' />
  <title>liz</title>
  <subtitle></subtitle>
  <icon>https://iconPath/liz.jpg</icon>
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz' />
  <link rel='http://schemas.google.com/g/2005#post'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz' />
  <link rel='alternate' type='text/html'
    href='http://picasaweb.google.com/liz' />
  <link rel='http://schemas.google.com/photos/2007#slideshow'
    type='application/x-shockwave-flash'
    href='http://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fliz%3Falt%3Drss' />
  <link rel='self' type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz?start-index=1&amp;max-results=1000&amp;v=2' />
  <author>
    <name>Liz</name>
    <uri>http://picasaweb.google.com/liz</uri>
  </author>
  <generator version='1.00' uri='http://picasaweb.google.com/'>
    Picasaweb</generator>
  <openSearch:totalResults>1</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>1000</openSearch:itemsPerPage>
  <gphoto:user>liz</gphoto:user>
  <gphoto:nickname>Liz</gphoto:nickname>
  <gphoto:thumbnail>
    https://thumbnailPath/liz.jpg</gphoto:thumbnail>
  <gphoto:quotalimit>1073741824</gphoto:quotalimit>
  <gphoto:quotacurrent>32716</gphoto:quotacurrent>
  <gphoto:maxPhotosPerAlbum>500</gphoto:maxPhotosPerAlbum>
  <entry gd:etag='"RXY8fjVSLyp7ImA9WxVVGE8KQAE."'>
    <id>https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID</id>
    <published>2005-06-17T07:09:42.000Z</published>
    <updated>2009-03-12T01:19:14.000Z</updated>
    <app:edited xmlns:app='http://www.w3.org/2007/app'>
      2009-03-12T01:19:14.000Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/photos/2007#album' />
    <title>lolcats</title>
    <summary>Hilarious Felines</summary>
    <rights>public</rights>
    <link rel='http://schemas.google.com/g/2005#feed'
      type='application/atom+xml'
      href='https://picasaweb.google.com/data/feed/api/user/liz/albumid/albumID?authkey=authKey&amp;v=2' />
    <link rel='alternate' type='text/html'
      href='http://picasaweb.google.com/lh/album/aFDUU2eJpMHZ1dP5TGaYHxtMTjNZETYmyPJy0liipFm0?authkey=authKey' />
    <link rel='self' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID?authkey=authKey&amp;v=2' />
    <link rel='edit' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/1236820754876000?authkey=authKey&amp;v=2' />
    <link rel='http://schemas.google.com/acl/2007#accessControlList'
      type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/acl?authkey=authKey&amp;v=2' />
    <author>
      <name>Liz</name>
      <uri>http://picasaweb.google.com/liz</uri>
    </author>
    <gphoto:id>albumID</gphoto:id>
    <gphoto:location>Mountain View, CA</gphoto:location>
    <gphoto:access>public</gphoto:access>
    <gphoto:timestamp>1118992182000</gphoto:timestamp>
    <gphoto:numphotos>1</gphoto:numphotos>
    <gphoto:numphotosremaining>499</gphoto:numphotosremaining>
    <gphoto:bytesUsed>23044</gphoto:bytesUsed>
    <gphoto:user>liz</gphoto:user>
    <gphoto:nickname>Liz</gphoto:nickname>
    <media:group>
      <media:title type='plain'>lolcats</media:title>
      <media:description type='plain'>Hilarious
        Felines</media:description>
      <media:keywords></media:keywords>
      <media:content url='https://imagePath/Lolcats.jpg' type='image/jpeg' medium='image' />
      <media:thumbnail url='https://thumbnailPath/Lolcats.jpg' height='160' width='160' />
      <media:credit>Liz</media:credit>
    </media:group>
  </entry>
  ...more entries similar to the one above here...
</feed>

For information about what each of those elements means, see the Picasa Web Albums Data API Reference document, the Google Data APIs Protocol Reference document, or the Atom 1.0 specification.

Creating an album

You can create an album by sending an authenticated POST request with an appropriately formed entry. To authenticate, use one of the authentication mechanisms discussed in the Authentication section.

POST https://picasaweb.google.com/data/feed/api/user/userID

<entry xmlns='http://www.w3.org/2005/Atom'
    xmlns:media='http://search.yahoo.com/mrss/'
    xmlns:gphoto='http://schemas.google.com/photos/2007'>
  <title type='text'>Trip To Italy</title>
  <summary type='text'>This was the recent trip I took to Italy.</summary>
  <gphoto:location>Italy</gphoto:location>
  <gphoto:access>public</gphoto:access>
  <gphoto:timestamp>1152255600000</gphoto:timestamp>
  <media:group>
    <media:keywords>italy, vacation</media:keywords>
  </media:group>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/photos/2007#album'></category>
</entry>

Picasa Web Albums creates a new album using the data you sent, then returns an HTTP 201 status code, along with a copy of the new album in the form of an <entry> element. The returned entry is similar to the one you sent, but the returned one contains various elements added by the server, such as an <id> element.

If your request fails for some reason, then a different status code may be returned. For information about the status codes used by the API, see the HTTP status codes section of the Google Data APIs protocol reference document.

Modifying the properties of an album

After retrieving an album entry, you can modify it by sending a PUT request, containing the new album data, to the URL given in the <link rel="edit"> element.

PUT https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID

To make sure that your update doesn't overwrite another client's changes, include an HTTP If-Match header that contains the original album's ETag value. You can determine the original album's ETag value by examining the <entry> element's gd:etag attribute.

If you want to update the album regardless of whether someone else has updated it since you retrieved it, then use If-Match: * and don't include the ETag.

For more information about ETags, see the Google Data APIs reference guide.

Deleting an album

You can delete an album by sending an authenticated HTTP DELETE request to the URL inside of the <link rel="edit">:

DELETE https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID

If you want to make sure that you don't delete an album that has been changed by another client since you retrieved it, include an HTTP If-Match header that contains the original album's ETag value. You can determine the original album's ETag value by examining the <entry> element's gd:etag attribute.

If you want to delete the album regardless of whether someone else has updated it since you retrieved it, then use If-Match: * and don't include the ETag. (In this case, you don't need to retrieve the album before deleting it.)

For more information about ETags, see the Google Data APIs reference guide.

Working with photos and videos

When uploading, modifying, or removing photos, you will have to authenticate using one of the methods discussed in the Authentication section.

Requesting a list of photos

There are different ways to retrieve photos. The most common is to get a list of all of the photos in an album, but you can also retrieve recent photos from a user, or search photos from the public albums of other users.

Listing photos in an album

To get a feed listing all of the photos in an album with the id albumID, belonging to user userID, send an HTTP request like the following to Picasa Web Albums:

GET https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID

Note: The string default can be used in place of a real user ID, in which case the server will use the user ID of the user whose credentials were used to authenticate the request.

In this example, we're retrieving the album by its ID, which can be found in the <gphoto:id> element of the Album entry.

Note: The entries in a feed are ordered based upon the display order on the web site.

<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:app='http://www.w3.org/2007/app'
    xmlns:exif='http://schemas.google.com/photos/exif/2007'
    xmlns:georss='http://www.georss.org/georss'
    xmlns:gml='http://www.opengis.net/gml'
    xmlns:gphoto='http://schemas.google.com/photos/2007'
    xmlns:media='http://search.yahoo.com/mrss/'
    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
    xmlns:gd='http://schemas.google.com/g/2005'
    gd:etag='W/"A0MBR347eCp7ImA9WxRbFkQ."'>
  <id>https://picasaweb.google.com/data/feed/user/liz/albumid/albumID</id>
  <updated>2008-12-08T01:24:16.000Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/photos/2007#album' />
  <title>lolcats</title>
  <subtitle>Hilarious Felines</subtitle>
  <rights>public</rights>
  <icon>https://iconPath/Lolcats.jpg</icon>
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz/albumid/albumID' />
  <link rel='http://schemas.google.com/g/2005#post'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz/albumid/albumID' />
  <link rel='alternate' type='text/html'
    href='http://picasaweb.google.com/liz/Lolcats' />
  <link rel='http://schemas.google.com/photos/2007#slideshow'
    type='application/x-shockwave-flash'
    href='http://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fliz%2Falbumid%2FalbumID%3Falt%3Drss' />
  <link rel='http://schemas.google.com/photos/2007#report'
    type='text/html'
    href='http://picasaweb.google.com/lh/reportAbuse?uname=liz&amp;aid=albumID' />
  <link rel='http://schemas.google.com/acl/2007#accessControlList'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz/albumid/albumID/acl' />
  <link rel='self' type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz/albumid/albumID?start-index=1&amp;max-results=1000&amp;v=2' />
  <author>
    <name>Liz</name>
    <uri>http://picasaweb.google.com/liz</uri>
  </author>
  <generator version='1.00' uri='http://picasaweb.google.com/'>
    Picasaweb</generator>
  <openSearch:totalResults>1</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>1000</openSearch:itemsPerPage>
  <gphoto:id>albumID</gphoto:id>
  <gphoto:location>Mountain View, CA, USA</gphoto:location>
  <gphoto:access>public</gphoto:access>
  <gphoto:timestamp>1150527600000</gphoto:timestamp>
  <gphoto:numphotos>1</gphoto:numphotos>
  <gphoto:numphotosremaining>499</gphoto:numphotosremaining>
  <gphoto:bytesUsed>23044</gphoto:bytesUsed>
  <gphoto:user>liz</gphoto:user>
  <gphoto:nickname>Liz</gphoto:nickname>
  <georss:where>
    <gml:Point>
      <gml:pos>37.38911780598221 -122.08638668060303</gml:pos>
    </gml:Point>
    <gml:Envelope>
      <gml:lowerCorner>37.38482151758655 -122.0958924293518</gml:lowerCorner>
      <gml:upperCorner>37.39341409437787 -122.07688093185425</gml:upperCorner>
    </gml:Envelope>
  </georss:where>
  <gphoto:allowPrints>true</gphoto:allowPrints>
  <gphoto:allowDownloads>true</gphoto:allowDownloads>
  <entry gd:etag='"Qns7fDVSLyp7ImA9WxRbFkQCQQI."'>
    <id>http://picasaweb.google.com/data/entry/user/liz/albumid/albumID/photoid/photoID</id>
    <published>2008-08-15T18:58:44.000Z</published>
    <updated>2008-12-08T01:11:03.000Z</updated>
    <app:edited>2008-12-08T01:11:03.000Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/photos/2007#photo' />
    <title type='text'>invisible_bike.jpg</title>
    <summary type='text'>Bike</summary>
    <content type='image/jpeg'
      src='http://photoPath/invisible_bike.jpg' />
    <link rel='http://schemas.google.com/g/2005#feed'
      type='application/atom+xml'
      href='https://picasaweb.google.com/data/feed/api/user/liz/albumid/albumID/photoid/photoID' />
    <link rel='alternate' type='text/html'
      href='http://picasaweb.google.com/liz/Lolcats#photoID' />
    <link rel='http://schemas.google.com/photos/2007#canonical'
      type='text/html'
      href='http://picasaweb.google.com/lh/photo/THdOPB27qGrofntiI91-8w' />
    <link rel='self' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/photoid/photoID' />
    <link rel='edit' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/photoid/photoID' />
    <link rel='edit-media' type='image/jpeg'
      href='https://picasaweb.google.com/data/media/api/user/liz/albumid/albumID/photoid/photoID' />
    <link rel='http://schemas.google.com/photos/2007#report'
      type='text/html'
      href='http://picasaweb.google.com/lh/reportAbuse?uname=liz&amp;aid=albumID&amp;iid=photoID' />
    <gphoto:id>photoID</gphoto:id>
    <gphoto:position>1.66002086E9</gphoto:position>
    <gphoto:albumid>albumID</gphoto:albumid>
    <gphoto:access>public</gphoto:access>
    <gphoto:width>410</gphoto:width>
    <gphoto:height>295</gphoto:height>
    <gphoto:size>23044</gphoto:size>
    <gphoto:client />
    <gphoto:checksum />
    <gphoto:timestamp>1218826724000</gphoto:timestamp>
    <gphoto:commentCount>0</gphoto:commentCount>
    <exif:tags>
      <exif:imageUniqueID>0657130896bace739a44ce90a7d5b451</exif:imageUniqueID>
    </exif:tags>
    <media:group>
      <media:content url='https://photoPath/invisible_bike.jpg'
        height='295' width='410' type='image/jpeg' medium='image' />
      <media:credit>Liz</media:credit>
      <media:description type='plain'></media:description>
      <media:keywords>invisible, bike</media:keywords>
      <media:thumbnail url='https://thumbnailPath/s72/invisible_bike.jpg'
        height='52' width='72' />
      <media:thumbnail url='https://thumbnailPath/s144/invisible_bike.jpg'
        height='104' width='144' />
      <media:thumbnail url='https://thumbnailPath/s288/invisible_bike.jpg'
        height='208' width='288' />
      <media:title type='plain'>invisible_bike.jpg</media:title>
    </media:group>
    <georss:where>
      <gml:Point>
        <gml:pos>37.427399548633325 -122.1703290939331</gml:pos>
      </gml:Point>
      <gml:Envelope>
        <gml:lowerCorner>37.42054944692195 -122.1825385093689</gml:lowerCorner>
        <gml:upperCorner>37.4342496503447 -122.15811967849731</gml:upperCorner>
      </gml:Envelope>
    </georss:where>
  </entry>
</feed>

Listing photos recently uploaded

It is also possible to retrieve the photos associated with a user, but without specifying any particular album. The following request retrieves the last 10 photos uploaded by userID:

GET https://picasaweb.google.com/data/feed/api/user/userID?kind=photo&max-results=10

For more information about the query parameters that can be used with the API, consult the query parameters section of the Reference Guide.

Listing photos by community search

With the API, you can search photos uploaded by other users, as long as they are in a public album. The following request retrieves 10 photos matching a search for "puppy":

GET https://picasaweb.google.com/data/feed/api/all?q=puppy&max-results=10

This will return a feed that looks similar to the following:

<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:exif='http://schemas.google.com/photos/exif/2007'
    xmlns:gphoto='http://schemas.google.com/photos/2007'
    xmlns:media='http://search.yahoo.com/mrss/'
    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
    xmlns:gd='http://schemas.google.com/g/2005'
    gd:etag='W/"AkMNQH47eCp7ImA9WxVVFEs."'>
  <id>http://picasaweb.google.com/data/feed/all</id>
  <updated>2009-03-07T23:28:11.000Z</updated>
  <title>Search Results</title>
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/all' />
  <link rel='self' type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/all?q=puppy&amp;start-index=1&amp;max-results=10&amp;v=2' />
  <link rel='next' type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/all?q=puppy&amp;start-index=11&amp;max-results=10&amp;v=2' />
  <generator version='1.00' uri='http://picasaweb.google.com/'>
    Picasaweb</generator>
  <openSearch:totalResults>1058343</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>10</openSearch:itemsPerPage>
  <gphoto:crowded_length>100</gphoto:crowded_length>
  <entry gd:etag='W/"DUIMQX47eCp7ImA9WxVVFEs."'>
    <id>
      http://picasaweb.google.com/data/entry/user/leangipima/albumid/5310560322838778321/photoid/5310587822172159186</id>
    <published>2009-03-07T23:13:00.000Z</published>
    <updated>2009-03-07T23:13:00.000Z</updated>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/photos/2007#photo' />
    <title>Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg</title>
    <summary>Leangi Pima Bearded Collie 3 weeks old
      puppies</summary>
    <content type='image/jpeg'
      src='http://lh5.ggpht.com/_QGFHG3wSwFw/SbL_fNEWPNI/AAAAAAAAFvg/ciZiBxQnJIw/Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg' />
    <link rel='http://schemas.google.com/g/2005#feed'
      type='application/atom+xml'
      href='https://picasaweb.google.com/data/feed/api/user/leangipima/albumid/5310560322838778321/photoid/5310587822172159186' />
    <link rel='alternate' type='text/html'
      href='http://picasaweb.google.com/leangipima/BeardedCollieALitterStarsAtSeaZestfulVictoryFirstprizebearsEisenhower#5310587822172159186' />
    <link rel='http://schemas.google.com/photos/2007#canonical'
      type='text/html'
      href='http://picasaweb.google.com/lh/photo/ftAWeRbvJAOytrHHJlrCRQ' />
    <link rel='self' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/leangipima/albumid/5310560322838778321/photoid/5310587822172159186' />
    <link rel='http://schemas.google.com/photos/2007#report'
      type='text/html'
      href='http://picasaweb.google.com/lh/reportAbuse?uname=leangipima&amp;aid=5310560322838778321&amp;iid=5310587822172159186' />
    <author>
      <name>Leangi Pima</name>
      <uri>http://picasaweb.google.com/leangipima</uri>
      <email>leangipima</email>
      <gphoto:user>leangipima</gphoto:user>
      <gphoto:nickname>Leangi Pima</gphoto:nickname>
      <gphoto:thumbnail>
        https://lh5.googleusercontent.com/_QGFHG3wSwFw/AAAAnnz9V-s/AAAAAAAAAAA/CBUJRErBX4E/s48-c/leangipima.jpg</gphoto:thumbnail>
    </author>
    <gphoto:id>5310587822172159186</gphoto:id>
    <gphoto:albumid>5310560322838778321</gphoto:albumid>
    <gphoto:access>public</gphoto:access>
    <gphoto:width>480</gphoto:width>
    <gphoto:height>640</gphoto:height>
    <gphoto:timestamp>1232983573000</gphoto:timestamp>
    <exif:tags>
      <exif:fstop>2.8</exif:fstop>
      <exif:make>Canon</exif:make>
      <exif:model>Canon PowerShot A610</exif:model>
      <exif:exposure>0.016666668</exif:exposure>
      <exif:flash>true</exif:flash>
      <exif:focallength>7.3</exif:focallength>
      <exif:time>1232983573000</exif:time>
    </exif:tags>
    <media:group>
      <media:content url='https://lh5.googleusercontent.com/_QGFHG3wSwFw/SbL_fNEWPNI/AAAAAAAAFvg/ciZiBxQnJIw/Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg'
        height='640' width='480' type='image/jpeg' medium='image' />
      <media:credit>Leangi Pima</media:credit>
      <media:description type='plain'>Leangi Pima Bearded Collie 3
        weeks old puppies</media:description>
      <media:keywords>Bearded Collie, Beardie, bradati koli,
        bradati skotski ovcar, Firstprizebears Eisenhower, Leangi
        Pima, leangipima, litter, puppies, puppy, Stars at Sea
        Zestful Victory</media:keywords>
      <media:thumbnail url='https://lh5.googleusercontent.com/_QGFHG3wSwFw/SbL_fNEWPNI/AAAAAAAAFvg/ciZiBxQnJIw/s72/Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg'
        height='72' width='54' />
      <media:thumbnail url='https://lh5.googleusercontent.com/_QGFHG3wSwFw/SbL_fNEWPNI/AAAAAAAAFvg/ciZiBxQnJIw/s144/Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg'
        height='144' width='108' />
      <media:thumbnail url='https://lh5.googleusercontent.com/_QGFHG3wSwFw/SbL_fNEWPNI/AAAAAAAAFvg/ciZiBxQnJIw/s288/Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg'
        height='288' width='216' />
      <media:title type='plain'>
        Leangi_Pima_Bearded_Collie_puppies_3w_40.jpg</media:title>
    </media:group>
    <gphoto:albumtitle>Bearded Collie - A-litter - Stars at Sea
      Zestful Victory &amp; Firstprizebears
      Eisenhower</gphoto:albumtitle>
    <gphoto:albumdesc>Leangi Pima Bearded Collie
      puppies</gphoto:albumdesc>
    <gphoto:location>Belgrade, Serbia, Leangi Pima
      kennel</gphoto:location>
    <gphoto:snippet>... old
      &lt;b&gt;puppies&lt;/b&gt;</gphoto:snippet>
    <gphoto:snippettype>PHOTO_DESCRIPTION</gphoto:snippettype>
    <gphoto:truncated>0</gphoto:truncated>
  </entry>
  ...Nine other entries here...
</feed>

Retrieving a photo again

If you want to retrieve a photo that you've retrieved before, you can improve efficiency by telling Picasa Web Albums to send the photo only if it has changed since the last time you retrieved it.

To do this sort of conditional retrieval, send an HTTP GET request that includes an HTTP If-None-Match header. In the header, specify the photo's ETag, which you can find in the <entry> element's gd:etag attribute.

For example:

If-None-Match: "Qns7fDVSLyp7ImA9WxRbFkQCQQI."

When Picasa Web Albums receives this request, it checks to see whether the photo that you requested has the same ETag as the ETag you specified. If the ETags match, then the entry hasn't changed, and Picasa Web Albums returns an HTTP 304 Not Modified status code.

If the ETags don't match, then the photo has been modified since the last time you requested it, and Picasa Web Albums returns the photo.

For more information about ETags, see the Google Data APIs reference guide.

Posting a new photo

There are two ways to add a photo to an album using the Data API:

  • Upload the binary image data along with its metadata. To do this, use MIME content type "multipart/related"; send photo metadata in one part of the POST body, and binary-encoded image data in another part. This is the preferred approach.
  • Upload the binary image data without the metadata.

While all photos appearing on the Picasa Web Albums site are in the JPEG format, photos of any of the following types can be uploaded using the API:

  • image/bmp
  • image/gif
  • image/jpeg
  • image/png

Posting a photo with metadata

To send metadata along with the photo, post to the following URL:

https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID

And use the following format for the body of the POST:

Content-Type: multipart/related; boundary="END_OF_PART"
Content-Length: 423478347
MIME-version: 1.0

Media multipart posting
--END_OF_PART
Content-Type: application/atom+xml

<entry xmlns='http://www.w3.org/2005/Atom'>
  <title>plz-to-love-realcat.jpg</title>
  <summary>Real cat wants attention too.</summary>
  <category scheme="http://schemas.google.com/g/2005#kind"
    term="http://schemas.google.com/photos/2007#photo"/>
</entry>
--END_OF_PART
Content-Type: image/jpeg

...binary image data...
--END_OF_PART--

Note that the <title> element contains the filename you want to use for the image.

Posting a photo without metadata

To send a photo without its associated metadata, post to the following URL:

https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID

And use the following format for the body of the POST:

Content-Type: image/jpeg
Content-Length: 47899
Slug: plz-to-love-realcat.jpg

...binary image data goes here...

The optional Slug: HTTP header specifies a filename for Picasa Web Albums to use for the photo. Not specifying a Slug: causes the server to use a default title for the image.

Note: If you want to post a photo, but don't want the hassle of requiring the user of your app to choose an album, you can post the photo to the "Drop Box." This special album will automatically be created the first time it is used to store a photo. To post to the Drop Box, use an albumID value of default: https://picasaweb.google.com/data/feed/api/user/default/albumid/default.

Posting a new video

A video is posted in the same way as a photo with metadata. Instead of an image MIME type you have to use an appropriate video MIME type. The recognized video MIME types are:

  • video/3gpp
  • video/avi
  • video/quicktime
  • video/mp4
  • video/mpeg
  • video/mpeg4
  • video/msvideo
  • video/x-ms-asf
  • video/x-ms-wmv
  • video/x-msvideo

Note: You cannot submit a video without metadata at this time. You must use a MIME multipart request like in the Posting a photo with metadata section.

Videos have to undergo some processing before they become available for streaming. In order to monitor the current processing state, the photo entry returned after posting a new video will contain an additional <gphoto:videostatus> element. The element can also be found in the photo feeds. The four possible values of the status element are:

  • pending: the video is still being processed
  • ready: the video has been processed but still needs a thumbnail
  • final: the video has been processed and has received a thumbnail
  • failed: a processing error has occured and the video should be deleted

Usually a video can be streamed/played or accessed at the URL provided in the <media:group> section of the entry feed shortly after reaching the status ready or final. The <media:content ... medium="video"> element will contain the URL to the FLV video stream.

Providing your own video thumbnail

Normally the video processing system will automatically provide a thumbnail at the end of the processing stage. This thumbnail is created from one of the first few frames of the video. Instead, you can provide your own thumbnail by simply following the steps outlined under Updating a photo. You can do this at any time while the video is still being processed or afterwards. Automatically provided thumbnails always come at QVGA resolution (320x240 pixels). To account for larger than 4:3 aspect ratios (e.g. 16:9), black borders will be added to the top and bottom of the thumbnail image.

Limitations

All uploaded videos are processed and converted into streaming formats that can be played back using the Flash video player integrated into the Picasa Web Albums one-up view.

Two streaming formats are currently created: the H.263-based FLV320 with a maximum resolution of 320 by 240 pixels, and an mp4 stream with a maximum resolution of 480 x 360 pixels.

In both cases, the maximum upload size is 100MB.

You can't currently download original video files. However, you can download the FLV video stream or the mp4 video stream by using the URLs from the <media:content> video elements provided in the photo entry or feed. There's one <media:content> element for each video stream.

Updating a photo

You can replace the metadata and/or the binary image data for a photo. The following sections explain how.

In each case, to make sure that your update doesn't overwrite another client's changes, include an HTTP If-Match header that contains the original photo's ETag value. You can determine the original photo's ETag value by examining the <entry> element's gd:etag attribute.

If you want to update the photo regardless of whether someone else has updated it since you retrieved it, then use If-Match: * and don't include the ETag.

For more information about ETags, see the Google Data APIs reference guide.

Updating a photo and its metadata

To replace both the binary data and metadata for the photo that you inserted earlier, use an HTTP request like the following:

PUT https://picasaweb.google.com/data/media/api/user/userID/albumid/albumID/photoid/photoID

The URL is the value of the <link rel="edit-media"> tag that was returned after you did the earlier POST.

In the body of the PUT, include the updated metadata and image data, in the same multipart format that you used to do the POST with metadata.

Note: With PUT, you can't do a partial update of an entry; you have to send the full entry data to replace the existing data. You can, however, use PUT to send only the metadata or only the image, as described in the following sections.

In order to make other types partial updates, you must use PATCH. See the section on partial updates for details.

Updating only the photo

To replace only the photo's binary data, use the following HTTP request:

PUT https://picasaweb.google.com/data/media/api/user/userID/albumid/albumID/photoid/photoID

The URL is the value of the <link rel="edit-media"> tag that was returned after you did the earlier POST.

In the body of the PUT, include the replacement image data, in the same format that you used to do the POST without metadata.

Updating only the metadata

To replace only the photo's metadata (and not the image itself), you follow the steps that you would follow to send an update to a non-media feed.

In particular, send the following HTTP request:

PUT https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID/photoid/photoID

The URL is the value of the <link rel="edit"> tag that was returned after you did the earlier POST.

In the body of the PUT, provide the updated metadata, in the form of an <atom:entry> element containing image metadata.

Note: You can't use PUT to do a partial update of an entry; you have to send the full entry metadata to replace the existing metadata.

To do partial updates, you must use PATCH. See the section on partial updates for details.

The photo itself is not re-sent to the server.

Deleting a photo

To delete a photo and its metadata, send an HTTP DELETE request to either the edit link or the edit-media link. In both cases, the photo and metadata are deleted.

For example, to delete the photo from the previous examples:

DELETE https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID/photoid/photoID

If you want to make sure that you don't delete a photo that has been changed by another client since you retrieved it, include an HTTP If-Match header that contains the original photo's ETag value. You can determine the original photo's ETag value by examining the <entry> element's gd:etag attribute.

If you want to delete the photo regardless of whether someone else has updated it since you retrieved it, then use If-Match: * and don't include the ETag. (In this case, you don't need to retrieve the photo before deleting it.)

For more information about ETags, see the Google Data APIs reference guide.

Working with tags

Tags are a convenient way to label and organize your photos. By associating photos with descriptive strings, it makes searching through large quantities of photos easier.

Note: Picasa Web Albums tags are unrelated to ETags, and both are unrelated to the <exif:tags> element.

Retrieving a list of tags

Your program can retrieve a list of tags that are used by a user, in a particular album, or that are associated with a particular photo.

Listing tags by user

The following request returns a feed of the tags that userID has used in photos in their albums:

GET https://picasaweb.google.com/data/feed/api/user/userID?kind=tag

Note: The string "default" can be used in place of a real user ID, in which case the server will use the user ID of the user whose credentials were used to authenticate the request.

The feed will look similar to the following:

<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:gphoto='http://schemas.google.com/photos/2007'
    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
    xmlns:gd='http://schemas.google.com/g/2005'
    gd:etag='W/"CkcAQXc-eSp7ImA9WxJTFUk."'>
  <id>http://picasaweb.google.com/data/feed/user/liz</id>
  <updated>2009-04-24T02:27:20.951Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/photos/2007#user' />
  <title>liz</title>
  <subtitle />
  <icon>https://iconPath/liz.jpg</icon>
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz' />
  <link rel='alternate' type='text/html'
    href='http://picasaweb.google.com/liz' />
  <link rel='http://schemas.google.com/photos/2007#slideshow'
    type='application/x-shockwave-flash'
    href='http://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fliz%3Falt%3Drss' />
  <link rel='self' type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz?start-index=1&amp;max-results=500&amp;kind=tag&amp;v=2' />
  <author>
    <name>Liz</name>
    <uri>http://picasaweb.google.com/liz</uri>
  </author>
  <generator version='1.00' uri='http://picasaweb.google.com/'>
    Picasaweb</generator>
  <openSearch:totalResults>2</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>500</openSearch:itemsPerPage>
  <gphoto:user>liz</gphoto:user>
  <gphoto:nickname>Liz</gphoto:nickname>
  <gphoto:thumbnail>
    https://thumbnailPath/liz.jpg</gphoto:thumbnail>
  <gphoto:quotalimit>1073741824</gphoto:quotalimit>
  <gphoto:quotacurrent>23044</gphoto:quotacurrent>
  <gphoto:maxPhotosPerAlbum>500</gphoto:maxPhotosPerAlbum>
  <entry gd:etag='W/"CkcAQXc-eSp7ImA9WxJTFUk."'>
    <id>http://picasaweb.google.com/data/entry/user/liz/tag/invisible</id>
    <updated>2009-04-24T02:27:20.951Z</updated>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/photos/2007#tag' />
    <title>invisible</title>
    <summary>invisible</summary>
    <link rel='alternate' type='text/html'
      href='http://picasaweb.google.com/lh/searchbrowse?q=invisible&amp;psc=G&amp;uname=liz&amp;filter=0' />
    <link rel='self' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/tag/invisible' />
    <author>
      <name>Liz</name>
      <uri>http://picasaweb.google.com/liz</uri>
    </author>
  </entry>
  ...[Another entry here]...
</feed>

Listing tags by album

The following request will return a feed of tags that userID has tagged photos with in the album with ID albumID.

https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID?kind=tag

Listing tags by photo

The following request will return a feed of tags that userID has tagged the photo identified by photoID with in the album with ID albumID. You can inspect the <gphoto:id> element of a photo entry to find a value for photoID.

https://picasaweb.google.com/data/feed/api/user/default/albumid/albumID/photoid/photoID?kind=tag

Note that this same information is available inside of the <media:keywords> element of the photo itself in a comma separated format.

Searching photos using tags

The following request uses the tag parameter to search for all photos belonging to userID that are tagged with both "foo" and "bar".

https://picasaweb.google.com/data/feed/api/user/userID?kind=photo&tag=foo,bar

Note: You can search for photos in a particular album by adding the album ID to the end of the feed. Also, the comma should be percent-escaped to "%2C" in your actual request.

Adding a tag to a photo

The following request adds the tag "awesome" to the photo identified by photoID, in the album with ID albumID which is owned by userID.

POST https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID/photoid/photoID

<entry xmlns='http://www.w3.org/2005/Atom'>
  <title>awesome</title>
  <category scheme="http://schemas.google.com/g/2005#kind"
    term="http://schemas.google.com/photos/2007#tag"/>
</entry>

Note that this can also be done in bulk as described in the Updating a photo section using the <media:keywords> element.

Deleting a tag from a photo

To delete a tag, send an HTTP DELETE request to that tag's edit link:

DELETE https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID/photoid/photoID/tag/tagID

Working with comments

Comments are short text snippets attached to photos by Picasa Web Albums users.

Retrieving a list of comments

The following request returns a feed of the 10 most recent comments on a userID's photos.

The string "default" can be used in place of a real userID, in which case the server will use the userID of the user credentials used to authenticate the request.

GET https://picasaweb.google.com/data/feed/api/user/default?kind=comment&max-results=10

The resulting feed will look similar to the following:

<?xml version='1.0' encoding='utf-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:app='http://www.w3.org/2007/app'
    xmlns:gphoto='http://schemas.google.com/photos/2007'
    xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/'
    xmlns:gd='http://schemas.google.com/g/2005'
    gd:etag='W/"CEUDRHg8eSp7ImA9WxJTFUk."'>
  <id>http://picasaweb.google.com/data/feed/user/liz</id>
  <updated>2009-04-24T03:04:35.671Z</updated>
  <category scheme='http://schemas.google.com/g/2005#kind'
    term='http://schemas.google.com/photos/2007#user' />
  <title>liz</title>
  <subtitle />
  <icon>
    https://iconPath/liz.jpg</icon>
  <link rel='http://schemas.google.com/g/2005#feed'
    type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz' />
  <link rel='alternate' type='text/html'
    href='http://picasaweb.google.com/liz' />
  <link rel='http://schemas.google.com/photos/2007#slideshow'
    type='application/x-shockwave-flash'
    href='http://picasaweb.google.com/s/c/bin/slideshow.swf?host=picasaweb.google.com&amp;RGB=0x000000&amp;feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fliz%3Falt%3Drss' />
  <link rel='self' type='application/atom+xml'
    href='https://picasaweb.google.com/data/feed/api/user/liz?start-index=1&amp;max-results=10&amp;kind=comment&amp;v=2' />
  <author>
    <name>Liz</name>
    <uri>http://picasaweb.google.com/liz</uri>
  </author>
  <generator version='1.00' uri='http://picasaweb.google.com/'>
    Picasaweb</generator>
  <openSearch:totalResults>3</openSearch:totalResults>
  <openSearch:startIndex>1</openSearch:startIndex>
  <openSearch:itemsPerPage>10</openSearch:itemsPerPage>
  <gphoto:user>liz</gphoto:user>
  <gphoto:nickname>Liz</gphoto:nickname>
  <gphoto:thumbnail>
    https://thumbnailPath/liz.jpg</gphoto:thumbnail>
  <gphoto:quotalimit>1073741824</gphoto:quotalimit>
  <gphoto:quotacurrent>23044</gphoto:quotacurrent>
  <gphoto:maxPhotosPerAlbum>500</gphoto:maxPhotosPerAlbum>
  <entry gd:etag='W/"A0cGQX47eCp7ImA9WB5RFk8."'>
    <id>
      http://picasaweb.google.com/data/entry/user/liz/albumid/albumID/photoid/photoID/commentid/commentID</id>
    <published>2007-06-23T20:03:40.000Z</published>
    <updated>2007-06-23T20:03:40.000Z</updated>
    <app:edited>2007-06-23T20:03:40.000Z</app:edited>
    <category scheme='http://schemas.google.com/g/2005#kind'
      term='http://schemas.google.com/photos/2007#comment' />
    <title>Darcy</title>
    <content>I say! What an amusing image!</content>
    <link rel='alternate' type='text/html'
      href='http://picasaweb.google.com/lh/photo/EtlFQvsZI9NxSfRbaZCSXQ' />
    <link rel='self' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/photoid/photoID/commentid/commentID' />
    <link rel='edit' type='application/atom+xml'
      href='https://picasaweb.google.com/data/entry/api/user/liz/albumid/albumID/photoid/photoID/commentid/commentID' />
    <author>
      <name>Darcy</name>
      <uri>http://picasaweb.google.com/darcy</uri>
      <gphoto:user>darcy</gphoto:user>
      <gphoto:nickname>Darcy</gphoto:nickname>
      <gphoto:thumbnail>
        https://thumbnailPath/darcy.jpg</gphoto:thumbnail>
    </author>
    <gphoto:id>commentID</gphoto:id>
    <gphoto:photoid>photoID</gphoto:photoid>
  </entry>
  ...[Other entries here]...
</feed>

Listing comments by photo

You can also retrieve all of the comments associated with a particular photo. The following response retrieves a feed of the comments on the photo identified by photoID, inside of the album with ID albumID, owned by the user userID.

GET https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID/photoid/photoID?kind=comment

Adding comments to a photo

The following request adds the comment "great photo!" to the photo identified by photoID in the album with ID albumID owned by userID.

POST https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID/photoid/photoID

<entry xmlns='http://www.w3.org/2005/Atom'>
  <content>great photo!</content>
  <category scheme="http://schemas.google.com/g/2005#kind"
    term="http://schemas.google.com/photos/2007#comment"/>
</entry>

Deleting a comment from a photo

To delete a comment, you can use a HTTP DELETE on that comment's edit link:

DELETE https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID/photoid/photoID/commentid/commentID

 

Back to top

Special features

Some special features are available to help you optimize your Picasa Web Albums Data API requests.

Requesting a partial response (Experimental)

If there are many items in a feed, the XML that is returned by the server can be quite long. With the Picasa Web Albums Data API, you can ask for only the feed or entry information you need at the given point in your application. By requesting a partial response, you can significantly reduce the overhead of transferring and parsing unneeded data.

To request a partial response, use the fields query parameter. The following example shows a request that returns only the information needed when providing a quick rendering of all albums, where the thumbnails link to the albums themselves. The fields parameter value specifies that the response should include only album titles, number of photos, and thumbnail image URL, along with the URL for the album feed, for each album in the user's account:

Note: As with all query parameter values, the fields parameter value must be URL encoded. For better readability, the example below omits the encoding.

GET https://picasaweb.google.com/data/feed/api/user/photosapi?kind=album&v=2.0&fields=entry(title,gphoto:numphotos,media:group(media:thumbnail),link[@rel='http://schemas.google.com/g/2005#feed'](@href))

This request eliminates a large amount of irrelevant data from the server's response (in this case, there was more than a 75% reduction in bytes transferred):

<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom'
    xmlns:gphoto='http://schemas.google.com/photos/2007'
    xmlns:media='http://search.yahoo.com/mrss/'>
  <entry>
    <title>Macro Shots</title>
    <link href='https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID'/>
    <gphoto:numphotos>5</gphoto:numphotos>
    <media:group>
      <media:thumbnail url='https://thumbnailPath/MacroShots.jpg' height='160' width='160'/>
    </media:group>
  </entry>
  <entry>
    <title>Politicians</title>
    <link href='https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID'/>
    <gphoto:numphotos>5</gphoto:numphotos>
    <media:group>
      <media:thumbnail url='https://thumbnailPath/Politicians.jpg' height='160' width='160'/>
    </media:group>
  </entry>
  <entry>
    <title>Actors</title>
    <link href='https://picasaweb.google.com/data/feed/api/user/userID/albumid/albumID'/>
    <gphoto:numphotos>2</gphoto:numphotos>
    <media:group>
      <media:thumbnail url='https://thumbnailPath/Actors.jpg height='160' width='160'/>
    </media:group>
  </entry> ...more entries here... </feed>

You can use partial response with any Picasa Web Albums request that returns data, including GET, POST, and PUT, as well as PATCH, which is used for making partial update requests.

Note: If you want to use the result of a partial response as the basis of a subsequent PATCH request, it can be useful to include the ETag and edit link information in the results: fields='entry(@gd:*,link[@rel="edit"](@href),...)

For more information about partial response, see the Google Data Protocol reference guide.

Making a partial update (Experimental)

You can also make changes using a partial resource representation. With partial update, you send only the changes, rather than a modified version of the full resource representation.

To make a partial update request, use PATCH instead of PUT. You send the PATCH request to the same edit URI that you normally use with PUT. The data you send is a partial entry that represents the changes you want to make to the target resource.

Note: The Picasa Web Albums API is non-standard in that it does not allow fields to be deleted. As a result, it does not support the gd:fields attribute with PATCH requests. (Normally you use a gd:fields entry attribute with PATCH to specify which fields are to be deleted from the target resource.)

For more information on PATCH semantics, see Partial update in the protocol reference document.

The example below shows a PATCH request that changes the visibility setting for an album to make it unlisted. The partial entry has a <gphoto:access> with a value of 'private'. When this is sent with a PATCH request, the data provided is merged with the target resource. Effecitvely, the new access value replaces the old one for the target album.

PATCH https://picasaweb.google.com/data/entry/api/user/userID/albumid/albumID
Content-Type: application/xml
GData-Version: 2
If-Match: *

<entry xmlns='http://www.w3.org/2005/Atom
    xmlns:gphoto='http://schemas.google.com/photos/2007'>
  <gphoto:access>private</gphoto:access>
</entry>

After processing a valid PATCH request, the server returns an HTTP 200 status code, along with a copy of the full representation of the updated entry.

If you prefer to have the server return only certain elements or attributes, you can use the fields query parameter with PATCH to request a partial response.

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.