Skip to main content

Getting Started with the IPFS REST API

Updated on
Jan 4, 2024

Overview

QuickNode's decentralized storage solution allows you to upload, store, manage, and retrieve data on the IPFS, InterPlanetary File System, network. IPFS ensures data integrity, mitigates risks, and offers improved performance and resilience. With QuickNode's IPFS REST API, you can connect seamlessly to the IPFS network and utilize the following APIs:

  • Gateway: Create and manage gateway from the IPFS network through the gateway API.
  • Pinning: Pin, view and manage pinned content to ensure its availability.
  • Account: Fetch account usage information, including bandwidth and storage metrics.

The IPFS REST API Endpoint

To interact with the IPFS REST API, the following API endpoint is used:

https://api.quicknode.com/ipfs/rest

Authentication

To authenticate with the IPFS REST API, an API key is required to be sent with each request in the HTTP headers, you must first generate an API key. This key will serve as an authentication mechanism for your requests and should be included as an x-api-key header as shown below:

'x-api-key: your-api-key-here'

Making IPFS REST API Requests

In this documentation, you will see example requests made with cURL and various programming languages for each supported IPFS method. This section will explain how to execute it on your machine.

cURL

Most *nix based systems have cURL support out of the box. cURL is a command line tool and library for transferring data with URLs. Check if you have it by running the following:

curl -h

Python

To run our Python code examples, you'll need to have Python installed as well as the requests package. You can install this package with the following command:

python -m pip install requests

JavaScript

To run our JavaScript code examples, you'll need to have Node v18 and up installed. You can follow this official document to install the latest, stable version of Node globally. Check if you have it by running the following:

node -v

Ruby

To run our Ruby code examples, you'll need to have Ruby installed. You can follow this official installation document for more information. Check if you have it by running the following:

ruby -v

To learn more about QuickNode Storage, check out the following guide: How to Create and Host a Blog on IPFS using QuickNode Storage

We ❤️ Feedback

❓ We want to hear from you! Please take a few minutes to fill out our IPFS API feedback form and let us know what you currently think about it. This helps us further improve the documentation.

Share this doc