Google+ Platform

Activities

An activity is a note that a user posts to their stream. Activity methods enable your application to list a collection of activities, get an activity and search through activities.

For a list of methods for this resource, see the end of this page.

Resource representations

An activity is represented in the Google+ API as a JSON data structure, as shown below, that is sent in the body of a request, or received in the body of a response. This representation is the set of all possible fields an activity can contain.

Each activity has an actor, verb and object, where the default verb is "post" and default objectType is "note". The note's text is specified in content, and its photo, video or location are specified in the attachments array. The access property specifies with whom the activity is shared.

{
  "kind": "plus#activity",
  "etag": etag,
  "title": string,
  "published": datetime,
  "updated": datetime,
  "id": string,
  "url": string,
  "actor": {
    "id": string,
    "displayName": string,
    "name": {
      "familyName": string,
      "givenName": string
    },
    "url": string,
    "image": {
      "url": string
    }
  },
  "verb": string,
  "object": {
    "objectType": string,
    "id": string,
    "actor": {
      "id": string,
      "displayName": string,
      "url": string,
      "image": {
        "url": string
      }
    },
    "content": string,
    "originalContent": string,
    "url": string,
    "replies": {
      "totalItems": unsigned integer,
      "selfLink": string
    },
    "plusoners": {
      "totalItems": unsigned integer,
      "selfLink": string
    },
    "resharers": {
      "totalItems": unsigned integer,
      "selfLink": string
    },
    "attachments": [
      {
        "objectType": string,
        "displayName": string,
        "id": string,
        "content": string,
        "url": string,
        "image": {
          "url": string,
          "type": string,
          "height": unsigned integer,
          "width": unsigned integer
        },
        "fullImage": {
          "url": string,
          "type": string,
          "height": unsigned integer,
          "width": unsigned integer
        },
        "embed": {
          "url": string,
          "type": string
        },
        "thumbnails": [
          {
            "url": string,
            "description": string,
            "image": {
              "url": string,
              "type": string,
              "height": unsigned integer,
              "width": unsigned integer
            }
          }
        ]
      }
    ]
  },
  "annotation": string,
  "crosspostSource": string,
  "provider": {
    "title": string
  },
  "access": {
    "kind": "plus#acl",
    "description": string,
    "items": [
      {
        "type": string,
        "id": string,
        "displayName": string
      }
    ]
  },
  "geocode": string,
  "address": string,
  "radius": string,
  "placeId": string,
  "placeName": string,
  "location": {
    "kind": "plus#place",
    "displayName": string,
    "position": {
      "latitude": double,
      "longitude": double
    },
    "address": {
      "formatted": string
    }
  }
}
Property name Value Description Notes
kind string Identifies this resource as an activity. Value: "plus#activity".
title string Title of this activity.
published datetime The time at which this activity was initially published. Formatted as an RFC 3339 timestamp.
updated datetime The time at which this activity was last updated. Formatted as an RFC 3339 timestamp.
id string The ID of this activity.
url string The link to this activity.
actor object The person who performed this activity.
actor.id string The ID of the actor's Person resource.
actor.displayName string The name of the actor, suitable for display.
actor.name object An object representation of the individual components of name.
actor.name.familyName string The family name ("last name") of the actor.
actor.name.givenName string The given name ("first name") of the actor.
actor.url string The link to the actor's Google profile.
actor.image object The image representation of the actor.
actor.image.url string The URL of the actor's profile photo. To resize the image and crop it to a square, append the query string ?sz=x, where x is the dimension in pixels of each side.
verb string This activity's verb, which indicates the action that was performed. Possible values include, but are not limited to, the following values:
  • "post" - Publish content to the stream.
  • "share" - Reshare an activity.
object object The object of this activity.
object.objectType string The type of the object. Possible values include, but are not limited to, the following values:
  • "note" - Textual content.
  • "activity" - A Google+ activity.
object.id string The ID of the object. When resharing an activity, this is the ID of the activity that is being reshared.
object.actor object If this activity's object is itself another activity, such as when a person reshares an activity, this property specifies the original activity's actor.
object.actor.id string ID of the original actor.
object.actor.displayName string The original actor's name, which is suitable for display.
object.actor.url string A link to the original actor's Google profile.
object.actor.image object The image representation of the original actor.
object.actor.image.url string A URL that points to a thumbnail photo of the original actor.
object.content string The HTML-formatted content, which is suitable for display.
object.originalContent string The content (text) as provided by the author, which is stored without any HTML formatting. When creating or updating an activity, this value must be supplied as plain text in the request.
object.url string The URL that points to the linked resource.
object.replies object Comments in reply to this activity.
object.replies.totalItems unsigned integer Total number of comments on this activity.
object.plusoners object People who +1'd this activity.
object.plusoners.totalItems unsigned integer Total number of people who +1'd this activity.
object.resharers object People who reshared this activity.
object.resharers.totalItems unsigned integer Total number of people who reshared this activity.
object.attachments[] list The media objects attached to this activity.
object.attachments[].objectType string The type of media object. Possible values include, but are not limited to, the following values:
  • "photo" - A photo.
  • "album" - A photo album.
  • "video" - A video.
  • "article" - An article, specified by a link.
object.attachments[].displayName string The title of the attachment, such as a photo caption or an article title.
object.attachments[].id string The ID of the attachment.
object.attachments[].content string If the attachment is an article, this property contains a snippet of text from the article. It can also include descriptions for other types.
object.attachments[].url string The link to the attachment, which should be of type text/html.
object.attachments[].image object The preview image for photos or videos.
object.attachments[].image.url string Image URL.
object.attachments[].image.type string Media type of the link.
object.attachments[].image.height unsigned integer The height, in pixels, of the linked resource.
object.attachments[].image.width unsigned integer The width, in pixels, of the linked resource.
object.attachments[].fullImage object The full image URL for photo attachments.
object.attachments[].fullImage.url string URL of the image.
object.attachments[].fullImage.type string Media type of the link.
object.attachments[].fullImage.height unsigned integer The height, in pixels, of the linked resource.
object.attachments[].fullImage.width unsigned integer The width, in pixels, of the linked resource.
object.attachments[].embed object If the attachment is a video, the embeddable link.
object.attachments[].embed.url string URL of the link.
object.attachments[].embed.type string Media type of the link.
annotation string Additional content added by the person who shared this activity, applicable only when resharing an activity.
crosspostSource string If this activity is a crosspost from another system, this property specifies the ID of the original activity.
provider object The service provider that initially published this activity.
provider.title string Name of the service provider.
access nested object Identifies who has access to see this activity.
access.kind string Identifies this resource as a collection of access controls. Value: "plus#acl".
access.description string Description of the access granted, suitable for display.
access.items[] list The list of access entries.
access.items[].type string The type of entry describing to whom access is granted. Possible values are:
  • "person" - Access to an individual.
  • "circle" - Access to members of a circle.
  • "myCircles" - Access to members of all the person's circles.
  • "extendedCircles" - Access to members of all the person's circles, plus all of the people in their circles.
  • "domain" - Access to members of the person's Google Apps domain.
  • "public" - Access to anyone on the web.
access.items[].id string The ID of the entry. For entries of type "person" or "circle", this is the ID of the resource. For other types, this property is not set.
geocode string Latitude and longitude where this activity occurred. Format is latitude followed by longitude, space separated.
address string Street address where this activity occurred.
radius string Radius, in meters, of the region where this activity occurred, centered at the latitude and longitude identified in geocode.
placeId string ID of the place where this activity occurred.
placeName string Name of the place where this activity occurred.
etag etag ETag of this response for caching purposes.
object.attachments[].thumbnails[] list If the attachment is an album, this property is a list of potential additional thumbnails from the album.
object.attachments[].thumbnails[].url string URL of the webpage containing the image.
object.attachments[].thumbnails[].description string Potential name of the thumbnail.
object.attachments[].thumbnails[].image object Image resource.
object.attachments[].thumbnails[].image.url string Image url.
object.attachments[].thumbnails[].image.type string Media type of the link.
object.attachments[].thumbnails[].image.height unsigned integer The height, in pixels, of the linked resource.
object.attachments[].thumbnails[].image.width unsigned integer The width, in pixels, of the linked resource.
access.items[].displayName string A descriptive name for this entry. Suitable for display.
location nested object The location where this activity occurred.
location.kind string Identifies this resource as a place. Value: "plus#place".
location.displayName string The display name of the place.
location.position object The position of the place.
location.position.latitude double The latitude of this position.
location.position.longitude double The longitude of this position.
location.address object The physical address of the place.
location.address.formatted string The formatted address for display.

Methods

list
List all of the activities in the specified collection for a particular user.
get
Get an activity.
search
Search public activities.

Authentication required

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

Signing you in...

Google Developers needs your permission to do that.