Nostr avatar
Nostr

Pricing

$0.45 / 1,000 results

Go to Apify Store
Nostr

Nostr

Developed by

Chris Grimmett

Chris Grimmett

Maintained by Community

Nostr is an open protocol for sending notes and other stuff. It is often used for social media, microblogs, photo sharing, and more. Use this actor to scrape Nostr profiles, notes, and events.

0.0 (0)

Pricing

$0.45 / 1,000 results

0

1

1

Last modified

13 hours ago

Apify Nostr Actor (NIP-19 and NIP-05 Fetcher)

This Apify actor fetches and normalizes Nostr profile data from nip19 identifiers (such as nprofile, npub, nevent, note) or nip05 addresses (ex: odell@primal.net).
It returns structured JSON output containing parsed metadata (display name, picture, about text, etc.) for each.

Input

The actor expects an input JSON object with a nip19 key containing an array of identifiers.

Example

apify run --input='{
"input_ids": [
"nprofile1qqsqfjg4mth7uwp307nng3z2em3ep2pxnljczzezg8j7dhf58ha7ejgpqqgze743",
"npub1uzt238htjzpq39dxmltlx60vxym9fetk9czz6kddq6fhvkf4z3usy9qtrh",
"npub1g9ysswt67fnyqfrsgtd8l9p0eyccxlydn5eq0cn3evhm9w7e5nkssvzlky",
"spritereplace98@walletofsatoshi.com",
"note1z6r4jupzuuk6pmxgmluxtlr93s4m57cm98lple2dmjs42e42rc4q4wqdvs"
]
}'

Output

The output is a JSON array of objects, where each object represents a decoded Nostr profile with all its metadata. Example Output

[{
"nostr_id": "nprofile1qqsqfjg4mth7uwp307nng3z2em3ep2pxnljczzezg8j7dhf58ha7ejgpqqgze743",
"results": [
{
"kind": 0,
"id": "c8371340fcb56445ab9e3e170eb1bee5c41069aeb49f5eb40d4b195fbbbc4e42",
"pubkey": "04c915daefee38317fa734444acee390a8269fe5810b2241e5e6dd343dfbecc9",
"created_at": 1757864644,
"tags": [],
"content": {
"display_name": "ODELL",
"name": "ODELL",
"picture": "https://m.primal.net/NcKe.jpg",
"banner": "https://m.primal.net/HqQz.jpg",
"about": "partner - ten31\ncofounder - opensats + bitcoin park\nfounding board - bitcoin policy institute ",
"lud16": "odell@primal.net",
"lud06": "",
"website": "https://odell.xyz",
"nip05": "odell@primal.net"
},
"sig": "6b5fde609f23f363cbe252cceb06033ce583ac96ec13d24d0a3043029ada72e5369494853f84353102ceed8c2bbf73bf88476dc3d1cd8f7ff915364687a4e4c5"
}
]
},
{
"nostr_id": "npub1rtlqca8r6auyaw5n5h3l5422dm4sry5dzfee4696fqe8s6qgudks7djtfs",
"results": [
{
"kind": 0,
"id": "c87525bc3bbfbb6c72a93710f3ad56cfb8ed0ae417218fd445df5459617728cc",
"pubkey": "1afe0c74e3d7784eba93a5e3fa554a6eeb01928d12739ae8ba4832786808e36d",
"created_at": 1755125731,
"tags": [],
"content": {
"lud06": "",
"nip05": "hodl@primal.net",
"website": "https://castr.me/npub1rtlqca8r6auyaw5n5h3l5422dm4sry5dzfee4696fqe8s6qgudks7djtfs",
"name": "HODL",
"lud16": "hodl@primal.net",
"display_name": "HODL",
"about": "A new world is struggling to be born. \n",
"banner": "https://i0.wp.com/the-avocado.org/wp-content/uploads/2022/04/831491-2.jpg?fit=1280%2C720&ssl=1",
"picture": "https://i.postimg.cc/yd4j6Znb/0-AE2325-A-C9-A0-475-C-8-ED3-F012-E5-E3-C426.gif"
},
"sig": "2f593f83b840bdc4d912aeb201b8475cf7b546031b97d48b3df174ddaf34e5c21c923a5113477fb79c7437302d0228d061c075510991ca7ff8fc5b2eab803dda"
}
]
},
{
"nostr_id": "note1z6r4jupzuuk6pmxgmluxtlr93s4m57cm98lple2dmjs42e42rc4q4wqdvs",
"results": [
{
"kind": 1,
"id": "1687597022e72da0ecc8dff865fc658c2bba7b1b29fe1fe54ddca15566aa1e2a",
"pubkey": "791b7f817d3223f2832c24693a9c0e8b9922631ab36ab9a3c0b47bfcbb1d32d1",
"created_at": 1759415455,
"tags": [
[
"e",
"5b33bc630de71d495c7ebd7246b98f68230989778a3f778e19ee95f60227e43d",
"",
"mention"
],
[
"p",
"1739d937dc8c0c7370aa27585938c119e25c41f6c441a5d34c6d38503e3136ef",
"",
"mention"
]
],
"content": "Great to see Marmots joining the nostr dev community! Welcome! 🦫🫂\nnostr:nevent1qqs9kvauvvx7w82ft3lt6ujxhx8ksgcf39mc50mh3cv7a90kqgn7g0gt9u0qj",
"sig": "f7e3403c80edf9584e2678e656d72fa38df443fa70da738b301c88e73eeb13d80ee2d3df24c3212e65f0f45c25c26017b4ad9faecbabe2d55aec17b12337a724"
}
]
},
{
"nostr_id": "nevent1qqsxrwm0hd3s3fddh4jc2574z3xzufq6qwuyz2rvv3n087zvym3dpaqprpmhxue69uhhqatzd35kxtnjv4kxz7tfdenju6t0xpnej4",
"results": [
{
"kind": 1,
"id": "61bb6fbb6308a5adbd658553d5144c2e241a03b841286c6466f3f84c26e2d0f4",
"pubkey": "b9e01dadc5daafc2334c549406d04c2d342509bc47f5b419ea4ab814a5c1dc66",
"created_at": 1697767185,
"tags": [],
"content": "Pensando aqui o tempo em termos de estrutura de gomos.",
"sig": "4614887e78cd25acba9898bfb403e41662bc467f6dc15455d999a80398243bb9b3b5eb60c2f177a5510188591ed0e336e726183fb2fca6249a5a04f738e20b40"
}
]
},
{
"nostr_id": "hodl@primal.net",
"results": [
{
"kind": 0,
"id": "c87525bc3bbfbb6c72a93710f3ad56cfb8ed0ae417218fd445df5459617728cc",
"pubkey": "1afe0c74e3d7784eba93a5e3fa554a6eeb01928d12739ae8ba4832786808e36d",
"created_at": 1755125731,
"tags": [],
"content": {
"lud06": "",
"nip05": "hodl@primal.net",
"website": "https://castr.me/npub1rtlqca8r6auyaw5n5h3l5422dm4sry5dzfee4696fqe8s6qgudks7djtfs",
"name": "HODL",
"lud16": "hodl@primal.net",
"display_name": "HODL",
"about": "A new world is struggling to be born. \n",
"banner": "https://i0.wp.com/the-avocado.org/wp-content/uploads/2022/04/831491-2.jpg?fit=1280%2C720&ssl=1",
"picture": "https://i.postimg.cc/yd4j6Znb/0-AE2325-A-C9-A0-475-C-8-ED3-F012-E5-E3-C426.gif"
},
"sig": "2f593f83b840bdc4d912aeb201b8475cf7b546031b97d48b3df174ddaf34e5c21c923a5113477fb79c7437302d0228d061c075510991ca7ff8fc5b2eab803dda"
}
]
}]

How It Works

The actor receives an array of nip19 identifiers (like nprofile, npub, note, or nevent). The actor queries the Nostr relays to fetch the corresponding event. The JSON content of the event is parsed into a structured object for easy consumption.

Example Usage in Code

If you want to call this actor programmatically from Node.js:

import { Actor } from 'apify';
await Actor.init();
const input = {
input_ids: [
'nprofile1qqsqfjg4mth7uwp307nng3z2em3ep2pxnljczzezg8j7dhf58ha7ejgpqqgze743',
'Odie@primal.net'
],
};
const run = await Actor.call('grimtechnet/nostr', input);
console.log(run.output);

Notes