Skip to content

JSON-LD @context

Various examples the @context property can take. See here for the W3C specification, and here for what ActivityStreams says about it.

Examples

Example 1

activity
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mastodon/users/hippo",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/e9GOoiDw7MM",
  "published": "2025-11-08T13:28:28Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mastodon/users/hippo"
    ],
    "id": "http://pasture-one-actor/object/hfZrqXlcmYg",
    "published": "2025-11-08T13:28:28Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "@context url as the ActivityStreams URL"
  }
}
mastodon
{
  "id": "115514311229931114",
  "created_at": "2025-11-08T13:28:28.000Z",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/hfZrqXlcmYg",
  "url": "http://pasture-one-actor/object/hfZrqXlcmYg",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "quotes_count": 0,
  "edited_at": null,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "@context url as the ActivityStreams URL",
  "filtered": [],
  "reblog": null,
  "account": {
    "id": "115514309622755922",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": false,
    "indexable": false,
    "group": false,
    "created_at": "2025-11-08T00:00:00.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "http://localhost:2970/system/avatars/original/missing.png",
    "avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
    "header": "http://localhost:2970/system/headers/original/missing.png",
    "header_static": "http://localhost:2970/system/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 27,
    "last_status_at": "2025-11-08",
    "hide_collections": true,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "emojis": [],
  "quote": null,
  "card": null,
  "poll": null,
  "quote_approval": {
    "automatic": [],
    "manual": [],
    "current_user": "denied"
  }
}

Example 2

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mastodon/users/hippo",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/rAtFywJW8lo",
  "published": "2025-11-08T13:28:29Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mastodon/users/hippo"
    ],
    "id": "http://pasture-one-actor/object/rB-762jcF0M",
    "published": "2025-11-08T13:28:29Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "content": "@context url is list of ActivityStreams URL"
  }
}
mastodon
{
  "id": "115514311286960301",
  "created_at": "2025-11-08T13:28:29.000Z",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/rB-762jcF0M",
  "url": "http://pasture-one-actor/object/rB-762jcF0M",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "quotes_count": 0,
  "edited_at": null,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "@context url is list of ActivityStreams URL",
  "filtered": [],
  "reblog": null,
  "account": {
    "id": "115514309622755922",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": false,
    "indexable": false,
    "group": false,
    "created_at": "2025-11-08T00:00:00.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "http://localhost:2970/system/avatars/original/missing.png",
    "avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
    "header": "http://localhost:2970/system/headers/original/missing.png",
    "header_static": "http://localhost:2970/system/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 28,
    "last_status_at": "2025-11-08",
    "hide_collections": true,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "emojis": [],
  "quote": null,
  "card": null,
  "poll": null,
  "quote_approval": {
    "automatic": [],
    "manual": [],
    "current_user": "denied"
  }
}

Example 3

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mastodon/users/hippo",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/P9DDaPx_zXc",
  "published": "2025-11-08T13:28:30Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mastodon/users/hippo"
    ],
    "id": "http://pasture-one-actor/object/u7fZLUDMfcI",
    "published": "2025-11-08T13:28:30Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      {
        "Hashtag": "as:Hashtag"
      }
    ],
    "content": "@context url is list of ActivityStreams URL and Hashtag"
  }
}
mastodon
{
  "id": "115514311345861842",
  "created_at": "2025-11-08T13:28:30.000Z",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/u7fZLUDMfcI",
  "url": "http://pasture-one-actor/object/u7fZLUDMfcI",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "quotes_count": 0,
  "edited_at": null,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "@context url is list of ActivityStreams URL and Hashtag",
  "filtered": [],
  "reblog": null,
  "account": {
    "id": "115514309622755922",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": false,
    "indexable": false,
    "group": false,
    "created_at": "2025-11-08T00:00:00.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "http://localhost:2970/system/avatars/original/missing.png",
    "avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
    "header": "http://localhost:2970/system/headers/original/missing.png",
    "header_static": "http://localhost:2970/system/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 29,
    "last_status_at": "2025-11-08",
    "hide_collections": true,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "emojis": [],
  "quote": null,
  "card": null,
  "poll": null,
  "quote_approval": {
    "automatic": [],
    "manual": [],
    "current_user": "denied"
  }
}

Example 4

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/fep/5711"
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mastodon/users/hippo",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/3Erf4a9onQw",
  "published": "2025-11-08T13:28:31Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mastodon/users/hippo"
    ],
    "id": "http://pasture-one-actor/object/hSKai7iKBJY",
    "published": "2025-11-08T13:28:31Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/fep/5711"
    ],
    "content": "@context with ActivityStreams URL + w3id-fep document"
  }
}
mastodon
{
  "id": "115514311418331656",
  "created_at": "2025-11-08T13:28:31.000Z",
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/hSKai7iKBJY",
  "url": "http://pasture-one-actor/object/hSKai7iKBJY",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "quotes_count": 0,
  "edited_at": null,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "@context with ActivityStreams URL + w3id-fep document",
  "filtered": [],
  "reblog": null,
  "account": {
    "id": "115514309622755922",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": false,
    "indexable": false,
    "group": false,
    "created_at": "2025-11-08T00:00:00.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "uri": "http://pasture-one-actor/actor",
    "avatar": "http://localhost:2970/system/avatars/original/missing.png",
    "avatar_static": "http://localhost:2970/system/avatars/original/missing.png",
    "header": "http://localhost:2970/system/headers/original/missing.png",
    "header_static": "http://localhost:2970/system/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 30,
    "last_status_at": "2025-11-08",
    "hide_collections": true,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "emojis": [],
  "quote": null,
  "card": null,
  "poll": null,
  "quote_approval": {
    "automatic": [],
    "manual": [],
    "current_user": "denied"
  }
}

Example 5

activity
{
  "@context": null,
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mastodon/users/hippo",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/4jz__cnE7uA",
  "published": "2025-11-08T13:28:32Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mastodon/users/hippo"
    ],
    "id": "http://pasture-one-actor/object/mP4RhcwZv5k",
    "published": "2025-11-08T13:28:32Z",
    "@context": null,
    "content": "no @context"
  }
}

no result

Example 6

activity
{
  "@context": "http://strange.example/context",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mastodon/users/hippo",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/9Br3ZiknRxk",
  "published": "2025-11-08T13:28:47Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mastodon/users/hippo"
    ],
    "id": "http://pasture-one-actor/object/DxKEfeEqj5g",
    "published": "2025-11-08T13:28:47Z",
    "@context": "http://strange.example/context",
    "content": "@context is a broken url"
  }
}

no result