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://mitra/users/admin",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/QsV2b9xplrU",
  "published": "2025-11-21T14:12:30Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mitra/users/admin"
    ],
    "id": "http://pasture-one-actor/object/_7CQcFLudZ8",
    "published": "2025-11-21T14:12:30Z",
    "content": "text",
    "tag": [
      {
        "type": "Hashtag",
        "name": "#test"
      }
    ]
  }
}
mitra
{
  "id": "019aa6c2-6da8-a8f2-e837-6598cf612fae",
  "uri": "http://pasture-one-actor/object/_7CQcFLudZ8",
  "url": "http://pasture-one-actor/object/_7CQcFLudZ8",
  "created_at": "2025-11-21T14:12:30.000Z",
  "edited_at": null,
  "account": {
    "id": "019aa6c2-1ffd-aa0d-ee0c-cce05fc8f170",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "actor_id": "http://pasture-one-actor/actor",
    "url": "http://pasture-one-actor/actor",
    "display_name": "Test Actor",
    "created_at": "2025-11-21T14:12:11.389Z",
    "note": "",
    "avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
    "header": "http://mitra/api/v1/accounts/identicon",
    "locked": false,
    "mention_policy": "none",
    "bot": false,
    "discoverable": true,
    "identity_proofs": [],
    "payment_options": [],
    "fields": [],
    "emojis": [],
    "followers_count": 0,
    "following_count": 0,
    "subscribers_count": 0,
    "statuses_count": 14,
    "source": null,
    "role": null,
    "authentication_methods": null,
    "client_config": null
  },
  "content": "text",
  "language": null,
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "visibility": "public",
  "sensitive": false,
  "spoiler_text": "",
  "pinned": false,
  "replies_count": 0,
  "favourites_count": 0,
  "reblogs_count": 0,
  "poll": null,
  "media_attachments": [],
  "quote": null,
  "mentions": [
    {
      "id": "019aa6c0-e4be-204c-88e2-876d15258046",
      "username": "admin",
      "acct": "admin",
      "url": "http://mitra/users/admin"
    }
  ],
  "tags": [
    {
      "name": "test",
      "url": "http://mitra/collections/tags/test"
    }
  ],
  "emojis": [],
  "favourited": false,
  "reblogged": false,
  "bookmarked": false,
  "pleroma": {
    "emoji_reactions": [],
    "in_reply_to_account_acct": null,
    "parent_visible": true,
    "quote": null,
    "quote_visible": true
  },
  "hidden": false,
  "ipfs_cid": null,
  "links": []
}

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://mitra/users/admin",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/k1QAqLq95Lc",
  "published": "2025-11-21T14:12:31Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mitra/users/admin"
    ],
    "id": "http://pasture-one-actor/object/tAPzpjAGMJU",
    "published": "2025-11-21T14:12:31Z",
    "content": "using as:Hashtag",
    "tag": [
      {
        "type": "as:Hashtag",
        "name": "#test"
      }
    ]
  }
}
mitra
{
  "id": "019aa6c2-7380-6613-a8ad-daac915022d8",
  "uri": "http://pasture-one-actor/object/tAPzpjAGMJU",
  "url": "http://pasture-one-actor/object/tAPzpjAGMJU",
  "created_at": "2025-11-21T14:12:31.000Z",
  "edited_at": null,
  "account": {
    "id": "019aa6c2-1ffd-aa0d-ee0c-cce05fc8f170",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "actor_id": "http://pasture-one-actor/actor",
    "url": "http://pasture-one-actor/actor",
    "display_name": "Test Actor",
    "created_at": "2025-11-21T14:12:11.389Z",
    "note": "",
    "avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
    "header": "http://mitra/api/v1/accounts/identicon",
    "locked": false,
    "mention_policy": "none",
    "bot": false,
    "discoverable": true,
    "identity_proofs": [],
    "payment_options": [],
    "fields": [],
    "emojis": [],
    "followers_count": 0,
    "following_count": 0,
    "subscribers_count": 0,
    "statuses_count": 15,
    "source": null,
    "role": null,
    "authentication_methods": null,
    "client_config": null
  },
  "content": "using as:Hashtag",
  "language": null,
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "visibility": "public",
  "sensitive": false,
  "spoiler_text": "",
  "pinned": false,
  "replies_count": 0,
  "favourites_count": 0,
  "reblogs_count": 0,
  "poll": null,
  "media_attachments": [],
  "quote": null,
  "mentions": [
    {
      "id": "019aa6c0-e4be-204c-88e2-876d15258046",
      "username": "admin",
      "acct": "admin",
      "url": "http://mitra/users/admin"
    }
  ],
  "tags": [],
  "emojis": [],
  "favourited": false,
  "reblogged": false,
  "bookmarked": false,
  "pleroma": {
    "emoji_reactions": [],
    "in_reply_to_account_acct": null,
    "parent_visible": true,
    "quote": null,
    "quote_visible": true
  },
  "hidden": false,
  "ipfs_cid": null,
  "links": []
}

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://mitra/users/admin",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/_LU1bGHHjhc",
  "published": "2025-11-21T14:12:33Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mitra/users/admin"
    ],
    "id": "http://pasture-one-actor/object/6Hh3KOZhpCw",
    "published": "2025-11-21T14:12:33Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": [
      {
        "name": "#test"
      }
    ]
  }
}
mitra
{
  "id": "019aa6c2-7961-7b48-90cb-a56e5748e208",
  "uri": "http://pasture-one-actor/object/6Hh3KOZhpCw",
  "url": "http://pasture-one-actor/object/6Hh3KOZhpCw",
  "created_at": "2025-11-21T14:12:33.000Z",
  "edited_at": null,
  "account": {
    "id": "019aa6c2-1ffd-aa0d-ee0c-cce05fc8f170",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "actor_id": "http://pasture-one-actor/actor",
    "url": "http://pasture-one-actor/actor",
    "display_name": "Test Actor",
    "created_at": "2025-11-21T14:12:11.389Z",
    "note": "",
    "avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
    "header": "http://mitra/api/v1/accounts/identicon",
    "locked": false,
    "mention_policy": "none",
    "bot": false,
    "discoverable": true,
    "identity_proofs": [],
    "payment_options": [],
    "fields": [],
    "emojis": [],
    "followers_count": 0,
    "following_count": 0,
    "subscribers_count": 0,
    "statuses_count": 16,
    "source": null,
    "role": null,
    "authentication_methods": null,
    "client_config": null
  },
  "content": "no type \u26a0\ufe0f ",
  "language": null,
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "visibility": "public",
  "sensitive": false,
  "spoiler_text": "",
  "pinned": false,
  "replies_count": 0,
  "favourites_count": 0,
  "reblogs_count": 0,
  "poll": null,
  "media_attachments": [],
  "quote": null,
  "mentions": [
    {
      "id": "019aa6c0-e4be-204c-88e2-876d15258046",
      "username": "admin",
      "acct": "admin",
      "url": "http://mitra/users/admin"
    }
  ],
  "tags": [
    {
      "name": "test",
      "url": "http://mitra/collections/tags/test"
    }
  ],
  "emojis": [],
  "favourited": false,
  "reblogged": false,
  "bookmarked": false,
  "pleroma": {
    "emoji_reactions": [],
    "in_reply_to_account_acct": null,
    "parent_visible": true,
    "quote": null,
    "quote_visible": true
  },
  "hidden": false,
  "ipfs_cid": null,
  "links": []
}

Example 4

activity
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mitra/users/admin",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/FsdN0kdiYuE",
  "published": "2025-11-21T14:12:34Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mitra/users/admin"
    ],
    "id": "http://pasture-one-actor/object/VFoF_k0xFsw",
    "published": "2025-11-21T14:12:34Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": [
      {
        "type": "Hashtag",
        "name": "#test"
      }
    ]
  }
}
mitra
{
  "id": "019aa6c2-7f45-6af3-0088-53177e39810b",
  "uri": "http://pasture-one-actor/object/VFoF_k0xFsw",
  "url": "http://pasture-one-actor/object/VFoF_k0xFsw",
  "created_at": "2025-11-21T14:12:34.000Z",
  "edited_at": null,
  "account": {
    "id": "019aa6c2-1ffd-aa0d-ee0c-cce05fc8f170",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "actor_id": "http://pasture-one-actor/actor",
    "url": "http://pasture-one-actor/actor",
    "display_name": "Test Actor",
    "created_at": "2025-11-21T14:12:11.389Z",
    "note": "",
    "avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
    "header": "http://mitra/api/v1/accounts/identicon",
    "locked": false,
    "mention_policy": "none",
    "bot": false,
    "discoverable": true,
    "identity_proofs": [],
    "payment_options": [],
    "fields": [],
    "emojis": [],
    "followers_count": 0,
    "following_count": 0,
    "subscribers_count": 0,
    "statuses_count": 17,
    "source": null,
    "role": null,
    "authentication_methods": null,
    "client_config": null
  },
  "content": "Hashtag not in @context \u26a0\ufe0f ",
  "language": null,
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "visibility": "public",
  "sensitive": false,
  "spoiler_text": "",
  "pinned": false,
  "replies_count": 0,
  "favourites_count": 0,
  "reblogs_count": 0,
  "poll": null,
  "media_attachments": [],
  "quote": null,
  "mentions": [
    {
      "id": "019aa6c0-e4be-204c-88e2-876d15258046",
      "username": "admin",
      "acct": "admin",
      "url": "http://mitra/users/admin"
    }
  ],
  "tags": [
    {
      "name": "test",
      "url": "http://mitra/collections/tags/test"
    }
  ],
  "emojis": [],
  "favourited": false,
  "reblogged": false,
  "bookmarked": false,
  "pleroma": {
    "emoji_reactions": [],
    "in_reply_to_account_acct": null,
    "parent_visible": true,
    "quote": null,
    "quote_visible": true
  },
  "hidden": false,
  "ipfs_cid": null,
  "links": []
}

Example 5

activity
{
  "@context": "https://www.w3.org/ns/activitystreams",
  "type": "Create",
  "actor": "http://pasture-one-actor/actor",
  "to": [
    "http://mitra/users/admin",
    "https://www.w3.org/ns/activitystreams#Public"
  ],
  "id": "http://pasture-one-actor/activity/3Q7DrARHT6U",
  "published": "2025-11-21T14:12:36Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://mitra/users/admin"
    ],
    "id": "http://pasture-one-actor/object/QcW7QxoIDVs",
    "published": "2025-11-21T14:12:36Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": [
      {
        "type": "as:Hashtag",
        "name": "#test"
      }
    ]
  }
}
mitra
{
  "id": "019aa6c2-8510-9e0a-6092-f5a09b003aca",
  "uri": "http://pasture-one-actor/object/QcW7QxoIDVs",
  "url": "http://pasture-one-actor/object/QcW7QxoIDVs",
  "created_at": "2025-11-21T14:12:36.000Z",
  "edited_at": null,
  "account": {
    "id": "019aa6c2-1ffd-aa0d-ee0c-cce05fc8f170",
    "username": "actor",
    "acct": "actor@pasture-one-actor",
    "actor_id": "http://pasture-one-actor/actor",
    "url": "http://pasture-one-actor/actor",
    "display_name": "Test Actor",
    "created_at": "2025-11-21T14:12:11.389Z",
    "note": "",
    "avatar": "http://mitra/api/v1/accounts/identicon?input=http://pasture-one-actor/actor",
    "header": "http://mitra/api/v1/accounts/identicon",
    "locked": false,
    "mention_policy": "none",
    "bot": false,
    "discoverable": true,
    "identity_proofs": [],
    "payment_options": [],
    "fields": [],
    "emojis": [],
    "followers_count": 0,
    "following_count": 0,
    "subscribers_count": 0,
    "statuses_count": 18,
    "source": null,
    "role": null,
    "authentication_methods": null,
    "client_config": null
  },
  "content": "Hashtag not in @context; as:Hashtag",
  "language": null,
  "in_reply_to_id": null,
  "in_reply_to_account_id": null,
  "reblog": null,
  "visibility": "public",
  "sensitive": false,
  "spoiler_text": "",
  "pinned": false,
  "replies_count": 0,
  "favourites_count": 0,
  "reblogs_count": 0,
  "poll": null,
  "media_attachments": [],
  "quote": null,
  "mentions": [
    {
      "id": "019aa6c0-e4be-204c-88e2-876d15258046",
      "username": "admin",
      "acct": "admin",
      "url": "http://mitra/users/admin"
    }
  ],
  "tags": [],
  "emojis": [],
  "favourited": false,
  "reblogged": false,
  "bookmarked": false,
  "pleroma": {
    "emoji_reactions": [],
    "in_reply_to_account_acct": null,
    "parent_visible": true,
    "quote": null,
    "quote_visible": true
  },
  "hidden": false,
  "ipfs_cid": null,
  "links": []
}