# Lemmy API
> Read Lemmy and the wider fediverse link-aggregator network (the federated Reddit alternative) in real time — across any instance, no login or key. Browse communities (with sort and listing-type filters) and any community's detail with its moderators and subscriber counts. Pull posts by community or instance-wide with Hot/Top/New/Active sorts, fetch any post and its threaded comments, and read instance-wide comment streams. Look up any user's profile with their posts and comments, run unified search over posts, comments, communities, users and URLs, resolve any federated object by its URL, list an instance's federated/allowed/blocked peers, and read the public moderation log. Pass ?instance=<host> to query any Lemmy server (default lemmy.world); every call is live (no cache) and returns the upstream Lemmy v3 shape, paginated with page + limit. Built for fediverse social listening, community and content aggregation, and moderation/analytics back-ends. A Lemmy/fediverse aggregator API — distinct from microblogging (mastodon, bluesky). No upstream key, no cache.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/lemmy-api/..."
```

## Pricing
- **Free** (Free) — 2,800 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 58,000 calls/Mo, 8 req/s
- **Pro** ($23/Mo) — 290,000 calls/Mo, 20 req/s
- **Mega** ($51/Mo) — 1,450,000 calls/Mo, 50 req/s

## Endpoints

### Instance

#### `GET /v1/instances` — Federated instances

**Parameters:**
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/instances"
```

**Response:**
```json
{
    "data": {
        "federated_instances": {
            "linked": [
                {
                    "id": 6857,
                    "domain": "arguos.com",
                    "updated": "2026-06-02T02:01:29.387559Z",
                    "version": "4.3.4",
                    "software": "mastodon",
                    "published": "2024-02-19T17:23:59.915220Z",
                    "federation_state": {
                        "fail_count": 0,
                        "instance_id": 6857,
                        "last_successful_id": 383528925,
                        "last_successful_published_time": "2026-06-02T08:31:43.704291Z"
                    }
                },
                {
                    "id": 5133,
                    "domain": "lemmy.conk.me",
                    "updated": "2024-09-22T00:00:06.655177Z",
                    "version": "0.18.4",
                    "software": "lemmy",
                    "published": "2023-08-18T17:10:16.903721Z",
                    "federation_state": {
                        "fail_count": 0,
                        "last_retry": "2024-09-24T03:14:25.145977Z",
                        "next_retry": "2024-09-24T03:14:25.945977Z",
                        "instance_id": 5133,
                        "last_successful_id": 239066140,
                        "last_successful_published_time": "2024-09-09T00:00:02.414467Z"
                    }
                },
                {
                    "id": 4827,
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/modlog` — Moderation log

**Parameters:**
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/modlog"
```

**Response:**
```json
{
    "data": {
        "added": [
            {
                "mod_add": {
                    "id": 57,
                    "when_": "2025-10-11T10:45:17.314530Z",
                    "removed": true,
                    "mod_person_id": 65329,
                    "other_person_id": 65329
                },
                "moderator": {
                    "id": 65329,
                    "bio": "![](https://lemmy.world/pictrs/image/963f3fd4-93a6-4802-8bee-ab3efd591871.png)\n![](https://lemmy.world/pictrs/image/3c3993dc-fa6b-4aa8-8b7b-fb1fcc715fc8.png)",
                    "name": "Thekingoflorda",
                    "local": true,
                    "avatar": "https://lemmy.world/pictrs/image/1b84003a-5234-4040-a840-e9b274c2d5c0.jpeg",
                    "banned": false,
                    "deleted": false,
                    "actor_id": "https://lemmy.world/u/Thekingoflorda",
                    "published": "2023-06-12T09:27:29.148364Z",
                    "bot_account": false,
                    "instance_id": 1
                },
                "modded_person": {
                    "id": 65329,
                    "bio": "![](https://lemmy.world/pictrs/image/963f3fd4-93a6-4802-8bee-ab3efd591871.png)\n![](https://lemmy.world/pictrs/image/3c3993dc-fa6b-4aa8-8b7b-fb1fcc715fc8.png)",
                    "name": "Thekingoflorda",
                    "local": true,
                    "avatar": "https://lemmy.world/pictrs/image/1b84003a-5234-4040-a840-e9b274c2d5
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/site` — Instance info

**Parameters:**
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/site"
```

**Response:**
```json
{
    "data": {
        "admins": [
            {
                "counts": {
                    "person_id": 2,
                    "post_count": 128,
                    "comment_count": 992
                },
                "person": {
                    "id": 2,
                    "bio": "Admin of a lot of fediverse servers.\nSee my accounts on [Keyoxide](https://keyoxide.world/hkp/0BCE3A7061CF0D42952A3A985CB7103EFB4C95CF)\n\nI receive a lot of messages, direct and mentions. I can't reply to them all.\nIf you have an issue, please e-mail at info@lemmy.world",
                    "name": "ruud",
                    "local": true,
                    "avatar": "https://lemmy.world/pictrs/image/2f75baeb-34c1-4a8b-8d1e-bc0a52b47a62.png",
                    "banned": false,
                    "banner": "https://lemmy.world/pictrs/image/2cddd018-5a89-4427-963a-025594190857.png",
                    "deleted": false,
                    "actor_id": "https://lemmy.world/u/ruud",
                    "published": "2023-06-01T07:01:45.388375Z",
                    "bot_account": false,
                    "instance_id": 1,
                    "display_name": "Ruud",
                    "matrix_user_id": "@ruud:lemmy.world"
                },
                "is_admin": true
            },
            {
                "counts": {
                    "person_id": 122582,
                    "post_count": 77,
                    "comment_count": 66
                },
           
…(truncated, see openapi.json for full schema)
```

### Communities

#### `GET /v1/communities` — Communities

**Parameters:**
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/communities"
```

**Response:**
```json
{
    "data": {
        "communities": [
            {
                "counts": {
                    "posts": 19744,
                    "comments": 870288,
                    "published": "2023-06-11T02:16:17.173483Z",
                    "subscribers": 85067,
                    "community_id": 2478,
                    "users_active_day": 3373,
                    "subscribers_local": 40074,
                    "users_active_week": 8566,
                    "users_active_month": 16346,
                    "users_active_half_year": 31508
                },
                "blocked": false,
                "community": {
                    "id": 2478,
                    "icon": "https://lemmy.world/pictrs/image/2a85bf08-5c07-4326-8dad-f549bfb2189e.png",
                    "name": "technology",
                    "nsfw": false,
                    "local": true,
                    "title": "Technology",
                    "banner": "https://lemmy.world/pictrs/image/be818d42-f96f-4a33-b963-2a6e35938d54.png",
                    "hidden": false,
                    "deleted": false,
                    "removed": false,
                    "updated": "2025-12-29T20:50:24.593029Z",
                    "actor_id": "https://lemmy.world/c/technology",
                    "published": "2023-06-11T02:16:17.173483Z",
                    "visibility": "Public",
                    "description": "This is a [most excellent](https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExN3N0N
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/community` — Community detail

**Parameters:**
- `name` (query, required, string) — Community name (or name@instance) Example: `technology`
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/community?name=technology"
```

**Response:**
```json
{
    "data": {
        "site": {
            "id": 1,
            "icon": "https://lemmy.world/pictrs/image/0fd47927-ca3a-4d2c-b2e4-a25353786671.png",
            "name": "Lemmy.World",
            "banner": "https://lemmy.world/pictrs/image/d22b2935-f27b-49f0-81e7-c81c21088467.png",
            "sidebar": "The World's Internet Frontpage  \nLemmy.World is a general-purpose Lemmy instance of various topics, for the entire world to use.\n\nBe polite and follow the rules ⚖ \nhttps://legal.lemmy.world/tos\n\n## Get started \nSee the [Getting Started Guide](https://support.lemmy.world/quickstart)\n\n## Donations 💗\nIf you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.\n\n**If you can, please use / switch to Ko-Fi, it has the lowest fees for us**\n\n[![Ko-Fi (Donate)](https://img.shields.io/badge/KoFi_Donate-FHFWorld-red?style=flat-square&logo=kofi&color=red)](https://ko-fi.com/fhfworld)\n\n[![Bunq (Donate)](https://img.shields.io/badge/Bunq_Donate-FHF-green?style=flat-square&logo=bunq&color=darkgreen)](https://bunq.me/fhf)\n\n[![Open Collective backers and sponsors](https://img.shields.io/opencollective/all/mastodonworld?style=flat-square&logo=opencollective&color=7FADF2)](https://opencollective.com/mastodonworld)\n\n[![Patreon](https://img.shields.io/badge/Patreon-MastodonWorld-green?style=flat-square&logo=patreon&color=lightblue)](https://patreon.com/mastodonworld)\n\n[![Liberapay patrons](https://im
…(truncated, see openapi.json for full schema)
```

### Posts

#### `GET /v1/comments` — Comment stream

**Parameters:**
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/comments"
```

**Response:**
```json
{
    "data": {
        "comments": [
            {
                "post": {
                    "id": 47654461,
                    "body": "Hi all, \n\nI want to spin up a small home server. Nothing crazy, maybe 4 or 8GB ram at most. 1 Docker instance running a few privacy frontends (Invidious, Redlib, Xcancel, SearxNG, etc.) and split tunneling VPN connections for each one.\n\nObviously, a Raspberry Pi 4 or higher is the internet's favorite choice, but I don't need wireless connectivity, I just need a single HDMI and 2 USB ports to get everything set up, one ethernet port, and a dream in my heart.\n\nHas anyone use alternatives like Le Potato or Orange Pi? I'm curious what their community support is like, and if there's a FOSS-friendly standard.\n\nThanks!",
                    "name": "Question: What are some alternatives to a Raspberry Pi good for a small home server?",
                    "nsfw": false,
                    "ap_id": "https://lemmy.world/post/47654461",
                    "local": true,
                    "locked": false,
                    "deleted": false,
                    "removed": false,
                    "published": "2026-06-02T06:42:01.114412Z",
                    "creator_id": 11977639,
                    "language_id": 37,
                    "community_id": 116,
                    "featured_local": false,
                    "featured_community": false
                },
                "saved": false,
                "counts": {
  
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/post` — Post detail

**Parameters:**
- `id` (query, required, string) — Post id
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/post"
```

#### `GET /v1/post/comments` — Post comments

**Parameters:**
- `post_id` (query, required, string) — Post id
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/post/comments"
```

#### `GET /v1/posts` — Posts

**Parameters:**
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/posts"
```

**Response:**
```json
{
    "data": {
        "posts": [
            {
                "post": {
                    "id": 47657117,
                    "url": "https://www.businessinsider.com/peter-thiel-argentina-billionaire-moving-abroad-2026-5",
                    "name": "Peter Thiel's move to Argentina reflects a growing trend among billionaires seeking a 'plan B' abroad",
                    "nsfw": false,
                    "ap_id": "https://lemmy.world/post/47657117",
                    "local": true,
                    "locked": false,
                    "deleted": false,
                    "removed": false,
                    "published": "2026-06-02T08:01:32.988279Z",
                    "creator_id": 21436577,
                    "embed_title": "Peter Thiel's move to Argentina reflects a growing trend among billionaires seeking a 'plan B' abroad",
                    "language_id": 37,
                    "community_id": 2840,
                    "thumbnail_url": "https://lemmy.world/pictrs/image/4faa4eee-a9c9-4c64-97d5-6d923aa51889.jpeg",
                    "featured_local": false,
                    "url_content_type": "text/html; charset=utf-8",
                    "embed_description": "Peter Thiel is reportedly moving to Argentina, part of a trend among billionaires looking to live abroad as they hedge their bets on the US.",
                    "featured_community": false
                },
                "read": false,
                "saved": false,
                "c
…(truncated, see openapi.json for full schema)
```

### Users

#### `GET /v1/user` — User profile + content

**Parameters:**
- `username` (query, required, string) — Username (or user@instance)
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/user"
```

### Search

#### `GET /v1/resolve` — Resolve federated object by URL

**Parameters:**
- `q` (query, required, string) — Object URL
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/resolve"
```

#### `GET /v1/search` — Search

**Parameters:**
- `q` (query, required, string) — Query Example: `linux`
- `instance` (query, optional, string) — Lemmy host (default lemmy.world)
- `limit` (query, optional, string) — Page size

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/search?q=linux"
```

**Response:**
```json
{
    "data": {
        "posts": [
            {
                "post": {
                    "id": 4544125,
                    "url": "https://lemmy.ml/pictrs/image/52bd0a21-b549-4dbe-ae42-0c8613e40e14.jpeg",
                    "body": "",
                    "name": "It either runs on Linux or refund",
                    "nsfw": false,
                    "ap_id": "https://lemmy.ml/post/4488445",
                    "local": false,
                    "locked": false,
                    "deleted": false,
                    "removed": false,
                    "published": "2023-09-06T09:10:32.206827Z",
                    "creator_id": 344054,
                    "language_id": 0,
                    "community_id": 37,
                    "thumbnail_url": "https://lemmy.ml/pictrs/image/56df087b-fc0b-405e-85bd-25ae9f60bb47.jpeg",
                    "featured_local": false,
                    "featured_community": false
                },
                "read": false,
                "saved": false,
                "counts": {
                    "score": 2952,
                    "post_id": 4544125,
                    "upvotes": 3037,
                    "comments": 307,
                    "downvotes": 85,
                    "published": "2023-09-06T09:10:32.206827Z",
                    "newest_comment_time": "2026-04-02T10:21:26.407231Z"
                },
                "hidden": false,
                "creator": {
                    "id": 344054,
        
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/lemmy-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "auth": "none upstream; gateway requires x-api-key",
        "name": "Lemmy API",
        "note": "Pass ?instance=<host> for any Lemmy server (default lemmy.world). Live, no cache. Pagination via page + limit.",
        "source": "Lemmy v3 REST API (public, cross-instance)",
        "endpoints": 12,
        "default_instance": "lemmy.world"
    },
    "meta": {
        "timestamp": "2026-06-02T08:33:03.778Z",
        "request_id": "e909b409-5cf0-497a-967c-387f9c5ecc9b"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/lemmy-api
OpenAPI spec: https://www.oanor.com/api/lemmy-api/openapi.json
