Appearance
Nostr Tags
Tags are key components of Nostr events that provide additional context, metadata, and relationships between events. They are especially important for the discoverability and interconnectedness of the Nostr protocol.
Available Tag Definitions
The following tags have detailed definitions in this documentation:
Tag Name | Description | Defined in |
---|---|---|
client | Identifies the client application that published an event | NIP-89 |
Tag Format
In Nostr events, tags are represented as arrays of strings within the tags
array of an event. The first element of a tag array is always the tag name, followed by one or more values.
Example:
json
{
"kinds": 1,
"tags": [
["client", "MyNostrClient"],
["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "", "reply"],
["p", "32e1827635450ebb3c5a7d12c1f8e7b2b514439ac10a67eef3d9fd9c5c68e245"]
],
// other fields...
}
Tag Categories
Tags in Nostr can serve several purposes:
- Referencing other events (e.g.,
e
tag for event references) - Referencing users (e.g.,
p
tag for pubkey references) - Providing metadata (e.g.,
client
tag for identifying the publishing application) - Defining relationships (e.g.,
d
tag for replaceable events) - Structuring content (e.g.,
subject
tag for setting a title)
Contributing
To add a new tag definition to this documentation, use the following command:
bash
deno task generate:tag <tag_name> <nip_number>