Does anyone provide REST API access for nostr events? Say, I need a follower count for a particular npub.

Im not running a relay and Claude is having trouble implementing this feature using NDK. I thought it was something easy but I guess not.

#AskNostr

Reply to this note

Please Login to reply.

Discussion

Thanks! I also found my own caching service implementation. I’ll try it first!

Cool 😎

To build that you would need to build up an up-to-date, *global* view of nostr, which is not only an anti-pattern but quite literally impossible.

You can try (and people do) but because there is no central server, the follower count will always be wrong.

I’ll try to cache only the last 90 days worth of kind:3 events and use that. I only need an approximate follow count, so this seems reasonable enough.

Hm, no, that’s not how it works, it seems . Lol