Skip to main content
Back to Standards
Activity Streams 2.0 logo

Activity Streams 2.0

AS2

A W3C Recommendation providing a JSON-LD-based data model and vocabulary for representing social activities on the web. Activity Streams 2.0 defines a core set of activity types (Create, Like, Follow, etc.) and object types (Note, Person, Image, etc.) for expressing actions taken by actors on objects. Published as a W3C Recommendation in May 2017, it serves as the foundation for ActivityPub and the broader fediverse, powering platforms like Mastodon, Pixelfed, and PeerTube.

Overview

Activity Streams 2.0 is a W3C Recommendation that provides a JSON-LD-based data model for representing social activities on the Web. It has become the foundational vocabulary of the fediverse, powering the decentralized social networking ecosystem through its role as the data format for the ActivityPub protocol used by Mastodon, Pixelfed, PeerTube, and hundreds of other platforms.

Background

The Activity Streams format originated as a community effort to standardize the representation of social activities across web applications, similar to the activity feeds found in platforms like Facebook and Twitter. The initial Activity Streams 1.0 specification used an Atom-based XML format. Work on version 2.0 began under the W3C Social Web Working Group, which redesigned the format around JSON-LD for better alignment with linked data principles. Activity Streams 2.0 was published as a W3C Recommendation on 23 May 2017, alongside its companion Activity Vocabulary specification.

Purpose & Scope

The specification defines a general model for representing activities: an actor performs a verb on an object, optionally targeting a recipient. For example, "Alice added Hawaii to her list of places to visit" would be expressed with actor (Alice), verb (Add), object (Hawaii), and target (places to visit). This simple but extensible pattern can represent virtually any social interaction, from posting a note to following a user to liking a photo.

Key Concepts

Concept Description
Actor The entity performing the activity (Person, Organization, Service, etc.)
Object The entity being acted upon (Note, Article, Image, Video, etc.)
Activity The action itself (Create, Update, Delete, Follow, Like, Announce, etc.)
Collection An ordered or unordered set of objects
OrderedCollection A collection with a defined ordering (e.g., an inbox or outbox)

Serializations & Technical Formats

Activity Streams 2.0 uses JSON-LD as its serialization format with the context URI https://www.w3.org/ns/activitystreams. While technically JSON-LD, the format is designed to be usable as plain JSON by developers unfamiliar with linked data concepts. A minimal Activity Streams document requires only a @context, type, and content-bearing properties.

Governance & Maintenance

The specification was developed by the W3C Social Web Working Group, which has since concluded its charter. The specifications are maintained by the W3C as published Recommendations. The Activity Streams 2.0 Core specification defines the data model, while the companion Activity Vocabulary specification enumerates the standard types and properties. Community discussion continues through informal channels and implementer forums.

Notable Implementations

The most significant adoption of Activity Streams 2.0 is through the ActivityPub protocol, which uses it as its data format for server-to-server and client-to-server communication. Mastodon, the leading fediverse platform with millions of users, implements ActivityPub and thus produces and consumes Activity Streams data. Other notable implementations include Pixelfed (photo sharing), PeerTube (video hosting), Lemmy (link aggregation), and Pleroma. The GeoSPARQL standard provides OWL and RDFS alignments to the Activity Streams vocabulary for geospatial applications.

Related Standards

  • JSON-LD — The serialization format underlying Activity Streams 2.0
  • Schema.org — Another widely used vocabulary for structured data on the web, with some overlapping types

Further Reading