Reputation: 2274
Is there a way to search for files in IPFS by its filename? If I want for example search for a subject in IPFS, I suppose this subject is in the filename like some-subject.pdf, then, there is a way to retrieve the hashes of the files containing the word "subject"?
Upvotes: 7
Views: 3745
Reputation: 287
There is no API to query directly, as bcolin wrote in their answer, but someone is trying to make a search engine and tries to index documents found on IPFS.
The project IPFSearch is still in early beta at the time of writing but it can be found here:
/ipns/ipfsearch.xyz (untested by me)
or /ipns/QmSE8g9k5JS1vJ7y5znhSZikmybvdsm3yDj7sbKjPRqsJW (untested by me)
or, since the DHT is still super slow, through the gateway: https://ipfsearch.xyz
The announcement was done on discuss.ipfs.io
The project Github is here.
Good luck!
Upvotes: 3
Reputation: 81
No such thing exists in IPFS, and it's not something that could be implemented int he future because IPFS adresses each file by its hash. If you knew about the existence of a file on IPFS, then you'd have to download it (by adressing it using its hash) to know about its name.
Think about IPFS the same way you'd think about HTTP, but decentralized. It takes Google and its pagerank algorithm to search things on a HTTP-based web, and it'd probably the same with IPFS.
Upvotes: 6