Lemmy Site API

Site-level information and configuration

GitHub OpenAPI

Operations 5

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 /site Get site information · Get site information #
Ask an LLM
“What is my instance's name, description and sidebar?”
“Who are the admins and how many users does my instance have?”
Tell an agent
Show my site information.
Get the instance name, description and sidebar.
POST /site Create the site (initial setup) · Create the site #
Ask an LLM
“How do I set up a new Lemmy instance for the first time?”
“Can I require email verification when creating a new instance?”
Tell an agent
Create the site named {name}.
Create instance {name} with description {description} and icon {icon}.
PUT /site Edit site settings · Edit site settings #
Ask an LLM
“How do I turn off downvotes site-wide?”
“Can I change the site's sidebar text?”
Tell an agent
Set downvotes to {enable_downvotes}.
Change the site sidebar to {sidebar}.
GET /modlog Get the moderation log · Get moderation log #
Ask an LLM
“What has been done to a particular user or community?”
“Can I see the moderation log for one community?”
Tell an agent
Show the moderation log.
Show the moderation log for community {community_id}.
GET /federated_instances List federated instances · Get federated instances #
Ask an LLM
“Which instances does this instance federate with?”
“What instances does my instance block or allow?”
Tell an agent
List federated instances.
Show the instances this one 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-site-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-site-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Lemmy REST Site 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: Site
  description: Site-level information and configuration
paths:
  /site:
    get:
      operationId: getSite
      summary: Get site information
      description: Returns site information including configuration, admins, and statistics.
      tags:
      - Site
      security: []
      responses:
        '200':
          description: Site information
          content:
            application/json:
              schema:
                type: object
                properties:
                  site_view:
                    type: object
                  admins:
                    type: array
                    items:
                      type: object
                  version:
                    type: string
                  my_user:
                    type: object
                    nullable: true
                  all_languages:
                    type: array
                    items:
                      type: object
                  discussion_languages:
                    type: array
                    items:
                      $ref: '#/components/schemas/LanguageId'
    post:
      operationId: createSite
      summary: Create the site
      description: Create the site (used during initial setup). Requires admin.
      tags:
      - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              properties:
                name:
                  type: string
                sidebar:
                  type: string
                  nullable: true
                description:
                  type: string
                  nullable: true
                icon:
                  type: string
                  nullable: true
                banner:
                  type: string
                  nullable: true
                enable_downvotes:
                  type: boolean
                  nullable: true
                enable_nsfw:
                  type: boolean
                  nullable: true
                community_creation_admin_only:
                  type: boolean
                  nullable: true
                require_email_verification:
                  type: boolean
                  nullable: true
                require_application:
                  type: boolean
                  nullable: true
                application_question:
                  type: string
                  nullable: true
                private_instance:
                  type: boolean
                  nullable: true
                default_theme:
                  type: string
                  nullable: true
                default_post_listing_type:
                  $ref: '#/components/schemas/ListingType'
                legal_information:
                  type: string
                  nullable: true
                default_post_sort_type:
                  $ref: '#/components/schemas/SortType'
      responses:
        '200':
          description: Site created
          content:
            application/json:
              schema:
                type: object
    put:
      operationId: editSite
      summary: Edit site settings
      description: Update site-level settings. Requires admin.
      tags:
      - Site
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  nullable: true
                sidebar:
                  type: string
                  nullable: true
                description:
                  type: string
                  nullable: true
                enable_downvotes:
                  type: boolean
                  nullable: true
                enable_nsfw:
                  type: boolean
                  nullable: true
      responses:
        '200':
          description: Site updated
  /modlog:
    get:
      operationId: getModLog
      summary: Get moderation log
      description: Retrieve the moderation log for admin/mod actions.
      tags:
      - Site
      security: []
      parameters:
      - name: mod_person_id
        in: query
        schema:
          $ref: '#/components/schemas/PersonId'
      - name: community_id
        in: query
        schema:
          $ref: '#/components/schemas/CommunityId'
      - name: page
        in: query
        schema:
          type: integer
      - name: limit
        in: query
        schema:
          type: integer
      responses:
        '200':
          description: Moderation log entries
  /federated_instances:
    get:
      operationId: getFederatedInstances
      summary: Get federated instances
      description: Returns lists of instances that this instance federates with, blocks, or allows.
      tags:
      - Site
      security: []
      responses:
        '200':
          description: Federated instance lists
components:
  schemas:
    CommunityId:
      type: integer
      description: Unique identifier for a community
    PersonId:
      type: integer
      description: Unique identifier for a person/user
    LanguageId:
      type: integer
      description: Unique identifier for a language
    SortType:
      type: string
      enum:
      - Active
      - Hot
      - New
      - Old
      - TopDay
      - TopWeek
      - TopMonth
      - TopYear
      - TopAll
      - MostComments
      - NewComments
      - TopHour
      - TopSixHour
      - TopTwelveHour
      - TopThreeMonths
      - TopSixMonths
      - TopNineMonths
      - Controversial
      - Scaled
    ListingType:
      type: string
      enum:
      - All
      - Local
      - Subscribed
      - ModeratorView
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
externalDocs:
  description: Lemmy Documentation
  url: https://join-lemmy.org/docs/