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/MRFZn9WrdQE",
  "published": "2025-09-03T18:24:11Z",
  "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/SCSqCAv97_I",
    "published": "2025-09-03T18:24:11Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "@context url as the ActivityStreams URL",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K48D4W7RRTTMRPGDRF2G71F5",
  "created_at": "2025-09-03T18:24:11.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/SCSqCAv97_I",
  "url": "http://pasture-one-actor/object/SCSqCAv97_I",
  "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": "01K48D4GXYW9KT1VG7A7FX4SYD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-09-03T18:23:59.442Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-09-03T18:24:11.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "014HZBWCFX2KRE5R0YTT30X5C4",
      "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/QkfgL9GAEqY",
  "published": "2025-09-03T18:24:11Z",
  "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/i5TDyOB8afQ",
    "published": "2025-09-03T18:24:11Z",
    "@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": "01K48D4W7R8V286BHS7JE01F29",
  "created_at": "2025-09-03T18:24:11.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/i5TDyOB8afQ",
  "url": "http://pasture-one-actor/object/i5TDyOB8afQ",
  "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": "01K48D4GXYW9KT1VG7A7FX4SYD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-09-03T18:23:59.442Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-09-03T18:24:11.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "014HZBWCFX2KRE5R0YTT30X5C4",
      "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/5Uvek-x-8r0",
  "published": "2025-09-03T18:24:12Z",
  "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/Fj_hvbjKX4k",
    "published": "2025-09-03T18:24:12Z",
    "@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": "01K48D4X70D8NPMM5ZYAM1E40P",
  "created_at": "2025-09-03T18:24:12.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/Fj_hvbjKX4k",
  "url": "http://pasture-one-actor/object/Fj_hvbjKX4k",
  "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": "01K48D4GXYW9KT1VG7A7FX4SYD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-09-03T18:23:59.442Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-09-03T18:24:12.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "014HZBWCFX2KRE5R0YTT30X5C4",
      "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/vFmpVvyjlag",
  "published": "2025-09-03T18:24:13Z",
  "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/Rboo9L22hCA",
    "published": "2025-09-03T18:24:13Z",
    "@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": "01K48D4Y687FWH2A8JMGXSMXZA",
  "created_at": "2025-09-03T18:24:13.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/Rboo9L22hCA",
  "url": "http://pasture-one-actor/object/Rboo9L22hCA",
  "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": "01K48D4GXYW9KT1VG7A7FX4SYD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-09-03T18:23:59.442Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-09-03T18:24:13.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "014HZBWCFX2KRE5R0YTT30X5C4",
      "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/MNwwnTksEjQ",
  "published": "2025-09-03T18:24:13Z",
  "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/hIEwra0yxxw",
    "published": "2025-09-03T18:24:13Z",
    "@context": null,
    "content": "no @context",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K48D4Y68KKHZPBKCRABFTCG2",
  "created_at": "2025-09-03T18:24:13.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/hIEwra0yxxw",
  "url": "http://pasture-one-actor/object/hIEwra0yxxw",
  "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": "01K48D4GXYW9KT1VG7A7FX4SYD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-09-03T18:23:59.442Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-09-03T18:24:13.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "014HZBWCFX2KRE5R0YTT30X5C4",
      "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/4Xv4YDbTC08",
  "published": "2025-09-03T18:24:14Z",
  "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/AyXcwsouj-s",
    "published": "2025-09-03T18:24:14Z",
    "@context": "http://strange.example/context",
    "content": "@context is a broken url",
    "tag": [
      {
        "type": "Mention",
        "href": "http://gotosocial/users/cookie"
      }
    ]
  }
}
gotosocial
{
  "id": "01K48D4Z5GZG342TXNPPJ3TQ01",
  "created_at": "2025-09-03T18:24:14.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/AyXcwsouj-s",
  "url": "http://pasture-one-actor/object/AyXcwsouj-s",
  "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": "01K48D4GXYW9KT1VG7A7FX4SYD",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": true,
    "discoverable": false,
    "bot": false,
    "created_at": "2025-09-03T18:23:59.442Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.png",
    "avatar_static": "http://gotosocial/assets/default_avatars/GoToSocial_icon4.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-09-03T18:24:14.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [
    {
      "id": "014HZBWCFX2KRE5R0YTT30X5C4",
      "username": "cookie",
      "url": "http://gotosocial/@cookie",
      "acct": "cookie"
    }
  ],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null
}