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://friendica/profile/friend"
  ],
  "id": "http://pasture-one-actor/activity/bzAObWI1III",
  "published": "2025-09-01T09:31:22Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://friendica/profile/friend"
    ],
    "id": "http://pasture-one-actor/object/J-T23oR9C0w",
    "published": "2025-09-01T09:31:22Z",
    "content": "text",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
friendica
{
  "id": "17",
  "created_at": "2025-09-01T09:31:22.000Z",
  "edited_at": null,
  "in_reply_to_id": null,
  "in_reply_to_status": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "af",
  "uri": "http://pasture-one-actor/object/J-T23oR9C0w",
  "url": "http://pasture-one-actor/object/J-T23oR9C0w",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "text",
  "reblog": null,
  "quote": null,
  "application": {
    "name": "ActivityPub",
    "vapid_key": null
  },
  "account": {
    "id": "5",
    "username": "actor",
    "acct": "",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": true,
    "group": false,
    "created_at": "2025-09-01T09:31:08.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "avatar_static": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "header": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "header_static": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "last_status_at": "2025-09-01T00:00:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [
    {
      "name": "test",
      "url": "http://friendica/search?tag=test",
      "history": [],
      "following": false
    }
  ],
  "emojis": [],
  "card": null,
  "poll": null,
  "friendica": {
    "title": "",
    "changed_at": "2025-09-01T09:31:22.000Z",
    "commented_at": "2025-09-01T09:31:22.000Z",
    "received_at": "2025-09-01T09:31:22.000Z",
    "delivery_data": {
      "delivery_queue_count": null,
      "delivery_queue_done": null,
      "delivery_queue_failed": null
    },
    "dislikes_count": 0,
    "disliked": false,
    "network": "ActivityPub",
    "platform": "ActivityPub",
    "version": "",
    "sitename": "",
    "visibility": {
      "allow_cid": [],
      "deny_cid": [],
      "allow_gid": [],
      "deny_gid": []
    },
    "content": "text"
  }
}

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://friendica/profile/friend"
  ],
  "id": "http://pasture-one-actor/activity/9u8s_UQRHvQ",
  "published": "2025-09-01T09:31:23Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://friendica/profile/friend"
    ],
    "id": "http://pasture-one-actor/object/9EJwFKydDvM",
    "published": "2025-09-01T09:31:23Z",
    "content": "using as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
friendica
{
  "id": "18",
  "created_at": "2025-09-01T09:31:23.000Z",
  "edited_at": null,
  "in_reply_to_id": null,
  "in_reply_to_status": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "jv",
  "uri": "http://pasture-one-actor/object/9EJwFKydDvM",
  "url": "http://pasture-one-actor/object/9EJwFKydDvM",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "using as:Hashtag",
  "reblog": null,
  "quote": null,
  "application": {
    "name": "ActivityPub",
    "vapid_key": null
  },
  "account": {
    "id": "5",
    "username": "actor",
    "acct": "",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": true,
    "group": false,
    "created_at": "2025-09-01T09:31:08.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "avatar_static": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "header": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "header_static": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "last_status_at": "2025-09-01T00:00:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [
    {
      "name": "test",
      "url": "http://friendica/search?tag=test",
      "history": [],
      "following": false
    }
  ],
  "emojis": [],
  "card": null,
  "poll": null,
  "friendica": {
    "title": "",
    "changed_at": "2025-09-01T09:31:24.000Z",
    "commented_at": "2025-09-01T09:31:24.000Z",
    "received_at": "2025-09-01T09:31:23.000Z",
    "delivery_data": {
      "delivery_queue_count": null,
      "delivery_queue_done": null,
      "delivery_queue_failed": null
    },
    "dislikes_count": 0,
    "disliked": false,
    "network": "ActivityPub",
    "platform": "ActivityPub",
    "version": "",
    "sitename": "",
    "visibility": {
      "allow_cid": [],
      "deny_cid": [],
      "allow_gid": [],
      "deny_gid": []
    },
    "content": "using as:Hashtag"
  }
}

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://friendica/profile/friend"
  ],
  "id": "http://pasture-one-actor/activity/2hbP9U2muTE",
  "published": "2025-09-01T09:31:24Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://friendica/profile/friend"
    ],
    "id": "http://pasture-one-actor/object/89e4HFwDpPA",
    "published": "2025-09-01T09:31:24Z",
    "content": "no type \u26a0\ufe0f ",
    "tag": {
      "name": "#test"
    }
  }
}
friendica
{
  "id": "19",
  "created_at": "2025-09-01T09:31:24.000Z",
  "edited_at": null,
  "in_reply_to_id": null,
  "in_reply_to_status": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "en",
  "uri": "http://pasture-one-actor/object/89e4HFwDpPA",
  "url": "http://pasture-one-actor/object/89e4HFwDpPA",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "no type \u26a0\ufe0f",
  "reblog": null,
  "quote": null,
  "application": {
    "name": "ActivityPub",
    "vapid_key": null
  },
  "account": {
    "id": "5",
    "username": "actor",
    "acct": "",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": true,
    "group": false,
    "created_at": "2025-09-01T09:31:08.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "avatar_static": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "header": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "header_static": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "last_status_at": "2025-09-01T00:00:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null,
  "friendica": {
    "title": "",
    "changed_at": "2025-09-01T09:31:25.000Z",
    "commented_at": "2025-09-01T09:31:25.000Z",
    "received_at": "2025-09-01T09:31:25.000Z",
    "delivery_data": {
      "delivery_queue_count": null,
      "delivery_queue_done": null,
      "delivery_queue_failed": null
    },
    "dislikes_count": 0,
    "disliked": false,
    "network": "ActivityPub",
    "platform": "ActivityPub",
    "version": "",
    "sitename": "",
    "visibility": {
      "allow_cid": [],
      "deny_cid": [],
      "allow_gid": [],
      "deny_gid": []
    },
    "content": "no type \u26a0\ufe0f"
  }
}

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://friendica/profile/friend"
  ],
  "id": "http://pasture-one-actor/activity/b1KOEN_8iRI",
  "published": "2025-09-01T09:31:26Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://friendica/profile/friend"
    ],
    "id": "http://pasture-one-actor/object/m9PPhS-Cj34",
    "published": "2025-09-01T09:31:26Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context \u26a0\ufe0f ",
    "tag": {
      "type": "Hashtag",
      "name": "#test"
    }
  }
}
friendica
{
  "id": "20",
  "created_at": "2025-09-01T09:31:26.000Z",
  "edited_at": null,
  "in_reply_to_id": null,
  "in_reply_to_status": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "en",
  "uri": "http://pasture-one-actor/object/m9PPhS-Cj34",
  "url": "http://pasture-one-actor/object/m9PPhS-Cj34",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "Hashtag not in @context \u26a0\ufe0f",
  "reblog": null,
  "quote": null,
  "application": {
    "name": "ActivityPub",
    "vapid_key": null
  },
  "account": {
    "id": "5",
    "username": "actor",
    "acct": "",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": true,
    "group": false,
    "created_at": "2025-09-01T09:31:08.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "avatar_static": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "header": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "header_static": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "last_status_at": "2025-09-01T00:00:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [],
  "emojis": [],
  "card": null,
  "poll": null,
  "friendica": {
    "title": "",
    "changed_at": "2025-09-01T09:31:26.000Z",
    "commented_at": "2025-09-01T09:31:26.000Z",
    "received_at": "2025-09-01T09:31:26.000Z",
    "delivery_data": {
      "delivery_queue_count": null,
      "delivery_queue_done": null,
      "delivery_queue_failed": null
    },
    "dislikes_count": 0,
    "disliked": false,
    "network": "ActivityPub",
    "platform": "ActivityPub",
    "version": "",
    "sitename": "",
    "visibility": {
      "allow_cid": [],
      "deny_cid": [],
      "allow_gid": [],
      "deny_gid": []
    },
    "content": "Hashtag not in @context \u26a0\ufe0f"
  }
}

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://friendica/profile/friend"
  ],
  "id": "http://pasture-one-actor/activity/0MK_a7he8cc",
  "published": "2025-09-01T09:31:27Z",
  "object": {
    "type": "Note",
    "attributedTo": "http://pasture-one-actor/actor",
    "to": [
      "https://www.w3.org/ns/activitystreams#Public",
      "http://friendica/profile/friend"
    ],
    "id": "http://pasture-one-actor/object/lIoyoXK3W3g",
    "published": "2025-09-01T09:31:27Z",
    "@context": "https://www.w3.org/ns/activitystreams",
    "content": "Hashtag not in @context; as:Hashtag",
    "tag": {
      "type": "as:Hashtag",
      "name": "#test"
    }
  }
}
friendica
{
  "id": "21",
  "created_at": "2025-09-01T09:31:27.000Z",
  "edited_at": null,
  "in_reply_to_id": null,
  "in_reply_to_status": null,
  "in_reply_to_account_id": null,
  "sensitive": false,
  "spoiler_text": "",
  "visibility": "public",
  "language": "en",
  "uri": "http://pasture-one-actor/object/lIoyoXK3W3g",
  "url": "http://pasture-one-actor/object/lIoyoXK3W3g",
  "replies_count": 0,
  "reblogs_count": 0,
  "favourites_count": 0,
  "favourited": false,
  "reblogged": false,
  "muted": false,
  "bookmarked": false,
  "content": "Hashtag not in @context; as:Hashtag",
  "reblog": null,
  "quote": null,
  "application": {
    "name": "ActivityPub",
    "vapid_key": null
  },
  "account": {
    "id": "5",
    "username": "actor",
    "acct": "",
    "display_name": "Test Actor",
    "locked": false,
    "bot": false,
    "discoverable": true,
    "group": false,
    "created_at": "2025-09-01T09:31:08.000Z",
    "note": "",
    "url": "http://pasture-one-actor/actor",
    "avatar": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "avatar_static": "http://friendica/photo/contact/320/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "header": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068",
    "header_static": "http://friendica/photo/header/0700725d-72c7be8a-36a431191785fdc7?ts=1756719068&static=1",
    "followers_count": 0,
    "following_count": 0,
    "statuses_count": 0,
    "last_status_at": "2025-09-01T00:00:00.000Z",
    "emojis": [],
    "fields": []
  },
  "media_attachments": [],
  "mentions": [],
  "tags": [
    {
      "name": "test",
      "url": "http://friendica/search?tag=test",
      "history": [],
      "following": false
    }
  ],
  "emojis": [],
  "card": null,
  "poll": null,
  "friendica": {
    "title": "",
    "changed_at": "2025-09-01T09:31:27.000Z",
    "commented_at": "2025-09-01T09:31:27.000Z",
    "received_at": "2025-09-01T09:31:27.000Z",
    "delivery_data": {
      "delivery_queue_count": null,
      "delivery_queue_done": null,
      "delivery_queue_failed": null
    },
    "dislikes_count": 0,
    "disliked": false,
    "network": "ActivityPub",
    "platform": "ActivityPub",
    "version": "",
    "sitename": "",
    "visibility": {
      "allow_cid": [],
      "deny_cid": [],
      "allow_gid": [],
      "deny_gid": []
    },
    "content": "Hashtag not in @context; as:Hashtag"
  }
}