IPFS Block API

The Block API from IPFS — 4 operation(s) for block.

Operations 4

POST /api/v0/block/get Block/get #
POST /api/v0/block/put Block/put #
POST /api/v0/block/rm Block/rm #
POST /api/v0/block/stat Block/stat #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ipfs-block-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ipfs-block-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IPFS RPC Block API
  version: v0
  description: When a Kubo IPFS node is running as a daemon, it exposes an HTTP RPC API that allows you to control the node and run the same commands you can from the command line.
  x-providerName: IPFS
  x-logo:
    url: https://raw.githubusercontent.com/ipfs/ipfs-docs/55fe8bc6a53ba3b9023951fb4b432efbbc81fba5/docs/.vuepress/public/images/ipfs-logo.svg
servers:
- description: Local IPFS node
  url: http://localhost:5001
- description: Local IPFS node
  url: http://127.0.0.1:5001
- description: Infura hosted IPFS node
  url: https://ipfs.infura.io:5001
tags:
- name: Block
paths:
  /api/v0/block/get:
    post:
      operationId: block/get
      description: Get a raw IPFS block.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-block-get
      parameters:
      - name: arg
        in: query
        description: The CID of an existing block to get.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
      tags:
      - Block
      summary: Block/get
      x-summary-source: derived
  /api/v0/block/put:
    post:
      operationId: block/put
      description: Store input as an IPFS block.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-block-put
      parameters:
      - name: cid-codec
        in: query
        description: Multicodec to use in returned CID.
        schema:
          type: string
          default: raw
      - name: mhtype
        in: query
        description: Multihash hash function.
        schema:
          type: string
          default: sha2-256
      - name: mhlen
        in: query
        description: Multihash hash length.
        schema:
          type: integer
          default: -1
      - name: pin
        in: query
        description: Pin added blocks recursively.
        schema:
          type: boolean
          default: false
      - name: allow-big-block
        in: query
        description: 'Disable block size check and allow creation of blocks bigger than 1MiB. WARNING: such blocks won''t be transferable over the standard bitswap.'
        schema:
          type: boolean
          default: false
      - name: format
        in: query
        description: Use legacy format for returned CID (DEPRECATED).
        deprecated: true
        schema:
          type: string
      requestBody:
        description: Argument `data` is of file type. This endpoint expects one or several files (depending on the command) in the body of the request as 'multipart/form-data'.
        content: {}
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Key: <string>
                Size: <int>
      tags:
      - Block
      summary: Block/put
      x-summary-source: derived
  /api/v0/block/rm:
    post:
      operationId: block/rm
      description: Remove IPFS block(s) from the local datastore.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-block-rm
      parameters:
      - name: arg
        in: query
        description: CIDs of block(s) to remove.
        required: true
        schema:
          type: string
      - name: force
        in: query
        description: Ignore nonexistent blocks.
        schema:
          type: boolean
      - name: quiet
        in: query
        description: Write minimal output.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Error: <string>
                Hash: <string>
      tags:
      - Block
      summary: Block/rm
      x-summary-source: derived
  /api/v0/block/stat:
    post:
      operationId: block/stat
      description: Print information of a raw IPFS block.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-block-stat
      parameters:
      - name: arg
        in: query
        description: The CID of an existing block to stat.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Key: <string>
                Size: <int>
      tags:
      - Block
      summary: Block/stat
      x-summary-source: derived
externalDocs:
  url: https://docs.ipfs.tech/reference/kubo/rpc/