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/acg1try90vrs0003"
  ],
  "id": "http://pasture-one-actor/activity/WNnVHEzYxmw",
  "published": "2025-09-09T11:47:28Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/acg1try90vrs0003"
    ],
    "id": "http://pasture-one-actor/object/O2BOgRmcZOU",
    "published": "2025-09-09T11:47:28Z",
    "content": "text",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "acg1vqf4voex000i",
  "createdAt": "2025-09-09T11:47:28.000Z",
  "userId": "acg1vki1voex0003",
  "user": {
    "id": "acg1vki1voex0003",
    "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/O2BOgRmcZOU",
  "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/acg1try90vrs0003"
  ],
  "id": "http://pasture-one-actor/activity/ESbLOdQ4Iug",
  "published": "2025-09-09T11:47:29Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/acg1try90vrs0003"
    ],
    "id": "http://pasture-one-actor/object/qr0_1W_Ma0s",
    "published": "2025-09-09T11:47:29Z",
    "content": "using as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "acg1vr6wvoex000k",
  "createdAt": "2025-09-09T11:47:29.000Z",
  "userId": "acg1vki1voex0003",
  "user": {
    "id": "acg1vki1voex0003",
    "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/qr0_1W_Ma0s",
  "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/acg1try90vrs0003"
  ],
  "id": "http://pasture-one-actor/activity/ketlxbrY6lE",
  "published": "2025-09-09T11:47:30Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/acg1try90vrs0003"
    ],
    "id": "http://pasture-one-actor/object/7FFFd3ZEGFU",
    "published": "2025-09-09T11:47:30Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": {
      "name": "#test"
    }
  }
}
misskey
{
  "id": "acg1vryovoex000l",
  "createdAt": "2025-09-09T11:47:30.000Z",
  "userId": "acg1vki1voex0003",
  "user": {
    "id": "acg1vki1voex0003",
    "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/7FFFd3ZEGFU",
  "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/acg1try90vrs0003"
  ],
  "id": "http://pasture-one-actor/activity/_0W3Fs08liE",
  "published": "2025-09-09T11:47:30Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/acg1try90vrs0003"
    ],
    "id": "http://pasture-one-actor/object/vBEMPYqyKd0",
    "published": "2025-09-09T11:47:30Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "acg1vryovoex000m",
  "createdAt": "2025-09-09T11:47:30.000Z",
  "userId": "acg1vki1voex0003",
  "user": {
    "id": "acg1vki1voex0003",
    "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/vBEMPYqyKd0",
  "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/acg1try90vrs0003"
  ],
  "id": "http://pasture-one-actor/activity/GXXuaIb1vv0",
  "published": "2025-09-09T11:47:31Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/acg1try90vrs0003"
    ],
    "id": "http://pasture-one-actor/object/cYszg-uDhYI",
    "published": "2025-09-09T11:47:31Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "acg1vsqgvoex000n",
  "createdAt": "2025-09-09T11:47:31.000Z",
  "userId": "acg1vki1voex0003",
  "user": {
    "id": "acg1vki1voex0003",
    "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/cYszg-uDhYI",
  "clippedCount": 0
}