IPFS Swarm API

The Swarm API from IPFS — 13 operation(s) for swarm.

Operations 13

POST /api/v0/swarm/addrs #
POST /api/v0/swarm/addrs/listen #
POST /api/v0/swarm/addrs/local #
POST /api/v0/swarm/connect #
POST /api/v0/swarm/disconnect #
POST /api/v0/swarm/filters #
POST /api/v0/swarm/filters/add #
POST /api/v0/swarm/filters/rm #
POST /api/v0/swarm/peering/add #
POST /api/v0/swarm/peering/ls #
POST /api/v0/swarm/peering/rm #
POST /api/v0/swarm/peers #
POST /api/v0/swarm/resources #

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-swarm-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-swarm-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: IPFS RPC Swarm 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: Swarm
paths:
  /api/v0/swarm/addrs:
    post:
      operationId: swarm/addrs
      description: List known addresses. Useful for debugging.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-addrs
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Addrs:
                  <string>:
                  - <string>
      tags:
      - Swarm
  /api/v0/swarm/addrs/listen:
    post:
      operationId: swarm/addrs/listen
      description: List interface listening addresses.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-addrs-listen
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/addrs/local:
    post:
      operationId: swarm/addrs/local
      description: List local addresses.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-addrs-local
      parameters:
      - name: id
        in: query
        description: Show peer ID in addresses.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/connect:
    post:
      operationId: swarm/connect
      description: Open connection to a given address.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-connect
      parameters:
      - name: arg
        in: query
        description: Address of peer to connect to.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/disconnect:
    post:
      operationId: swarm/disconnect
      description: Close connection to a given address.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-disconnect
      parameters:
      - name: arg
        in: query
        description: Address of peer to disconnect from.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/filters:
    post:
      operationId: swarm/filters
      description: Manipulate address filters.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-filters
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/filters/add:
    post:
      operationId: swarm/filters/add
      description: Add an address filter.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-filters-add
      parameters:
      - name: arg
        in: query
        description: Multiaddr to filter.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/filters/rm:
    post:
      operationId: swarm/filters/rm
      description: Remove an address filter.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-filters-rm
      parameters:
      - name: arg
        in: query
        description: Multiaddr filter to remove.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Strings:
                - <string>
      tags:
      - Swarm
  /api/v0/swarm/peering/add:
    post:
      operationId: swarm/peering/add
      description: Add peers into the peering subsystem.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-peering-add
      parameters:
      - name: arg
        in: query
        description: address of peer to add into the peering subsystem
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                ID: <peer-id>
                Status: <string>
      tags:
      - Swarm
  /api/v0/swarm/peering/ls:
    post:
      operationId: swarm/peering/ls
      description: List peers registered in the peering subsystem.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-peering-ls
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Peers:
                - Addrs:
                  - <multiaddr-string>
                  ID: peer-id
      tags:
      - Swarm
  /api/v0/swarm/peering/rm:
    post:
      operationId: swarm/peering/rm
      description: Remove a peer from the peering subsystem.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-peering-rm
      parameters:
      - name: arg
        in: query
        description: ID of peer to remove from the peering subsystem
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                ID: <peer-id>
                Status: <string>
      tags:
      - Swarm
  /api/v0/swarm/peers:
    post:
      operationId: swarm/peers
      description: List peers with open connections.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-peers
      parameters:
      - name: verbose
        in: query
        description: display all extra information.
        schema:
          type: boolean
      - name: streams
        in: query
        description: Also list information about open streams for each peer.
        schema:
          type: boolean
      - name: latency
        in: query
        description: Also list information about latency to each peer.
        schema:
          type: boolean
      - name: direction
        in: query
        description: Also list information about the direction of connection.
        schema:
          type: boolean
      - name: identify
        in: query
        description: Also list information about peers identify.
        schema:
          type: boolean
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example:
                Peers:
                - Addr: <string>
                  Direction: <int>
                  Identify:
                    Addresses:
                    - <string>
                    AgentVersion: <string>
                    ID: <string>
                    ProtocolVersion: <string>
                    Protocols:
                    - <string>
                    PublicKey: <string>
                  Latency: <string>
                  Muxer: <string>
                  Peer: <string>
                  Streams:
                  - Protocol: <string>
      tags:
      - Swarm
  /api/v0/swarm/resources:
    post:
      operationId: swarm/resources
      description: Get a summary of all resources accounted for by the libp2p Resource Manager.
      externalDocs:
        url: https://docs.ipfs.tech/reference/kubo/rpc/#api-v0-swarm-resources
      x-experimental: true
      parameters: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              example: <object>
      tags:
      - Swarm
externalDocs:
  url: https://docs.ipfs.tech/reference/kubo/rpc/