Skip to content

Hashtags and JSON-LD

The examples here are various variations of creating the Hashtag element in the tag list. These variations can be useful in understanding how strict an application sees JSON-LD.

Hashtags are a good illustration of JSON-LD parsing as Hashtag is not part of the ActivityStreams vocabulary.

All examples except the first are questionable, and probably should not be used when publishing to the Fediverse. The examples marked with ⚠️ are expected to fail with a JSON-LD parser. The examples using as:Hashtag are expected to fail with a JSON only parser.

Examples

Example 1

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ac7wjo0hjhdg0003"
  ],
  "id": "http://pasture-one-actor/activity/MjIZJkhs-e8",
  "published": "2025-09-03T18:57:20Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac7wjo0hjhdg0003"
    ],
    "id": "http://pasture-one-actor/object/97vVOAxMcqY",
    "published": "2025-09-03T18:57:20Z",
    "content": "text",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac7wlfnk3t7j000i",
  "createdAt": "2025-09-03T18:57:20.000Z",
  "userId": "ac7wl9qt3t7j0003",
  "user": {
    "id": "ac7wl9qt3t7j0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "text",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "tags": [
    "test"
  ],
  "fileIds": [],
  "files": [],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/97vVOAxMcqY",
  "clippedCount": 0
}

Example 2

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ac7wjo0hjhdg0003"
  ],
  "id": "http://pasture-one-actor/activity/Uwjfvb9s32M",
  "published": "2025-09-03T18:57:21Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac7wjo0hjhdg0003"
    ],
    "id": "http://pasture-one-actor/object/1FCraAsq5yg",
    "published": "2025-09-03T18:57:21Z",
    "content": "using as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac7wlgfc3t7j000k",
  "createdAt": "2025-09-03T18:57:21.000Z",
  "userId": "ac7wl9qt3t7j0003",
  "user": {
    "id": "ac7wl9qt3t7j0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "using as:Hashtag",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [],
  "files": [],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/1FCraAsq5yg",
  "clippedCount": 0
}

Example 3

activity
{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    {
      "Hashtag": "as:Hashtag",
      "sensitive": "as:sensitive"
    }
  ],
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "https://www.w3.org/ns/activitystreams#Public",
    "http://misskey/users/ac7wjo0hjhdg0003"
  ],
  "id": "http://pasture-one-actor/activity/8vpeEMUIBXg",
  "published": "2025-09-03T18:57:22Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac7wjo0hjhdg0003"
    ],
    "id": "http://pasture-one-actor/object/fZtTor73wVo",
    "published": "2025-09-03T18:57:22Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": {
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac7wlh743t7j000l",
  "createdAt": "2025-09-03T18:57:22.000Z",
  "userId": "ac7wl9qt3t7j0003",
  "user": {
    "id": "ac7wl9qt3t7j0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "no type \u26a0\ufe0f",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [],
  "files": [],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/fZtTor73wVo",
  "clippedCount": 0
}

Example 4

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://misskey/users/ac7wjo0hjhdg0003"
  ],
  "id": "http://pasture-one-actor/activity/_02VcsHP2Y0",
  "published": "2025-09-03T18:57:22Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac7wjo0hjhdg0003"
    ],
    "id": "http://pasture-one-actor/object/Sz9X9RwNdog",
    "published": "2025-09-03T18:57:22Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac7wlh743t7j000m",
  "createdAt": "2025-09-03T18:57:22.000Z",
  "userId": "ac7wl9qt3t7j0003",
  "user": {
    "id": "ac7wl9qt3t7j0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "Hashtag not in @context \u26a0\ufe0f",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "tags": [
    "test"
  ],
  "fileIds": [],
  "files": [],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/Sz9X9RwNdog",
  "clippedCount": 0
}

Example 5

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://misskey/users/ac7wjo0hjhdg0003"
  ],
  "id": "http://pasture-one-actor/activity/CvCKrulGT18",
  "published": "2025-09-03T18:57:23Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac7wjo0hjhdg0003"
    ],
    "id": "http://pasture-one-actor/object/BqcDy-3CFmM",
    "published": "2025-09-03T18:57:23Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac7wlhyw3t7j000n",
  "createdAt": "2025-09-03T18:57:23.000Z",
  "userId": "ac7wl9qt3t7j0003",
  "user": {
    "id": "ac7wl9qt3t7j0003",
    "name": "Test Actor",
    "username": "actor",
    "host": "pasture-one-actor",
    "avatarUrl": "http://misskey/identicon/actor@pasture-one-actor",
    "avatarBlurhash": null,
    "avatarDecorations": [],
    "isBot": false,
    "isCat": false,
    "instance": {
      "name": null,
      "softwareName": null,
      "softwareVersion": null,
      "iconUrl": null,
      "faviconUrl": null,
      "themeColor": null
    },
    "emojis": {},
    "onlineStatus": "unknown"
  },
  "text": "Hashtag not in @context; as:Hashtag",
  "cw": null,
  "visibility": "public",
  "localOnly": false,
  "reactionAcceptance": null,
  "renoteCount": 0,
  "repliesCount": 0,
  "reactionCount": 0,
  "reactions": {},
  "reactionEmojis": {},
  "emojis": {},
  "fileIds": [],
  "files": [],
  "replyId": null,
  "renoteId": null,
  "uri": "http://pasture-one-actor/object/BqcDy-3CFmM",
  "clippedCount": 0
}