Skip to main content

How to query Web3.Storage

In this how-to guide, you'll learn how to query Web3.Storage for information about your files.

When you store a file with Web3.Storage, you receive a content identifier (CID) that you can use to retrieve the file. However, this CID can also be used to query the service for more details about how the data is stored on the decentralized storage networks that Web3.Storage uses under the hood.

This guide will show you how to use Web3.Storage's JavaScript client library or Go client library to get information about content stored on the network. To follow along, you'll need the API token from your Web3.Storage account. If you already have an account and a token, read on. If not, have a look at the quickstart guide to get up and running in just a few minutes for free.

Installing the client#

Creating a client instance#

Querying for status information#

Next steps#

If you haven't yet explored in depth how to store data using Web3.Storage, check out the storage how-to guide for a deep dive on how to upload files using the client libraries.

To learn in greater detail how to fetch your data using the Web3.Storage client, or directly from IPFS using a gateway or the IPFS command line, see the how-to guide on retrieval.