NIP-B0 - Web Bookmarking
Table of Contents
Web Bookmarking
draft
optional
This NIP defines kind:39701
(an addressable event) for a URI as a web bookmark which uses the HTTP (Hypertext transfer protocol) scheme.
These web bookmark events are addressable and deletable per NIP-09.
Editability
Web bookmarks are meant to be editable, so they should include a d
tag with an identifier for the bookmark. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same bookmark they may receive.
Format
The format uses an addressable event of kind:39701
.
The .content
of these events should be a detailed description of the web bookmark. It is required but can be an empty string.
The d
tag is required.
In this way web bookmarks events can be queried by the d
tag by clients, which is just their URL without the scheme, which is always and everywhere assumed to be https://
or http://
.
The querystring and the hash must be removed entirely, unless their requirement is explicitly stated either by the user or by some hardcoded list of URLs that rely on querystrings for basic routing provided by the client.
Metadata
For the date of the last update the .created_at
field should be used. For "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the t
tag should be used.
Other metadata fields can be added as tags to the event as necessary.
"published_at"
, for the timestamp in unix seconds (stringified) of the first time the bookmark was published"title"
, title about bookmark and can be used as a attribute for the HTML link element
Example event
{
"kind": 39701,
"id": "d7a92714f81d0f712e715556aee69ea6da6bfb287e6baf794a095d301d603ec7",
"pubkey": "2729620da105979b22acfdfe9585274a78c282869b493abfa4120d3af2061298",
"created_at": 1738869705,
"tags": [
// Required tags
["d", "alice.blog/post"],
// Optional tags
["published_at", "1738863000"],
["title", "Blog insights by Alice"],
["t", "post"],
["t", "insight"]
],
"content": "A marvelous insight by Alice about the nature of blogs and posts.",
"sig": "36d34e6448fe0223e9999361c39c492a208bc423d2fcdfc2a3404e04df7c22dc65bbbd62dbe8a4373c62e4d29aac285b5aa4bb9b4b8053bd6207a8b45fbd0c98"
}
Replies & Comments
Replies to kind 39701
MUST use kind 1111
events as comments with NIP-22.