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": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://gotosocial/users/cookie"
  ],
  "id": "http://pasture-one-actor/activity/niBu0evqFt4",
  "published": "2025-08-30T18:57:00Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://gotosocial/users/cookie"
    ],
    "id": "http://pasture-one-actor/object/0sxyIKfcbUU",
    "published": "2025-08-30T18:57:00Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "@context url as the ActivityStreams URL",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K3Y5E330S7PTDXXXCSPBT4NY",
  "created_at": "2025-08-30T18:57:00.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/0sxyIKfcbUU",
  "url": "http://pasture-one-actor/object/0sxyIKfcbUU",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "@context url as the ActivityStreams URL",
  "reblog": null,
  "account": {
    "id": "01K3Y5DQCATKE3219T6HGE9WRD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-08-30T18:56:48.022Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "header": "http://gotosocial/assets/default_header.png",
    "header_static": "http://gotosocial/assets/default_header.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 19,
    "last_status_at": "2025-08-30T18:57:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "01JWFBJTXM7GDMXXK40GW9WXT9",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}

Example 2

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams"
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://gotosocial/users/cookie"
  ],
  "id": "http://pasture-one-actor/activity/d8rYgE3A68M",
  "published": "2025-08-30T18:57:00Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://gotosocial/users/cookie"
    ],
    "id": "http://pasture-one-actor/object/WdYZYkt03nM",
    "published": "2025-08-30T18:57:00Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams"
    ],
    "content": "@context url is list of ActivityStreams URL",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K3Y5E330EZ74XM3EJ740SN7X",
  "created_at": "2025-08-30T18:57:00.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/WdYZYkt03nM",
  "url": "http://pasture-one-actor/object/WdYZYkt03nM",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "@context url is list of ActivityStreams URL",
  "reblog": null,
  "account": {
    "id": "01K3Y5DQCATKE3219T6HGE9WRD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-08-30T18:56:48.022Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "header": "http://gotosocial/assets/default_header.png",
    "header_static": "http://gotosocial/assets/default_header.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 20,
    "last_status_at": "2025-08-30T18:57:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "01JWFBJTXM7GDMXXK40GW9WXT9",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}

Example 3

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://gotosocial/users/cookie"
  ],
  "id": "http://pasture-one-actor/activity/16MOfFYGvWs",
  "published": "2025-08-30T18:57:01Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://gotosocial/users/cookie"
    ],
    "id": "http://pasture-one-actor/object/bCB1R4o0jfE",
    "published": "2025-08-30T18:57:01Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      {
        "Hashtag": "as:Hashtag"
      }
    ],
    "content": "@context url is list of ActivityStreams URL and Hashtag",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K3Y5E428KQDP7N0V60913Q5M",
  "created_at": "2025-08-30T18:57:01.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/bCB1R4o0jfE",
  "url": "http://pasture-one-actor/object/bCB1R4o0jfE",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "@context url is list of ActivityStreams URL and Hashtag",
  "reblog": null,
  "account": {
    "id": "01K3Y5DQCATKE3219T6HGE9WRD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-08-30T18:56:48.022Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "header": "http://gotosocial/assets/default_header.png",
    "header_static": "http://gotosocial/assets/default_header.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 21,
    "last_status_at": "2025-08-30T18:57:01.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "01JWFBJTXM7GDMXXK40GW9WXT9",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}

Example 4

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://w3id.org/fep/5711"
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://gotosocial/users/cookie"
  ],
  "id": "http://pasture-one-actor/activity/zgP_fCgReyI",
  "published": "2025-08-30T18:57:02Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://gotosocial/users/cookie"
    ],
    "id": "http://pasture-one-actor/object/Em8hXZtnGDc",
    "published": "2025-08-30T18:57:02Z",
    "@context": [
      "https://www.w3.org/ns/activitystreams",
      "https://w3id.org/fep/5711"
    ],
    "content": "@context with ActivityStreams URL + w3id-fep document",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K3Y5E51GKS58SS7N7EP3H7C7",
  "created_at": "2025-08-30T18:57:02.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/Em8hXZtnGDc",
  "url": "http://pasture-one-actor/object/Em8hXZtnGDc",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "@context with ActivityStreams URL + w3id-fep document",
  "reblog": null,
  "account": {
    "id": "01K3Y5DQCATKE3219T6HGE9WRD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-08-30T18:56:48.022Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "header": "http://gotosocial/assets/default_header.png",
    "header_static": "http://gotosocial/assets/default_header.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 22,
    "last_status_at": "2025-08-30T18:57:02.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "01JWFBJTXM7GDMXXK40GW9WXT9",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}

Example 5

activity
{
  "@context": null,
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://gotosocial/users/cookie"
  ],
  "id": "http://pasture-one-actor/activity/YzmDlDrDLk8",
  "published": "2025-08-30T18:57:02Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://gotosocial/users/cookie"
    ],
    "id": "http://pasture-one-actor/object/r3mlEaw3Mk0",
    "published": "2025-08-30T18:57:02Z",
    "@context": null,
    "content": "no @context",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K3Y5E51GFKX51A3JQE45NWHW",
  "created_at": "2025-08-30T18:57:02.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/r3mlEaw3Mk0",
  "url": "http://pasture-one-actor/object/r3mlEaw3Mk0",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "no @context",
  "reblog": null,
  "account": {
    "id": "01K3Y5DQCATKE3219T6HGE9WRD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-08-30T18:56:48.022Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "header": "http://gotosocial/assets/default_header.png",
    "header_static": "http://gotosocial/assets/default_header.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 23,
    "last_status_at": "2025-08-30T18:57:02.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "01JWFBJTXM7GDMXXK40GW9WXT9",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}

Example 6

activity
{
  "@context": "http://strange.example/context",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://gotosocial/users/cookie"
  ],
  "id": "http://pasture-one-actor/activity/1C6S9piRBo0",
  "published": "2025-08-30T18:57:03Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://gotosocial/users/cookie"
    ],
    "id": "http://pasture-one-actor/object/0HB8zuDQ0RE",
    "published": "2025-08-30T18:57:03Z",
    "@context": "http://strange.example/context",
    "content": "@context is a broken url",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K3Y5E60RH7WS1DP4CDP4APNQ",
  "created_at": "2025-08-30T18:57:03.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/0HB8zuDQ0RE",
  "url": "http://pasture-one-actor/object/0HB8zuDQ0RE",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "@context is a broken url",
  "reblog": null,
  "account": {
    "id": "01K3Y5DQCATKE3219T6HGE9WRD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-08-30T18:56:48.022Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon2.png",
    "header": "http://gotosocial/assets/default_header.png",
    "header_static": "http://gotosocial/assets/default_header.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 24,
    "last_status_at": "2025-08-30T18:57:03.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "01JWFBJTXM7GDMXXK40GW9WXT9",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}