content: "+" for like, "-" for dislike, emoji character for emoji reaction
Kind 7 is a reaction to another event – a like, emoji, or custom reaction. Content is '+' for like, '-' for dislike, or an emoji/custom string. The 'e' tag points to the reacted event, the 'p' tag points to the event author. Clients aggregate kind 7 events to display like counts. Equivalent to a Twitter/Instagram like.
Details
Kind 7 (reaction) lets users express a response to another event without creating a full reply.
Content values: '+' : like/upvote (most common) '-' : dislike/downvote any emoji character: emoji reaction (e.g., '🔥', '❤️', '👀') empty string: treated as '+'
Required tags: ["e", "target-event-id", "relay-url"] – the event being reacted to ["p", "target-event-author-pubkey"] – the author of the reacted event ["k", "event-kind"] – optional: the kind of the event being reacted to
Like counts: clients count all kind 7 events with '+' content targeting a given event id to compute the like count. Counts are not authoritative – different relays may have different subsets of reactions.
Custom emoji reactions: NIP-25 also allows custom emoji reactions by including an ["emoji", "shortcode", "image-url"] tag. The content is the :shortcode: surrounded by colons.
NIP-25 is widely implemented: Damus, Primal, Amethyst, and most Nostr clients support kind 7.
Required Event Fields
Examples
{
"kind": 7,
"tags": [
["e", "target-event-id", "wss://relay.damus.io"],
["p", "target-author-pubkey"],
["k", "1"]
],
"content": "+",
"id": "...",
"sig": "..."
}{
"kind": 7,
"tags": [
["e", "target-event-id"],
["p", "target-author-pubkey"],
["emoji", "fire", "https://example.com/fire.gif"]
],
"content": ":fire:",
"id": "...",
"sig": "..."
}