Lemmy Federation API

ActivityPub federation and cross-instance operations

GitHub OpenAPI

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /resolve_object Fetch a remote federated object by URL · Resolve a federated object by URL #
Ask an LLM
“How do I fetch a remote ActivityPub object so my instance caches it?”
“Can I resolve a federated link from another Lemmy instance?”
Tell an agent
Resolve the federated object at {q}.
Fetch and cache the remote ActivityPub object {q}.
GET /federated_instances List federated instances · Get federated instances #
Ask an LLM
“Which instances does this Lemmy instance federate with?”
“Can I see the blocked or allowed instances?”
Tell an agent
List federated instances.
Show the instances this instance federates with.

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/lemmy:lemmy-federation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

lemmy-federation-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lemmy REST Federation API
  description: The Lemmy REST API provides programmatic access to all core platform features of Lemmy, a free, open-source, self-hostable federated link aggregator and discussion platform.
  version: 4.0.0
  license:
    name: AGPL-3.0
    url: https://github.com/LemmyNet/lemmy/blob/main/LICENSE
  contact:
    url: https://join-lemmy.org/docs/
servers:
- url: https://lemmy.world/api/v4
  description: Lemmy.world (largest public instance)
- url: https://{instance}/api/v4
  description: Any Lemmy instance
  variables:
    instance:
      default: lemmy.world
      description: The hostname of a Lemmy instance
security:
- bearerAuth: []
tags:
- name: Federation
  description: ActivityPub federation and cross-instance operations
paths:
  /resolve_object:
    get:
      operationId: resolveObject
      summary: Resolve a federated object by URL
      description: Fetch a remote ActivityPub object by URL, causing the instance to fetch and cache it.
      tags:
      - Federation
      parameters:
      - name: q
        in: query
        required: true
        schema:
          type: string
          format: uri
      responses:
        '200':
          description: Resolved object
  /federated_instances:
    get:
      operationId: getFederatedInstances
      summary: Get federated instances
      description: Returns lists of instances that this instance federates with, blocks, or allows.
      tags:
      - Federation
      security: []
      responses:
        '200':
          description: Federated instance lists
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Lemmy Documentation
  url: https://join-lemmy.org/docs/