Skip to content

Tag: i

Overview

The "i" tag is used to reference external identities and content identifiers. It serves multiple purposes across different NIPs:

  1. In NIP-39, it's used to link external user identities (like GitHub, Twitter, Mastodon) to a Nostr profile
  2. In NIP-35, it's used to provide reference identifiers for torrents (like IMDB IDs, TMDB IDs)
  3. In NIP-73, it's used to reference established global content identifiers (like ISBNs, ISANs, blockchain addresses)

Specification

PropertyValue
Tag Namei
Defined in[NIP-39], [NIP-35], [NIP-73]
Required forGeneral use

Format

["i", "<platform:identity>", "<proof>", ...]

or

["i", "<content_identifier>", "<optional_url_hint>", ...]

Usage Description

The "i" tag has different formats and uses depending on the context:

External User Identities (NIP-39)

In a Kind 0 event (user metadata), the "i" tag links a Nostr profile to external identities like GitHub, Twitter, etc.

Format:

  • First parameter: platform:identity where platform is the service name and identity is the username on that service
  • Second parameter: A string that points to a proof of owning the identity

Identity provider names SHOULD only include a-z, 0-9 and the characters ._-/ and MUST NOT include :.

Torrent References (NIP-35)

In a Kind 2003 event (Torrent), the "i" tag is used with prefixes to label content with references.

Format:

  • First parameter: prefix:value where prefix is the reference type (like imdb, tmdb) and value is the ID

External Content Identifiers (NIP-73)

The "i" tag can reference standardized global content identifiers like ISBNs, podcast GUIDs, movie ISANs, and blockchain addresses.

Format:

  • First parameter: The identifier with appropriate prefix (e.g., "isbn:9780765382030")
  • Second parameter (optional): A URL hint to redirect users if the client can't interpret the ID

Examples

User Profile External Identities (NIP-39)

json
["i", "github:semisol", "9721ce4ee4fceb91c9711ca2a6c9a5ab"]
["i", "twitter:semisol_public", "1619358434134196225"]
["i", "mastodon:bitcoinhackers.org/@semisol", "109775066355589974"]
["i", "telegram:1087295469", "nostrdirectory/770"]

Torrent References (NIP-35)

json
["i", "imdb:tt15239678"]
["i", "tmdb:movie:693134"]
["i", "ttvdb:movie:290272"]
["i", "tcat:video,movie,4k"]
["i", "newznab:2045"]

External Content Identifiers (NIP-73)

json
["i", "isbn:9780765382030"]
["i", "isan:0000-0000-401A-0000-7", "https://www.imdb.com/title/tt0120737"]
["i", "podcast:guid:c90e609a-df1e-596a-bd5e-57bcc8aad6cc"]
["i", "bitcoin:tx:a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]
["i", "ethereum:1:address:0xd8da6bf26964af9d7eed9e03e53415d37aa96045"]

Client Behavior

Clients SHOULD:

  • Process any "i" tags with more than 2 values for future extensibility
  • Validate the proofs for external identities when displaying user profiles
  • Normalize identity names if possible by replacing uppercase letters with lowercase letters
  • When using "i" tags for external content IDs, clients may provide interfaces to query all events associated with these IDs

Relay Behavior

Relays have no special behavior requirements for the "i" tag specifically. They should process events containing "i" tags according to their general event handling policies.

References

  • The "k" tag is often used alongside the "i" tag in NIP-73 to represent the external content ID kind

Notes

The "i" tag is quite versatile and has evolved to serve different purposes across NIPs. When implementing support for this tag, consider the context (event kind) to determine the appropriate interpretation.

For blockchain addresses and transactions, specific formats are defined in NIP-73, including chain IDs when necessary (e.g., for Ethereum).