{"id":"764baeb3f6e41a5561ab4447598ba9496190041361b39fe116f3af56b27909f3","pubkey":"2b39b4ffe62933df970e19366c22c1e092f953f83fcfed754e0f04d5a3b459f9","created_at":1781353189,"kind":30817,"tags":[["d","nip-32"],["title","NIP-32: Labeling"],["summary","Kind 1985 and the L and l tags, which attach a namespaced label to an event, a key, or an external identifier."],["s","draft"],["t","nostr"],["t","nip"],["k","1985","Label"],["alt","A specification: NIP-32: Labeling"],["client","openspecs-import"],["published_at","1686673874"],["proxy","https://github.com/nostr-protocol/nips/blob/656cecc7c0a815b6a2b218d3b5d6f078b3f4dbab/32.md","web"],["x","c41204757dde155eaaf169601d67c68f3445e1f6a2714a9064d0fcc79ab1acb8"]],"content":"NIP-32\n======\n\nLabeling\n--------\n\n`draft` `optional`\n\nThis NIP defines two new indexable tags to label events and a new event kind (`kind:1985`) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification.\n\nNew Tags:\n\n- `L` denotes a label namespace\n- `l` denotes a label\n\nLabel Namespace Tag\n----\n\nAn `L` tag can be any string, but publishers SHOULD ensure they are unambiguous by using a well-defined namespace\n(such as an ISO standard) or reverse domain name notation.\n\n`L` tags are RECOMMENDED in order to support searching by namespace rather than by a specific tag. The special `ugc`\n(\"user generated content\") namespace MAY be used when the label content is provided by an end user.\n\n`L` tags starting with `#` indicate that the label target should be associated with the label's value.\nThis is a way of attaching standard nostr tags to events, pubkeys, relays, urls, etc.\n\nLabel Tag\n----\n\nAn `l` tag's value can be any string. If using an `L` tag, `l` tags MUST include a mark matching an `L`\ntag value in the same event. If no `L` tag is included, a mark SHOULD still be included. If none is\nincluded, `ugc` is implied.\n\nLabel Target\n----\n\nThe label event MUST include one or more tags representing the object or objects being\nlabeled: `e`, `p`, `a`, `r`, or `t` tags. This allows for labeling of events, people, relays,\nor topics respectively. As with NIP-01, a relay hint SHOULD be included when using `e` and\n`p` tags.\n\nContent\n-------\n\nLabels should be short, meaningful strings. Longer discussions, such as for an\nexplanation of why something was labeled the way it was, should go in the event's `content` field.\n\nSelf-Reporting\n-------\n\n`l` and `L` tags MAY be added to other event kinds to support self-reporting. For events\nwith a kind other than 1985, labels refer to the event itself.\n\nExample events\n--------------\n\nA suggestion that multiple pubkeys be associated with the `permies` topic.\n\n```yaml\n{\n  \"kind\": 1985,\n  \"tags\": [\n    [\"L\", \"#t\"],\n    [\"l\", \"permies\", \"#t\"],\n    [\"p\", <pubkey1>, <relay_url>],\n    [\"p\", <pubkey2>, <relay_url>]\n  ],\n  // other fields...\n}\n```\n\nA report flagging violence toward a human being as defined by ontology.example.com.\n\n```yaml\n{\n  \"kind\": 1985,\n  \"tags\": [\n    [\"L\", \"com.example.ontology\"],\n    [\"l\", \"VI-hum\", \"com.example.ontology\"],\n    [\"p\", <pubkey1>, <relay_url>],\n    [\"p\", <pubkey2>, <relay_url>]\n  ],\n  // other fields...\n}\n```\n\nA moderation suggestion for a chat event.\n\n```yaml\n{\n  \"kind\": 1985,\n  \"tags\": [\n    [\"L\", \"nip28.moderation\"],\n    [\"l\", \"approve\", \"nip28.moderation\"],\n    [\"e\", <kind40_event_id>, <relay_url>]\n  ],\n  // other fields...\n}\n```\n\nAssignment of a license to an event.\n\n```yaml\n{\n  \"kind\": 1985,\n  \"tags\": [\n    [\"L\", \"license\"],\n    [\"l\", \"MIT\", \"license\"],\n    [\"e\", <event_id>, <relay_url>]\n  ],\n  // other fields...\n}\n```\n\nPublishers can self-label by adding `l` tags to their own non-1985 events. In this case, the kind 1 event's author\nis labeling their note as being related to Milan, Italy using ISO 3166-2.\n\n```yaml\n{\n  \"kind\": 1,\n  \"tags\": [\n    [\"L\", \"ISO-3166-2\"],\n    [\"l\", \"IT-MI\", \"ISO-3166-2\"]\n  ],\n  \"content\": \"It's beautiful here in Milan!\",\n  // other fields...\n}\n```\n\nAuthor is labeling their note language as English using ISO-639-1.\n\n```yaml\n{\n  \"kind\": 1,\n  \"tags\": [\n    [\"L\", \"ISO-639-1\"],\n    [\"l\", \"en\", \"ISO-639-1\"]\n  ],\n  \"content\": \"English text\",\n  // other fields...\n}\n```\n\nOther Notes\n-----------\n\nWhen using this NIP to bulk-label many targets at once, events may be requested for deletion using [NIP-09](nostr:naddr1qvzqqqrcvypzq2eeknl7v2fnm7tsuxfkds3vrcyjl9fls070a465urcy6k3mgk0eqqrxu6ts95crjpl6tec) and a replacement\nmay be published. We have opted not to use addressable/replaceable events for this due to the\ncomplexity in coming up with a standard `d` tag. In order to avoid ambiguity when querying,\npublishers SHOULD limit labeling events to a single namespace.\n\nBefore creating a vocabulary, explore how your use case may have already been designed and\nimitate that design if possible. Reverse domain name notation is encouraged to avoid\nnamespace clashes, but for the sake of interoperability all namespaces should be\nconsidered open for public use, and not proprietary. In other words, if there is a\nnamespace that fits your use case, use it even if it points to someone else's domain name.\n\nVocabularies MAY choose to fully qualify all labels within a namespace (for example,\n`[\"l\", \"com.example.vocabulary:my-label\"]`). This may be preferred when defining more\nformal vocabularies that should not be confused with another namespace when querying\nwithout an `L` tag. For these vocabularies, all labels SHOULD include the namespace\n(rather than mixing qualified and unqualified labels).\n\nA good heuristic for whether a use case fits this NIP is whether labels would ever be unique.\nFor example, many events might be labeled with a particular place, topic, or pubkey, but labels\nwith specific values like \"John Doe\" or \"3.18743\" are not labels, they are values, and should\nbe handled in some other way.\n\n\nAppendix: Known Ontologies\n--------------------------\n\nBelow is a non-exhaustive list of ontologies currently in widespread use.\n\n- [social ontology categories](https://github.com/CLARIAH/awesome-humanities-ontologies)\n","sig":"743e5bcbb1d1c7c105df82bae7e15afbb0ae6e9ef5ea2dcf640bb148a781b4123db6ce43bd2bb0e19946b8664e6b51a1799aad2ee93314e364cbc2277702b656"}