IPFS Stats API

The Stats API from IPFS — 5 operation(s) for stats.

Operations 5

POST /api/v0/stats/bitswap #
POST /api/v0/stats/bw #
POST /api/v0/stats/dht #
POST /api/v0/stats/provide #
POST /api/v0/stats/repo #

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-stats-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-stats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IPFS RPC Stats 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.


    In many cases, using this RPC API is preferable to embedding IPFS directly in your program — it allows you to maintain peer connections that are longer lived than your app and you can keep a single IPFS node running instead of several if your app can be launched multiple times. In fact, the `ipfs` CLI commands use this RPC API when operating in online mode.'
  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: Stats
paths:
  /api/v0/stats/bitswap:
    post:
      operationId: stats/bitswap
      description: Show some diagnostic information on the bitswap agent.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-stats-bitswap
      parameters:
      - name: verbose
        in: query
        description: Print extra information.
        schema:
          type: boolean
      - name: human
        in: query
        description: Print sizes in human readable format (e.g., 1K 234M 2G).
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                BlocksReceived: <uint64>
                BlocksSent: <uint64>
                DataReceived: <uint64>
                DataSent: <uint64>
                DupBlksReceived: <uint64>
                DupDataReceived: <uint64>
                MessagesReceived: <uint64>
                Peers:
                - <string>
                ProvideBufLen: <int>
                Wantlist:
                - /: <cid-string>
      tags:
      - Stats
  /api/v0/stats/bw:
    post:
      operationId: stats/bw
      description: Print IPFS bandwidth information.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-stats-bw
      parameters:
      - name: peer
        in: query
        description: Specify a peer to print bandwidth for.
        schema:
          type: string
      - name: proto
        in: query
        description: Specify a protocol to print bandwidth for.
        schema:
          type: string
      - name: poll
        in: query
        description: Print bandwidth at an interval.
        schema:
          type: boolean
      - name: interval
        in: query
        description: 'Time interval to wait between updating output, if ''poll'' is true.This accepts durations such as "300s", "1.5h" or "2h45m". Valid time units are:

          "ns", "us" (or "µs"), "ms", "s", "m", "h".'
        schema:
          type: string
          default: 1s
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                RateIn: <float64>
                RateOut: <float64>
                TotalIn: <int64>
                TotalOut: <int64>
      tags:
      - Stats
  /api/v0/stats/dht:
    post:
      operationId: stats/dht
      description: Returns statistics about the node&#39;s DHT(s).
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-stats-dht
      parameters:
      - name: arg
        in: query
        description: The DHT whose table should be listed (wanserver, lanserver, wan, lan). wan and lan refer to client routing tables. When using the experimental DHT client only WAN is supported. Defaults to wan and lan.
        x-experimental: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Buckets:
                - LastRefresh: <string>
                  Peers:
                  - AgentVersion: <string>
                    Connected: <bool>
                    ID: <string>
                    LastQueriedAt: <string>
                    LastUsefulAt: <string>
                Name: <string>
      tags:
      - Stats
  /api/v0/stats/provide:
    post:
      operationId: stats/provide
      description: Returns statistics about the node&#39;s (re)provider system.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-stats-provide
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                AvgProvideDuration: <duration-ns>
                LastReprovideBatchSize: <int>
                LastReprovideDuration: <duration-ns>
                TotalProvides: <int>
      tags:
      - Stats
  /api/v0/stats/repo:
    post:
      operationId: stats/repo
      description: Get stats for the currently used repo.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-stats-repo
      parameters:
      - name: size-only
        in: query
        description: Only report RepoSize and StorageMax.
        schema:
          type: boolean
      - name: human
        in: query
        description: Print sizes in human readable format (e.g., 1K 234M 2G).
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                NumObjects: <uint64>
                RepoPath: <string>
                SizeStat:
                  RepoSize: <uint64>
                  StorageMax: <uint64>
                Version: <string>
      tags:
      - Stats
externalDocs:
  url: https://docs.ipfs.tech/reference/kubo/rpc/