# IPFS search, filter and pagination

**URL:** <https://discuss.ipfs.tech/t/ipfs-search-filter-and-pagination/12860>\
**Category:** js-ipfs\
**Tags:** js-ipfs, search, files\
**Created:** [December 7, 2021, 1:05pm UTC](https://discuss.ipfs.tech/t/ipfs-search-filter-and-pagination/12860 "2021-12-07T13:05:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amrap030](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/amrap030/32/5756_2.png) [@amrap030](https://discuss.ipfs.tech/u/amrap030)\
**Post date:** [December 7, 2021, 1:05pm UTC](https://discuss.ipfs.tech/t/ipfs-search-filter-and-pagination/12860/1 "2021-12-07T13:05:29Z")

</div>

Hello together,

I have some questions regarding how to search, filter and paginate data, which is stored in IPFS. Let’s say I have a web application, that want’s to display several images I have stored in IPFS. In this case, I think I need to know the CID of each of these images beforehand. So this has to be hardcoded in the application I think. However, this is not suitable for a large amount of files. The question is, how can I find the files on IPFS without knowing the CID’s beforehand of each file and how can I only query the files I want?

In a traditional database, this would easily be done by several query phrases and I only get back the data I need. How is this typically done with IPFS and especially with the JS library? What I would like to have is some kind of directory, where I maybe only need one CID of the directory and then I can list all of the files under this directory. Is this possible? If yes, can I add/remove files to this directory while still having the same CID of a directory?

---

<div class="post-metadata">

**Author:** ![SionoiS](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/sionois/32/5103_2.png) [@SionoiS](https://discuss.ipfs.tech/u/SionoiS)\
**Post date:** [December 7, 2021, 2:08pm UTC](https://discuss.ipfs.tech/t/ipfs-search-filter-and-pagination/12860/2 "2021-12-07T14:08:06Z")

</div>

I would build indexes with IPLD and query theses, maybe it would work.
