Abstract

This specification describes the Activity vocabulary.

Author's Note

This section is non-normative.

This draft is heavily influenced by the JSON Activity Streams 1.0 specification originally co-authored by Martin Atkins, Will Norris, Chris Messina, Monica Wilkinson, Rob Dolin and James Snell. The author is very thankful for their significant contributions and gladly stands on their shoulders. Some portions of the original text of Activity Streams 1.0 are used in this document.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

This document was published by the Social Web Working Group as a Working Draft. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to public-socialweb@w3.org (subscribe, archives). All comments are welcome.

Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 September 2015 W3C Process Document.

Table of Contents

1. Introduction

The Activity Streams 2.0 Core Syntax defines the JSON syntax for Activity Streams. This document defines the vocabulary properties.

The Activity Streams 2.0 Vocabulary defines a set of abstract classes and properties that describe past, present and future Activities. The vocabulary is defined in two parts:

  1. A Core set of properties describing the generalized structure of an Activity; and
  2. An Extended set of properties that cover specific types of Activities and Artifacts common to many social Web application systems.

While not all Activity Streams 2.0 implementations are expected to implement support for the Extended properties, all implementations MUST at least be capable of serializing and deserializing the Extended properties in accordance with the Activity Streams 2.0 Core Syntax.

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

1.1 Conventions

Unless otherwise specified, all properties defined as xsd:dateTime values MUST conform to the rules defined in Activity Streams 2.0 Core, Section 2.3.

The examples included in this document use the normative JSON serialization defined by this specification along with generally equivalent, non-normative Microdata, RDFa, Microformats, and Turtle serializations. These non-JSON alternatives are included solely for illustrative purposes.

1.1.1 Editor's Note

This section is non-normative.

The Microdata, RDFa and Microformats examples included in this document are purely informative and may not currently reflect actual implementation experience or accepted best practices for each format. These alternate serializations may be removed from future iterations of this document and moved to a separate informative WG Note.

2. Core Classes

The Activity Vocabulary Core Classes provide the basis for the rest of the vocabulary.

Base URI: http://www.w3.org/ns/activitystreams#.

The Activity Streams 2.0 Core Classes include:

Class Description Example
Object URI: http://www.w3.org/ns/activitystreams#Object
Example 1
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Object",
  "id": "http://www.test.example/object/1",
  "name": "A Simple, non-specific object"
}
Notes: Describes an object of any kind. The Object class serves as the base class for most of the other kinds of objects defined in the Activity Vocabulary, including other Core classes such as Activity, IntransitiveActivity, Actor, Collection and OrderedCollection.
Disjoint With: Link
Properties:

attachment | attributedTo | content | context | name | endTime | generator | icon | image | inReplyTo | location | preview | published | replies | scope | startTime | summary | tag | updated | url | to | bto | cc | bcc | mediaType | duration

Link URI: http://www.w3.org/ns/activitystreams#Link
Example 6
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Link",
  "href": "http://example.org/abc",
  "hreflang": "en",
  "mediaType": "text/html",
  "name": "An example link"
}
Notes: A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or Link. When a Link is used, it establishes a qualified relation connecting the subject (the containing object) to the resource identified by the href.
Disjoint With: Object
Properties:

href | rel | mediaType | name | hreflang | height | width

Activity URI: http://www.w3.org/ns/activitystreams#Activity
Example 11
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Activity",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Note",
    "name": "A Note"
  }
}
Notes: An Activity is a subclass of Object that describes some form of action that may happen, is currently happening, or has already happened. The Activity class itself serves as an abstract base class for all types of activities. It is important to note that the Activity class itself does not carry any specific semantics about the kind of action being taken.
Extends: Object
Properties:

actor | object | target | result | origin | instrument

Inherits all properties from Object.

IntransitiveActivity URI: http://www.w3.org/ns/activitystreams#IntransitiveActivity
Example 16
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Travel",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "target": {
    "type": "Place",
    "name": "Work"
  }
}
Notes: Instances of IntransitiveActivity are a subclass of Activity whose actor property identifies the direct object of the action as opposed to using the object property.
Extends: Activity
Properties:

Inherits all properties from Activity except object.

Actor URI: http://www.w3.org/ns/activitystreams#Actor
Example 21
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Actor",
  "name": "Sally"
}
Notes: An Actor is any entity that is capable of being the primary actor for an Activity.
Extends: Object
Properties:

Inherits all properties from Object.

Collection URI: http://www.w3.org/ns/activitystreams#Collection
Example 26
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 2,
  "items": [
    {
      "type": "Note",
      "name": "A Simple Note"
    },
    {
      "type": "Note",
      "name": "Another Simple Note"
    }
  ]
}
Notes:

A Collection is a subclass of Object that represents ordered or unordered sets of Object or Link instances.

Refer to the Activity Streams 2.0 Core specification for a complete description of the Collection type.

Extends: Object
Properties:

totalItems | current | first | last | items

Inherits all properties from Object.

OrderedCollection URI: http://www.w3.org/ns/activitystreams#OrderedCollection
Example 31
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "OrderedCollection",
  "totalItems": 2,
  "orderedItems": [
    {
      "type": "Note",
      "name": "A Simple Note"
    },
    {
      "type": "Note",
      "name": "Another Simple Note"
    }
  ]
}
Notes:

A subclass of Collection in which members of the logical collection are assumed to always be strictly ordered.

Extends: Collection
Properties:

Inherits all properties from Collection.

CollectionPage URI: http://www.w3.org/ns/activitystreams#CollectionPage
Example 36
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "CollectionPage",
  "id": "http://example.org/foo?page=1",
  "partOf": "http://example.org/foo",
  "items": [
    {
      "type": "Note",
      "name": "A Simple Note"
    },
    {
      "type": "Note",
      "name": "Another Simple Note"
    }
  ]
}
Notes:

Used to represent distinct subsets of items from a Collection. Refer to the Activity Streams 2.0 Core for a complete description of the CollectionPage object.

Extends: Collection
Properties:

partOf | next | prev

Inherits all properties from Collection.

OrderedCollectionPage URI: http://www.w3.org/ns/activitystreams#OrderedCollectionPage
Example 41
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "OrderedCollectionPage",
  "id": "http://example.org/foo?page=1",
  "partOf": "http://example.org/foo",
  "orderedItems": [
    {
      "type": "Note",
      "name": "A Simple Note"
    },
    {
      "type": "Note",
      "name": "Another Simple Note"
    }
  ]
}
Notes:

Used to represent ordered subsets of items from an OrderedCollection. Refer to the Activity Streams 2.0 Core for a complete description of the OrderedCollectionPage object.

Extends: OrderedCollection | CollectionPage
Properties:

startIndex

Inherits all properties from OrderedCollection and CollectionPage.

3. Extended Classes

Base URI: http://www.w3.org/ns/activitystreams#.

The Activity Streams 2.0 Extended Classes include Activity and Object subclasses that are common to many social Web applications. They are divided into three sets:

Support for specific extended vocabulary classes is expected to vary, with implementations only selecting the extended classes and properties that make sense within the specific context and requirements of those applications. However, to avoid possible interoperability issues, implementations MUST avoid using extension classes or properties that unduly overlap with or duplicate the extended vocabulary defined here.

3.1 Activity Types

All Activity Types inherit the properties of the base Activity class. Some specific Activity Types are subclasses or specializations of more generalized Activity Types (for instance, the Invite Activity Type is a more specific form of the Offer Activity Type).

The Activity Types include:

Class Description Example
Accept URI: http://www.w3.org/ns/activitystreams#Accept
Example 46
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Accept",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Invite",
    "actor": "http://john.example.org",
    "object": {
      "type": "Event",
      "name": "A Party!"
    }
  }
}
Notes: Indicates that the actor accepts the object. The target property can be used in certain circumstances to indicate the context into which the object has been accepted. For instance, when expressing the activity, "Sally accepted Joe into the Club", the "target" would identify the "Club".
Extends: Activity
Properties: Inherits all properties from Activity.
TentativeAccept URI: http://www.w3.org/ns/activitystreams#TentativeAccept
Example 51
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "TentativeAccept",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Invite",
    "actor": "http://john.example.org",
    "object": {
      "type": "Event",
      "name": "A Party!"
    }
  }
}
Notes: A specialization of Accept indicating that the acceptance is tentative.
Extends: Accept
Properties: Inherits all properties from Accept.
Add URI: http://www.w3.org/ns/activitystreams#Add
Example 56
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Add",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/abc"
}
Example 61
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Add",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Image",
    "name": "A picture of my cat",
    "url": "http://example.org/img/cat.png"
  },
  "target": {
    "type": "Collection",
    "name": "My Cat Pictures"
  }
}
Notes: Indicates that the actor has added the object to the target. If the target property is not explicitly specified, the target would need to be determined implicitly by context. The origin can be used to identify the context from which the object originated.
Extends: Activity
Properties: Inherits all properties from Activity.
Arrive URI: http://www.w3.org/ns/activitystreams#Arrive
Example 66
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Arrive",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "location": {
    "type": "Place",
    "name": "Work"
  },
  "origin": {
    "type": "Place",
    "name": "Home"
  }
}
Notes: An IntransitiveActivity that indicates that the actor has arrived at the location. The origin can be used to identify the context from which the actor originated. The target typically has no defined meaning.
Extends: IntransitiveActivity
Properties: Inherits all properties fom IntransitiveActivity.
Create URI: http://www.w3.org/ns/activitystreams#Create
Example 71
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Create",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Note",
    "name": "A Simple Note",
    "content": "This is a simple note"
  }
}
Notes:

Indicates that the actor has created the object.

Extends: Activity
Properties: Inherits all properties from Activity.
Delete URI: http://www.w3.org/ns/activitystreams#Delete
Example 76
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Delete",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/notes/1"
}
Notes: Indicates that the actor has deleted the object. If specified, the origin indicates the context from which the object was deleted.
Extends: Activity
Properties: Inherits all properties from Activity.
Follow URI: http://www.w3.org/ns/activitystreams#Follow
Example 81
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Follow",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Person",
    "name": "John"
  }
}
Notes: Indicates that the actor is "following" the object. Following is defined in the sense typically used within Social systems in which the actor is interested in any activity performed by or on the object. The target and origin typically have no defined meaning.
Extends: Activity
Properties: Inherits all properties from Activity.
Ignore URI: http://www.w3.org/ns/activitystreams#Ignore
Example 86
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Ignore",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/notes/1"
}
Notes: Indicates that the actor is ignoring the object. The target and origin typically have no defined meaning.
Extends: Activity
Properties: Inherits all properties from Activity.
Join URI: http://www.w3.org/ns/activitystreams#Join
Example 91
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Join",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Group",
    "name": "A Simple Group"
  }
}
Notes: Indicates that the actor has joined the object. The target and origin typically have no defined meaning.
Extends: Activity
Properties: Inherits all properties from Activity.
Leave URI: http://www.w3.org/ns/activitystreams#Leave
Example 96
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Leave",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Place",
    "name": "Work"
  }
}
Example 101
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Leave",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Group",
    "name": "A Simple Group"
  }
}
Notes: Indicates that the actor has left the object. The target and origin typically have no meaning.
Extends: Activity
Properties: Inherits all properties from Activity.
Like URI: http://www.w3.org/ns/activitystreams#Like
Example 106
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Like",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/notes/1"
}
Notes:

Indicates that the actor likes, recommends or endorses the object. The target and origin typically have no defined meaning.

Extends: Activity
Properties: Inherits all properties from Activity.
Offer URI: http://www.w3.org/ns/activitystreams#Offer
Example 111
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "http://www.types.example/ProductOffer",
    "name": "50% Off!"
  }
}
Notes: Indicates that the actor is offering the object. If specified, the target indicates the entity to which the object is being offered.
Extends: Activity
Properties: Inherits all properties from Activity.
Invite URI: http://www.w3.org/ns/activitystreams#Invite
Example 116
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Invite",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Event",
    "name": "A Party"
  },
  "target": [
    {
      "type": "Person",
      "name": "John"
    },
    {
      "type": "Person",
      "name": "Lisa"
    }
  ]
}
Notes: A specialization of Offer in which the actor is extending an invitation for the object to the target.
Extends: Offer
Properties: Inherits all properties from Offer.
Reject URI: http://www.w3.org/ns/activitystreams#Reject
Example 121
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Reject",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Invite",
    "actor": "http://john.example.org",
    "object": {
      "type": "Event",
      "name": "A Party!"
    }
  }
}
Notes: Indicates that the actor is rejecting the object. The target and origin typically have no defined meaning.
Extends: Activity
Properties: Inherits all properties from Activity.
TentativeReject URI: http://www.w3.org/ns/activitystreams#TentativeReject
Example 126
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "TentativeReject",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Invite",
    "actor": "http://john.example.org",
    "object": {
      "type": "Event",
      "name": "A Party!"
    }
  }
}
Notes: A specialization of Reject in which the rejection is considered tentative.
Extends: Reject
Properties: Inherits all properties from Reject.
Remove URI: http://www.w3.org/ns/activitystreams#Remove
Example 131
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Remove",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/notes/1",
  "target": {
    "type": "Collection",
    "name": "Notes Folder"
  }
}
Example 136
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Remove",
  "actor": {
    "type": "http://example.org/Role",
    "name": "The Moderator"
  },
  "object": {
    "type": "Person",
    "name": "Sally"
  },
  "origin": {
    "type": "Group",
    "name": "A Simple Group"
  }
}
Notes: Indicates that the actor is removing the object. If specified, the origin indicates the context from which the object is being removed.
Extends: Activity
Properties: Inherits all properties from Activity.
Undo URI: http://www.w3.org/ns/activitystreams#Undo
Example 141
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Undo",
  "actor": "http://sally.example.org",
  "object": {
    "type": "Offer",
    "actor": "http://sally.example.org",
    "object": "http://example.org/posts/1",
    "target": "http://john.example.org"
  }
}
Notes:

Indicates that the actor is undoing the object. In most cases, the object will be an Activity describing some previously performed action (for instance, a person may have previously "liked" an article but, for whatever reason, might choose to undo that like at some later point in time).

The target and origin typically have no defined meaning.

Extends: Activity
Properties: Inherits all properties from Activity.
Update URI: http://www.w3.org/ns/activitystreams#Update
Example 146
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Update",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/notes/1"
}
Notes:

Indicates that the actor has updated the object. Note, however, that this vocabulary does not define a mechanism for describing the actual set of modifications made to object.

The target and origin typically have no defined meaning.

Extends: Activity
Properties: Inherits all properties from Activity.
View URI: http://www.w3.org/ns/activitystreams#View
Example 151
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "View",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": {
    "type": "Article",
    "name": "An article about Activity Streams"
  }
}
Notes: Indicates that the actor has viewed the object.
Extends: Activity
Properties: Inherits all properties from Activity.
Listen URI: http://www.w3.org/ns/activitystreams#Listen
Example 156
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Listen",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/music.mp3"
}
Notes: Indicates that the actor has listened to the object.
Extends: Activity
Properties: Inherits all properties from Activity.
Read URI: http://www.w3.org/ns/activitystreams#Read
Example 161
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Read",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/posts/1"
}
Notes: Indicates that the actor has read the object.
Extends: Activity
Properties: Inherits all properties from Activity.
Move URI: http://www.w3.org/ns/activitystreams#Move
Example 166
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Move",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/posts/1",
  "target": {
    "type": "Collection",
    "name": "List B"
  },
  "origin": {
    "type": "Collection",
    "name": "List A"
  }
}
Notes: Indicates that the actor has moved object from origin to target. If the origin or target are not specified, either can be determined by context.
Extends: Activity
Properties: Inherits all properties from Activity.
Travel URI: http://www.w3.org/ns/activitystreams#Travel
Example 171
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Travel",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "target": {
    "type": "Place",
    "name": "Home"
  },
  "origin": {
    "type": "Place",
    "name": "Work"
  }
}
Notes: Indicates that the actor is traveling to target from origin. Travel is an IntransitiveObject whose actor specifies the direct object. If the target or origin are not specified, either can be determined by context.
Extends: IntransitiveActivity
Properties: Inherits all properties from IntransitiveActivity.
Announce URI: http://www.w3.org/ns/activitystreams#Announce
Example 176
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Announce",
  "actor": {
    "type": "Person",
    "id": "http://sally.example.org",
    "name": "Sally"
  },
  "object": {
    "type": "Arrive",
    "actor": "http://sally.example.org",
    "location": {
      "type": "Place",
      "name": "Work"
    }
  }
}
Notes:

Indicates that the actor is calling the target's attention the object.

The origin typically has no defined meaning.

Extends: Activity
Properties: Inherits all properties from Activity.
Block URI: http://www.w3.org/ns/activitystreams#Block
Example 181
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Block",
  "actor": "http://sally.example.org",
  "object": "http://joe.example.org"
}
Notes: Indicates that the actor is blocking the object. Blocking is a stronger form of Ignore. The typical use is to support social systems that allow one user to block activities or content of other users. The target and origin typically have no defined meaning.
Extends: Ignore
Properties: Inherits all properties from Ignore.
Flag URI: http://www.w3.org/ns/activitystreams#Flag
Example 186
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Flag",
  "actor": "http://sally.example.org",
  "object": {
    "type": "Note",
    "content": "An inappropriate note"
  }
}
Notes: Indicates that the actor is "flagging" the object. Flagging is defined in the sense common to many social platforms as reporting content as being inappropriate for any number of reasons.
Extends: Activity
Properties: Inherits all properties from Activity.
Dislike URI: http://www.w3.org/ns/activitystreams#Dislike
Example 191
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Dislike",
  "actor": "http://sally.example.org",
  "object": "http://example.org/posts/1"
}
Notes: Indicates that the actor dislikes the object.
Extends: Activity
Properties: Inherits all properties from Activity.
Question URI: http://www.w3.org/ns/activitystreams#Question
Example 196
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Question",
  "name": "What is the answer?",
  "oneOf": [
    {
      "type": "Note",
      "name": "Option A"
    },
    {
      "type": "Note",
      "name": "Option B"
    }
  ]
}
Notes:

Represents a question being asked. Question objects are an extension of IntransitiveActivity. That is, the Question object is an Activity, but the direct object is the question itself and therefore it would not contain an object property.

Either of the anyOf and oneOf properties MAY be used to express possible answers, but a Question object MUST NOT have both properties.

Extends: IntransitiveActivity.
Properties:

oneOf | anyOf

Inherits all properties from IntransitiveActivity.

3.2 Actor Types

All Actor Types inherit the properties of the base Actor class. Actors are objects that are capable of performing activities. The value of the actor property MUST be a type of Actor.

The core Actor Types include:

Class Description Properties
Application URI: http://www.w3.org/ns/activitystreams#Application
Example 201
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Application",
  "name": "My Software Application."
}
Notes: Describes a software application.
Extends: Actor
Properties: Inherits all properties from Actor.
Group URI: http://www.w3.org/ns/activitystreams#Group
Example 206
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Group",
  "name": "A Simple Group."
}
Notes: Represents a formal or informal collective of Actors.
Extends: Actor
Properties: Inherits all properties from Actor.
Organization URI: http://www.w3.org/ns/activitystreams#Organization
Example 211
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Organization",
  "name": "Example Co."
}
Notes: Represents an organization.
Extends: Actor
Properties: Inherits all properties from Actor.
Person URI: http://www.w3.org/ns/activitystreams#Person
Example 216
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Person",
  "name": "Sally Smith."
}
Notes: Represents an individual person.
Extends: Actor
Properties: Inherits all properties from Actor.
Service URI: http://www.w3.org/ns/activitystreams#Service
Example 221
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Service",
  "name": "Acme Web Service"
}
Notes: Represents a service of any kind.
Extends: Actor
Properties: Inherits all properties from Actor.

3.3 Object and Link Types

All Object Types inherit the properties of the base Object class. Link Types inherit the properties of the base Link class. Some specific Object Types are subclasses or specializations of more generalized Object Types (for instance, the Person Object Type is a more specific form of the Actor class).

The Object Types include:

The Link Types include:

Class Description Properties
Relationship URI: http://www.w3.org/ns/activitystreams#Relationship
Example 226
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Relationship",
  "subject": {
    "type": "Person",
    "name": "Sally"
  },
  "relationship": "http://purl.org/vocab/relationship/closeFriendOf",
  "object": {
    "type": "Person",
    "name": "John"
  }
}
Notes:

Describes a relationship between two individuals. The subject and object properties are used to identify the connected individuals.

See 5.2 Representing Relationships Between Entities for additional information.

Extends: Object
Properties:

subject | object | relationship

Inherits all properties from Object.

Article URI: http://www.w3.org/ns/activitystreams#Article
Example 231
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Article",
  "name": "A Blog Post",
  "content": "<div>... a long blog post</div>",
  "attributedTo": "http://sally.example.org"
}
Notes: Represents any kind of multi-paragraph written work.
Extends: Object
Properties: Inherits all properties from Object.
Document URI: http://www.w3.org/ns/activitystreams#Document
Example 236
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Document",
  "name": "4Q Sales Forecast",
  "url": "http://example.org/4q-sales-forecast.pdf"
}
Notes: Represents a document of any kind.
Extends: Object
Properties: Inherits all properties from Object.
Audio URI: http://www.w3.org/ns/activitystreams#Audio
Example 241
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Audio",
  "name": "A Simple Podcast",
  "url": {
    "type": "Link",
    "href": "http://example.org/podcast.mp3",
    "mediaType": "audio/mp3"
  }
}
Notes: Represents an audio document of any kind.
Extends: Document
Properties: Inherits all properties from Document.
Image URI: http://www.w3.org/ns/activitystreams#Image
Example 246
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Image",
  "name": "A Simple Image",
  "url": [
    {
      "type": "Link",
      "href": "http://example.org/image.jpeg",
      "mediaType": "image/jpeg"
    },
    {
      "type": "Link",
      "href": "http://example.org/image.png",
      "mediaType": "image/png"
    }
  ]
}
Notes: An image document of any kind
Extends: Document
Properties: Inherits all properties from Document.
Video URI: http://www.w3.org/ns/activitystreams#Video
Example 251
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Video",
  "name": "A Simple Video",
  "url": "http://example.org/video.mkv",
  "duration": "PT2H"
}
Notes: Represents a video document of any kind.
Extends: Document
Properties: Inherits all properties from Document.
Note URI: http://www.w3.org/ns/activitystreams#Note
Example 256
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "name": "A Short Note",
  "content": "This is a short note"
}
Notes: Represents a short written work typically less than a single paragraph in length.
Extends: Object
Properties: Inherits all properties from Object.
Page URI: http://www.w3.org/ns/activitystreams#Page
Example 261
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Page",
  "name": "A Webpage",
  "url": "http://example.org/page.html"
}
Notes: Represents a Web Page.
Extends: Document
Properties: Inherits all properties from Document.
Event URI: http://www.w3.org/ns/activitystreams#Event
Example 266
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Event",
  "name": "A Party!",
  "startTime": "2014-12-31T23:00:00-08:00",
  "endTime": "2015-01-01T06:00:00-08:00"
}
Notes: Represents any kind of event.
Extends: Object
Properties: Inherits all properties from Object.
Place URI: http://www.w3.org/ns/activitystreams#Place
Example 271
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Place",
  "name": "Work"
}
Example 276
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Place",
  "name": "Fresno Area",
  "latitude": 36.75,
  "longitude": 119.7667,
  "radius": 15,
  "units": "miles"
}
Notes: Represents a logical or physical location. See 5.3 Representing Places for additional information.
Extends: Object
Properties:

accuracy | altitude | latitude | longitude | radius | units

Inherits all properties from Object.
Mention URI: http://www.w3.org/ns/activitystreams#Mention
Example 281
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Mention",
  "href": "http://example.org/joe",
  "name": "Joe"
}
Notes: A specialized Link that represents an @mention.
Extends: Link
Properties: Inherits all properties from Link.
Profile URI: http://www.w3.org/ns/activitystreams#Profile
Example 286
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Profile",
  "name": "Sally's Profile",
  "attributedTo": {
    "type": "Person",
    "name": "Sally Smith"
  }
}
Notes: A Profile is a content object that describes another Object, typically used to describe Actor, objects. The describes property is used to reference the object being described by the profile.
Extends: Object
Properties:

describes

Inherits all properties from Object.

4. Properties

Base URI: http://www.w3.org/ns/activitystreams#.

The common properties include: actor | attachment | attributedTo | bcc | bto | cc | context | current | first | generator | icon | image | inReplyTo | instrument | last | location | items | oneOf | anyOf | origin | next | object | prev | preview | result | replies | scope | tag | target | to | url | accuracy | altitude | content | name | duration | height | href | hreflang | partOf | latitude | longitude | mediaType | endTime | published | startTime | radius | rel | startIndex | summary | totalItems | units | updated | width | subject | relationship | describes

The "Domain" indicates the type of Object the property term applies to. The "Range" indicates the type of value the property term can have. Certain properties are marked as a "Subproperty Of" another term, meaning that the term is a specialization of the referenced term. For instance, actor is a subproperty of attributedTo. Properties marked as being "Functional" can have only one value. Items not marked as "Functional" can have multiple values.

Term Description Example
actor URI: http://www.w3.org/ns/activitystreams#actor
Example 291
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": "http://sally.example.org",
  "object": "http://example.org/foo"
}
Example 296
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": {
    "type": "Person",
    "id": "http://sally.example.org",
    "name": "Sally"
  },
  "object": "http://example.org/foo"
}
Example 301
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": [
    "http://joe.example.org",
    {
      "type": "Person",
      "id": "http://sally.example.org",
      "name": "Sally"
    }
  ],
  "object": "http://example.org/foo"
}
Notes: Describes one or more entities that either performed or are expected to perform the activity. Any single activity can have multiple actors. The actor MAY be specified using an indirect Link.
Domain: Activity
Range: Actor | Link
Subproperty Of: attributedTo
attachment URI: http://www.w3.org/ns/activitystreams#attachment
Example 306
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "name": "A Simple Note",
  "attachment": [
    {
      "type": "Image",
      "content": "A simple Image",
      "url": "http://example.org/cat.jpeg"
    }
  ]
}
Notes: Identifies a resource attached or related to an object that potentially requires special handling. The intent is to provide a model that is at least semantically similar to attachments in email.
Domain: Object
Range: Object | Link
attributedTo URI: http://www.w3.org/ns/activitystreams#attributedTo
Example 311
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Image",
  "name": "A Simple Image",
  "url": "http://example.org/cat.jpeg",
  "attributedTo": [
    {
      "type": "Person",
      "name": "Sally"
    }
  ]
}
Example 316
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Image",
  "name": "A Simple Image",
  "url": "http://example.org/cat.jpeg",
  "attributedTo": [
    "http://joe.example.org",
    {
      "type": "Person",
      "name": "Sally"
    }
  ]
}
Notes: Identifies one or more entities to which this object is attributed. The attributed entities might not be Actors. For instance, an object might be attributed to the completion of another activity.
Domain: Link | Object
Range: Link | Object
bcc URI: http://www.w3.org/ns/activitystreams#bcc
Example 321
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": "http://sally.example.org",
  "object": "http://example.org/posts/1",
  "target": "http://john.example.org",
  "bcc": [ "http://joe.example.org" ]
}
Notes: Identifies one or more Actors that are part of the private secondary audience of this Object.
Domain: Object
Range: Actor | Link
bto URI: http://www.w3.org/ns/activitystreams#bto
Example 326
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": "http://sally.example.org",
  "object": "http://example.org/posts/1",
  "target": "http://john.example.org",
  "bto": [ "http://joe.example.org" ]
}
Notes: Identifies an Actor that is part of the private primary audience of this Object.
Domain: Object
Range: Actor | Link
cc URI: http://www.w3.org/ns/activitystreams#cc
Example 331
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Offer",
  "actor": "http://sally.example.org",
  "object": "http://example.org/posts/1",
  "target": "http://john.example.org",
  "cc": [ "http://joe.example.org" ]
}
Notes: Identifies an Actor that is part of the public secondary audience of this Object.
Domain: Object
Range: Actor | Link
context URI: http://www.w3.org/ns/activitystreams#context
Example 336
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "items": [
    {
      "type": "Offer",
      "actor": "http://sally.example.org",
      "object": "http://example.org/posts/1",
      "target": "http://john.example.org",
      "context": "http://example.org/contexts/1"
    },
    {
      "type": "Like",
      "actor": "http://joe.example.org",
      "object": "http://example.org/posts/2",
      "context": "http://example.org/contexts/1"
    }
  ]
}
Notes:

Identifies the context within which the object exists or an activity was performed.

The notion of "context" used is intentionally vague. The intended function is to serve as a means of grouping objects and activities that share a common originating context or purpose. An example could be all activities relating to a common project or event.

Domain: Object
Range: Object | Link
current URI: http://www.w3.org/ns/activitystreams#current
Example 341
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 3,
  "current": "http://example.org/collection",
  "items": [
    "http://example.org/posts/1",
    "http://example.org/posts/2",
    "http://example.org/posts/3"
  ]
}
Example 346
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 3,
  "current": {
    "type": "Link",
    "name": "Most Recent Items",
    "href": "http://example.org/collection"
  },
  "items": [
    "http://example.org/posts/1",
    "http://example.org/posts/2",
    "http://example.org/posts/3"
  ]
}
Notes: In a paged Collection, indicates the page that contains the most recently updated member items.
Domain: CollectionPage
Range: CollectionPage | Link
Functional: True
first URI: http://www.w3.org/ns/activitystreams#first
Example 351
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 3,
  "first": "http://example.org/collection?page=0"
}
Example 356
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 3,
  "first": {
    "type": "Link",
    "name": "First Page",
    "href": "http://example.org/collection?page=0"
  }
}
Notes: In a paged Collection, indicates the furthest preceeding page of items in the collection.
Domain: CollectionPage
Range: CollectionPage | Link
Functional: True
generator URI: http://www.w3.org/ns/activitystreams#generator
Example 361
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A simple note",
  "generator": {
    "type": "Application",
    "name": "My Note Application"
  }
}
Notes: Identifies the entity (e.g. an application) that generated the object.
Domain: Object
Range: Object | Link
icon URI: http://www.w3.org/ns/activitystreams#icon
Example 366
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A Simple note",
  "icon": {
    "type": "Image",
    "name": "Note",
    "url": "http://example.org/note.png",
    "width": 16,
    "height": 16
  }
}
Example 371
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A Simple note",
  "icon": [
    {
      "type": "Image",
      "name": "Note (16x16)",
      "url": "http://example.org/note1.png",
      "width": 16,
      "height": 16
    },
    {
      "type": "Image",
      "name": "Note (32x32)",
      "url": "http://example.org/note2.png",
      "width": 32,
      "height": 32
    }
  ]
}
Notes: Indicates an entity that describes an icon for this object. The image should have an aspect ratio of one (horizontal) to one (vertical) and should be suitable for presentation at a small size.
Domain: Object
Range: Image | Link
image URI: http://www.w3.org/ns/activitystreams#image
Example 376
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A Simple note",
  "image": {
    "type": "Image",
    "name": "A Cat",
    "url": "http://example.org/cat.png"
  }
}
Example 381
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A Simple note",
  "image": [
    {
      "type": "Image",
      "name": "Cat 1",
      "url": "http://example.org/cat1.png"
    },
    {
      "type": "Image",
      "name": "Cat 2",
      "url": "http://example.org/cat2.png"
    }
  ]
}
Notes: Indicates an entity that describes an image for this object. Unlike the icon property, there are no aspect ratio or display size limitations assumed.
Domain: Object
Range: Image | Link
inReplyTo URI: http://www.w3.org/ns/activitystreams#inReplyTo
Example 386
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A simple note",
  "inReplyTo": {
    "type": "Note",
    "content": "Another note"
  }
}
Example 391
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Note",
  "content": "A simple note",
  "inReplyTo": "http://example.org/posts/1"
}
Notes: Indicates one or more entities for which this object is considered a response.
Domain: Object
Range: Object | Link
instrument URI: http://www.w3.org/ns/activitystreams#instrument
Example 396
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Listen",
  "actor": {
    "type": "Person",
    "name": "Sally"
  },
  "object": "http://example.org/foo.mp3",
  "instrument": {
    "type": "Service",
    "name": "Acme Music Service"
  }
}
Notes: Identifies one or more objects used (or to be used) in the completion of an Activity.
Domain: Activity
Range: Object | Link
last URI: http://www.w3.org/ns/activitystreams#last
Example 401
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 3,
  "last": "http://example.org/collection?page=1"
}
Example 406
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 5,
  "last": {
    "type": "Link",
    "name": "Last Page",
    "href": "http://example.org/collection?page=1"
  }
}
Notes: In a paged Collection, indicates the furthest proceeding page of the collection.
Domain: CollectionPage
Range: CollectionPage | Link
Functional: True
location URI: http://www.w3.org/ns/activitystreams#location
Example 411
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Person",
  "name": "Sally",
  "location": {
    "type": "Place",
    "longitude": 12.34,
    "latitude": 56.78,
    "altitude": 90,
    "units": "m"
  }
}
Notes: Indicates one or more physical or logical locations associated with the object.
Domain: Object
Range: Object | Link
items URI: http://www.w3.org/ns/activitystreams#items
Example 416
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Collection",
  "totalItems": 2,
  "items": [
    {
      "type": "Note",
      "name": "A Simple Note"
    },
    {
      "type": "Note",
      "name": "Another Simple Note"
    }
  ]
}
Example 421
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "OrderedCollection",
  "totalItems": 2,
  "orderedItems": [
    {
      "type": "Note",
      "name": "A Simple Note"
    },
    {
      "type": "Note",
      "name": "Another Simple Note"
    }
  ]
}
Notes: Identifies the items contained in a collection. The items might be ordered or unordered.
Domain: Collection
Range: Object | Link | Ordered List of [Object | Link ]
oneOf URI: http://www.w3.org/ns/activitystreams#oneOf
Example 426
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Question",
  "name": "What is the answer?",
  "oneOf": [
    {
      "type": "Note",
      "name": "Option A"
    },
    {
      "type": "Note",
      "name": "Option B"
    }
  ]
}
Notes: Identifies an exclusive option for a Question. Use of oneOf implies that the Question can have only a single answer. To indicate that a Question can have multiple answers, use anyOf.
Domain: Question
Range: Object | Link
anyOf URI: http://www.w3.org/ns/activitystreams#anyOf
Example 431
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Question",
  "name": "What is the answer?",
  "anyOf": [
    {
      "type": "Note",
      "name": "Option A"
    },
    {
      "type": "Note",
      "name": "Option B"
    }
  ]
}
Notes: Identifies an inclusive option for a Question. Use of anyOf implies that the Question can have multiple answers. To indicate that a Question can have only one answer, use oneOf.
Domain: Question
Range: Object | Link
origin URI: http://www.w3.org/ns/activitystreams#origin
Example 436
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Move",
  "actor": "http://sally.example.org",
  "object": "http://example.org/posts/1",
  "target": {
    "type": "Collection",
    "name": "List B"
  },
  "origin": {
    "type": "Collection",
    "name": "List A"
  }
}
Notes: Describes an indirect object of the activity from which the activity is directed. The precise meaning of the origin is the object of the English preposition "from". For instance, in the activity "John moved an item to List B from List A", the origin of the activity is "List A".
Domain: Activity
Range: Object | Link
next URI: http://www.w3.org/ns/activitystreams#next
Example 441
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "CollectionPage",
  "next": "http://example.org/collection?page=2",
  "items": [
    "http://example.org/posts/1",
    "http://example.org/posts/2",
    "http://example.org/posts/3"
  ]
}
Example 446
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "CollectionPage",
  "next": {
    "type": "Link",
    "name": "Next Page",
    "href": "http://example.org/collection?page=2"
  },
  "items": [
    "http://example.org/posts/1",
    "http://example.org/posts/2",
    "http://example.org/posts/3"
  ]
}
Notes: In a paged Collection, indicates the next page of items.
Domain: CollectionPage
Range: CollectionPage | Link
Functional: True
object URI: http://www.w3.org/ns/activitystreams#object
Example 451
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Like",
  "actor": "http://sally.example.org",
  "object": "http://example.org/posts/1"
}
Example 456
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Like",
  "actor": "http://sally.example.org",
  "object": {
    "type": "Note",
    "content": "A simple note"
  }
}
Example 461
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "Like",
  "actor": "http://sally.example.org",
  "object": [
    "http://example.org/posts/1",
    {
      "type": "Note",
      "content": "A simple note"
    }
  ]
}
Notes:

When used within an Activity, describes the direct object of the activity. For instance, in the activity "John added a movie to his wishlist", the object of the activity is the movie added.

When used within a Relationship describes the entity to which the subject is related.

Domain: Activity | Relationship
Range: Object | Link
prev URI: http://www.w3.org/ns/activitystreams#prev
Example 466
{
  "@context": "http://www.w3.org/ns/activitystreams",
  "type": "CollectionPage",
  "prev": "http://example.org/collection?page=1",
  "items": [
    "http://example.org/posts/1",
    "http://example.org/posts/2",
    "http://example.org/posts/3"
  ]
}