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": [
    "http://misskey/users/ac27zbxd33c70003",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/DWoHTt1SOH0",
  "published": "2025-08-30T19:31:03Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac27zbxd33c70003"
    ],
    "id": "http://pasture-one-actor/object/ct_NXp2n5sE",
    "published": "2025-08-30T19:31:03Z",
    "content": "text",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac281dy0v91q000i",
  "createdAt": "2025-08-30T19:31:03.000Z",
  "userId": "ac28186av91q0003",
  "user": {
    "id": "ac28186av91q0003",
    "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/ct_NXp2n5sE",
  "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": [
    "http://misskey/users/ac27zbxd33c70003",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/zmkFdbylJ0E",
  "published": "2025-08-30T19:31:04Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac27zbxd33c70003"
    ],
    "id": "http://pasture-one-actor/object/jU7cqhACxzA",
    "published": "2025-08-30T19:31:04Z",
    "content": "using as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac281epsv91q000k",
  "createdAt": "2025-08-30T19:31:04.000Z",
  "userId": "ac28186av91q0003",
  "user": {
    "id": "ac28186av91q0003",
    "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/jU7cqhACxzA",
  "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": [
    "http://misskey/users/ac27zbxd33c70003",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/KBxR7dzzmrs",
  "published": "2025-08-30T19:31:05Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac27zbxd33c70003"
    ],
    "id": "http://pasture-one-actor/object/QFOtVA2mwBs",
    "published": "2025-08-30T19:31:05Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": {
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac281fhkv91q000l",
  "createdAt": "2025-08-30T19:31:05.000Z",
  "userId": "ac28186av91q0003",
  "user": {
    "id": "ac28186av91q0003",
    "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/QFOtVA2mwBs",
  "clippedCount": 0
}

Example 4

activity
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://misskey/users/ac27zbxd33c70003",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/FzhDoeBxL30",
  "published": "2025-08-30T19:31:05Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac27zbxd33c70003"
    ],
    "id": "http://pasture-one-actor/object/OgpYtrpoQkY",
    "published": "2025-08-30T19:31:05Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac281fhkv91q000m",
  "createdAt": "2025-08-30T19:31:05.000Z",
  "userId": "ac28186av91q0003",
  "user": {
    "id": "ac28186av91q0003",
    "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/OgpYtrpoQkY",
  "clippedCount": 0
}

Example 5

activity
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://misskey/users/ac27zbxd33c70003",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/rx0INr8MQfg",
  "published": "2025-08-30T19:31:06Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://misskey/users/ac27zbxd33c70003"
    ],
    "id": "http://pasture-one-actor/object/cURjocK-F0w",
    "published": "2025-08-30T19:31:06Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
misskey
{
  "id": "ac281g9cv91q000n",
  "createdAt": "2025-08-30T19:31:06.000Z",
  "userId": "ac28186av91q0003",
  "user": {
    "id": "ac28186av91q0003",
    "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/cURjocK-F0w",
  "clippedCount": 0
}