Content in NOSTR
Content in NOSTR
There are various types of content, ShortTextNote (kind:1) LongFormContent (kind:30023), images (kind:20), videos (kind:21)
short note
PROFILE
The NIP nip10 defines kind:1 as a simple plaintext note.
Markup languages such as markdown and HTML SHOULD NOT be used.
The .content property contains some human-readable text.
Tags: 't' "tags"
example:
{
"content": "This note could be pinned.",
"created_at": 1759402704,
"id": "bcc67ea80da4be50a8ff581bd87910e8c5212fa5b8a240be1fa2263998352237",
"kind": 1,
"pubkey": "ec958f133faae0d4382fc446828650dfe8e461eefff5bc40f408dee1d55c7009",
"sig": "aeec39fdaea841e810d936b4312a6ee3d28d0578b4b6bf05033bcb1f8bb4478096101980bb246a2df2632756f893abf445ffa64f913b9084f462a906c456b999",
"tags": [
[
"t",
"orga"
],
[
"t",
"test"
]
]
}
LongFormContent
PROFILE
This NIP defines kind:30023 (an addressable event) for long-form text content, generally referred to as "articles" or "blog posts". kind:30024 has the same structure as kind:30023 and is used to save long form drafts.
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. Here we standardize 4 that may be useful, although they remain strictly optional:
- "title", for the article title
- "image", for a URL pointing to an image to be shown along with the title
- "summary", for the article summary
- "published_at", for the timestamp in unix seconds (stringified) of the first time the article was published
The .content of these events should be a string text in Markdown syntax. To maximize compatibility and readability between different clients and devices, any client that is creating long form notes:
- MUST NOT hard line-break paragraphs of text, such as arbitrary line breaks at 80 column boundaries.
- MUST NOT support adding HTML to Markdown.
example:
{
"kind": 30023,
"created_at": 1675642635,
"content": "Lorem [ipsum][[nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9](nostr:nevent1qqst8cujky046negxgwwm5ynqwn53t8aqjr6afd8g59nfqwxpdhylpcpzamhxue69uhhyetvv9ujuetcv9khqmr99e3k7mg8arnc9)] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at [nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu](nostr:naddr1qqzkjurnw4ksz9thwden5te0wfjkccte9ehx7um5wghx7un8qgs2d90kkcq3nk2jry62dyf50k0h36rhpdtd594my40w9pkal876jxgrqsqqqa28pccpzu).",
"tags": [
["d", "lorem-ipsum"],
["title", "Lorem Ipsum"],
["published_at", "1296962229"],
["t", "placeholder"],
["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"],
["a", "30023:a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919:ipsum", "wss://relay.nostr.org"]
],
"pubkey": "...",
"id": "..."
}
media posts
PROFILE
Picture-first feeds, like Instagram.
Web-clients:
kind:20
May have a content-warning.
{
"content": "an image only note",
"created_at": 1761128103,
"id": "439a9ca29023a5f981f54c5f540933c8afa9901ef1835430d7814b185edbd595",
"kind": 20,
"pubkey": "ec958f133faae0d4382fc446828650dfe8e461eefff5bc40f408dee1d55c7009",
"sig": "a7b6aaaf452683a5927f83782979fe0283a8a616f079cd82cf443e9c495591900d430bc492363b367d2f6afd33b37d24587ea5f40bea2bd1b0b4863760b6b4c4",
"tags": [
[
"title",
"an image only note"
],
[
"content-warning",
"my change your brain"
],
[
"imeta",
"url https://cdn.satellite.earth/739a6a96c229519f1a4af792fe854614c240ed04be9037ce7913fce638206c99.jpg",
"m image/png"
]
]
}