Support Center

API Documentation - Data Format Schemas
Disqus Activity Streams Format

Schema

Gnip uses JSON Activity Streams for its enriched stream on our Disqus products. We've also added some of our own extensions. Here are a few tables describing the properties of the JSON objects we'll be sending you through the stream.  Example JSON Activity Streams payloads for all of our publishers can be found on the Gnip web site in the Sources section.

Gnip Disqus Activity Streams: Activity Object

This is the root object for all Disqus activities that pass through our system.

Property Description
actor The author of the comment or person who voted.

Note: Disqus provides anonymized author data through its firehose.  The actor element contains a distinct hashed value provided by Disqus, which corresponds to a specific Disqus user, and is common to all activities generated by that user.
verb For comments this can be "post", "update" or "delete". For votes we have created the extensions "vote-up", "vote-down" or "unvote". For a description of AS verbs see http://activitystrea.ms/head/activity-schema.html#verbs.
postedTime The publish time of the activity.

Note: Disqus provides its site administrators with an optional setting to allow users to specify a user-generated postedTime for either the thread of comments or an individual comment. These user-generated postedTimes can be far back in history (e.g. 1940's). As a result, though data is delivered in realtime as it is posted to Disqus, it can have a postedTime that is in the past.

Disqus also allows site administrators to upload comments data from other platforms the web site may have utilized at some point in the past. This data gets delivered through the firehose as it is uploaded, but will have postedTimes that reflect when it was originally posted on the other commenting platform.
id A unique IRI for the Disqus activity.
body The text of the comment.
inReplyTo A comment object representing the comment being replied to. Unlike the Twitter AS, this does not contain a permalink to the object that was replied to. However, it does contain a unique id for the object that  as well as the unique id for the author of the comment. See the comment object for more details.
object An object representing the comment or vote begin made
target An object representing the page the comment was posted to or vote was made.
 

Extensions

These are properties that are only found on Disqus activities.

Property Description
disqusType The current approval state of a comment.  Only comments have these, not votes.  Possible values include: "unapproved", "approved", "flagged", "killed" and "spam".
disqusTypePrev The previous approval state of a comment.  Only comments have these, not votes.

Gnip Disqus Activity Streams: Page Object

In the Disqus transform, pages are either objects or targets.

Property Description 
id A unique IRI for the page where the comment or vote occurred.
link A permalink to the page where the comment or vote occurred.
website An object representing the website that's page contains the comment or vote
website.id A unique id for the website

Gnip Disqus Activity Streams: Comment Object

Property Description
objectType "comment" See http://activitystrea.ms/head/activity-schema.html#comment for more detailed information.
id A unique IRI for the comment
link A permalink to the comment on the page
author Optional. An object used for vote activities and inReplyTo, where the author of the comment being acted on is not the actor
author.objectType "person" See http://activitystrea.ms/head/activity-schema.html#person for more detailed information
author.id A unique IRI for the author of the comment

Sample Payloads

Comment

The following payload is presented in Gnip's Activity Streams format. To see a sample payload in Disqus's original format, click HERE.

 

Comment Vote

The following payload is presented in Gnip's Activity Streams format. To see a sample payload in Disqus's original format, click HERE.

 

Thread Vote

The following payload is presented in Gnip's Activity Streams format. To see a sample payload in Disqus's original format, click HERE.

Premium Streams

Getting Started

Integration Help

Code Snippets

Enterprise Data Collector

Getting Started

Integration Help

API Documentation

Other Resources