Is there a way to determine the number of pins of a hash, network-wide?

I’m building a website for watching videos. Each video is served via IPFS.

One of the goals of the site is to raise awareness of IPFS and encouraging participation. To that end, I would like to show a statistic on every video which shows the number of times the video has been pinned.

So my question is as follows. Is it possible to use the IPFS CLI or API to determine the pin count of a specific hash?

I’m 99% sure this info is not available, in any systematic way. Usually however only the person or organization wanting to actually store data will have a pin on it, so the number of pins wouldn’t be all that meaningful as any kind of indicator of how popular that file really is.

ipfs dht findprovs <cids> can give you an approximation of how many people are seeding certain CID in the network.


@hector To clarify what you’re saying, there may be only 1 pin on a file even if it’s being seeded by thousands right? But still the number of seeding gateways might be an approximation (or measure of) ‘popularity’ of a file?

Yes, that is correct. (the number of seeding peers).

1 Like

Thanks for this. I’m bummed that there is not a way to get a pin count. I was interested in this both as an indicator of popularity, and as a warning for a community who is working together to permanently persist a set of videos.

I like the saying, “If it doesn’t exist in 3 places it doesn’t exist at all.” I’m extending that idea to replications, hoping for at least 3 pins for each video.

It’s an experimental idea, after all. For visitors to host a video file without incentives in place, it could be asking for a lot. I suppose that’s what Filecoin is for!

Anyway, thanks again.

1 Like

If you don’t mind, what’s your site’s domain name/IPNS? I’d love to keep it’s stuff pinned. :slight_smile:

Thank you for the offer! I appreciate that. Unfortunately, I can’t share the link here because my site is NSFW (porn).