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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/activity/PTIcNTEOnJA",
  "published": "2025-08-30T19:06:55Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/object/1NHPbn0BXks",
    "published": "2025-08-30T19:06:55Z",
    "content": "text",
    "tag": [
      {
        "type": "Hashtag",
        "name": "#test"
      },
      {
        "type": "Mention",
        "href": "http://hollo/@john"
      }
    ]
  }
}
hollo
{
  "id": "0198fc60-2098-7fc7-850e-0dbd0244f14b",
  "created_at": "2025-08-30T19:06:55.000Z",
  "in_reply_to_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/1NHPbn0BXks",
  "url": "http://pasture-one-actor/object/1NHPbn0BXks",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "text",
  "reblog": null,
  "quote_id": null,
  "quote": null,
  "application": null,
  "account": {
    "id": "0198fc5f-fd5f-7ea5-832e-88a2cd8e53de",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "created_at": "2025-08-30T19:06:45.932Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://hollo/image/avatars/original/missing.png",
    "avatar_static": "http://hollo/image/avatars/original/missing.png",
    "header": "http://hollo/image/headers/original/missing.png",
    "header_static": "http://hollo/image/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "moved": null,
    "last_status_at": null,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "emojis": [],
  "emoji_reactions": [],
  "poll": null,
  "filtered": null
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/activity/qFLodQts8jk",
  "published": "2025-08-30T19:06:56Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/object/b29Ve2XC-D4",
    "published": "2025-08-30T19:06:56Z",
    "content": "using as:Hashtag",
    "tag": [
      {
        "type": "as:Hashtag",
        "name": "#test"
      },
      {
        "type": "Mention",
        "href": "http://hollo/@john"
      }
    ]
  }
}
hollo
{
  "id": "0198fc60-2480-72c2-808b-d34d5da17837",
  "created_at": "2025-08-30T19:06:56.000Z",
  "in_reply_to_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/b29Ve2XC-D4",
  "url": "http://pasture-one-actor/object/b29Ve2XC-D4",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "using as:Hashtag",
  "reblog": null,
  "quote_id": null,
  "quote": null,
  "application": null,
  "account": {
    "id": "0198fc5f-fd5f-7ea5-832e-88a2cd8e53de",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "created_at": "2025-08-30T19:06:45.932Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://hollo/image/avatars/original/missing.png",
    "avatar_static": "http://hollo/image/avatars/original/missing.png",
    "header": "http://hollo/image/headers/original/missing.png",
    "header_static": "http://hollo/image/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "moved": null,
    "last_status_at": null,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "emojis": [],
  "emoji_reactions": [],
  "poll": null,
  "filtered": null
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/activity/3_t-3RZTsAk",
  "published": "2025-08-30T19:06:57Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/object/jw76NJp4Tjg",
    "published": "2025-08-30T19:06:57Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": [
      {
        "name": "#test"
      },
      {
        "type": "Mention",
        "href": "http://hollo/@john"
      }
    ]
  }
}
hollo
{
  "id": "0198fc60-2868-7913-b5c1-a1e354222336",
  "created_at": "2025-08-30T19:06:57.000Z",
  "in_reply_to_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/jw76NJp4Tjg",
  "url": "http://pasture-one-actor/object/jw76NJp4Tjg",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "no type \u26a0\ufe0f ",
  "reblog": null,
  "quote_id": null,
  "quote": null,
  "application": null,
  "account": {
    "id": "0198fc5f-fd5f-7ea5-832e-88a2cd8e53de",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "created_at": "2025-08-30T19:06:45.932Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://hollo/image/avatars/original/missing.png",
    "avatar_static": "http://hollo/image/avatars/original/missing.png",
    "header": "http://hollo/image/headers/original/missing.png",
    "header_static": "http://hollo/image/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "moved": null,
    "last_status_at": null,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "emojis": [],
  "emoji_reactions": [],
  "poll": null,
  "filtered": null
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/activity/XMnC4o5vHcY",
  "published": "2025-08-30T19:06:58Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/object/KsUnE5ICVDk",
    "published": "2025-08-30T19:06:58Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": [
      {
        "type": "Hashtag",
        "name": "#test"
      },
      {
        "type": "Mention",
        "href": "http://hollo/@john"
      }
    ]
  }
}
hollo
{
  "id": "0198fc60-2c50-7d03-84a1-c84af32ca21b",
  "created_at": "2025-08-30T19:06:58.000Z",
  "in_reply_to_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/KsUnE5ICVDk",
  "url": "http://pasture-one-actor/object/KsUnE5ICVDk",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "Hashtag not in @context \u26a0\ufe0f ",
  "reblog": null,
  "quote_id": null,
  "quote": null,
  "application": null,
  "account": {
    "id": "0198fc5f-fd5f-7ea5-832e-88a2cd8e53de",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "created_at": "2025-08-30T19:06:45.932Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://hollo/image/avatars/original/missing.png",
    "avatar_static": "http://hollo/image/avatars/original/missing.png",
    "header": "http://hollo/image/headers/original/missing.png",
    "header_static": "http://hollo/image/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "moved": null,
    "last_status_at": null,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "emojis": [],
  "emoji_reactions": [],
  "poll": null,
  "filtered": null
}

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://hollo/@john"
  ],
  "id": "http://pasture-one-actor/activity/bXwgJNjHKhc",
  "published": "2025-08-30T19:06:58Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://hollo/@john"
    ],
    "id": "http://pasture-one-actor/object/QbJ0WpKsqx4",
    "published": "2025-08-30T19:06:58Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": [
      {
        "type": "as:Hashtag",
        "name": "#test"
      },
      {
        "type": "Mention",
        "href": "http://hollo/@john"
      }
    ]
  }
}
hollo
{
  "id": "0198fc60-2c50-7d03-84a1-c84bba49daca",
  "created_at": "2025-08-30T19:06:58.000Z",
  "in_reply_to_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": null,
  "uri": "http://pasture-one-actor/object/QbJ0WpKsqx4",
  "url": "http://pasture-one-actor/object/QbJ0WpKsqx4",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "pinned": false,
  "content": "Hashtag not in @context; as:Hashtag",
  "reblog": null,
  "quote_id": null,
  "quote": null,
  "application": null,
  "account": {
    "id": "0198fc5f-fd5f-7ea5-832e-88a2cd8e53de",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "created_at": "2025-08-30T19:06:45.932Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://hollo/image/avatars/original/missing.png",
    "avatar_static": "http://hollo/image/avatars/original/missing.png",
    "header": "http://hollo/image/headers/original/missing.png",
    "header_static": "http://hollo/image/headers/original/missing.png",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "moved": null,
    "last_status_at": null,
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "card": null,
  "emojis": [],
  "emoji_reactions": [],
  "poll": null,
  "filtered": null
}