# Lemmy community posts

Posts of one Lemmy community, or of the whole federated network seen by lemmy.world when community is omitted, sorted hot, newest, top over a period or most. Takes community, sort, limit and more, all optional.

Posts of one Lemmy community, or of the whole federated network seen by lemmy.world when community is omitted, sorted hot, newest, top over a period or most commented: title, link, body, creator, community, time, score and comment count. Page with next_page. Answers 404 for an unknown community.

- Tool ID: `lemmy/posts`
- Provider: [Lemmy](/providers/lemmy.md)
- Capability: [Social media](/tools/social-media.md)
- Price: no charge per call
- Authentication: an authorised Agentik workspace is required for execution, including zero-price tools.

## Pricing contract

No charge per call. A workspace is still needed so your agent can call it.


```json
{
  "model": "per_call",
  "amountUsd": 0
}
```

## Complete input schema


```json
{
  "type": "object",
  "properties": {
    "community": {
      "type": "string",
      "pattern": "^[a-z0-9_]{1,40}(@[a-z0-9.-]{1,100})?$",
      "description": "Community name, e.g. 'technology' or 'selfhosted@lemmy.world'"
    },
    "sort": {
      "type": "string",
      "enum": [
        "Hot",
        "Active",
        "New",
        "TopDay",
        "TopWeek",
        "TopMonth",
        "TopYear",
        "TopAll",
        "MostComments"
      ],
      "default": "Hot",
      "description": "Order, e.g. 'Hot' or 'TopWeek'"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 5,
      "description": "Posts to return, e.g. 5"
    },
    "page_cursor": {
      "type": "string",
      "pattern": "^[A-Za-z0-9_=-]{1,200}$",
      "description": "next_page value from the previous call, e.g. 'P33784a8'"
    }
  },
  "additionalProperties": false
}
```

## Published example

This is the provider tool’s published example. Replace example values with the user’s requested inputs, respecting the schema; do not execute an example merely to test a connection.


```json
{
  "tool_id": "lemmy/posts",
  "input": {
    "community": "technology",
    "sort": "Hot",
    "limit": 3
  }
}
```

## Execute and retrieve

Inspect again before execution, explain the price and obtain the required authority. Use MCP run_tool or POST /v1/run with this tool ID, valid input and an idempotency key. Save the returned run ID and follow the actual state. If Agentik answers that the tool is temporarily unavailable, do not retry it blindly; use discovery to propose an alternative.

A partial or uncertain result can still have consumed provider resources. Consult [billing](/docs/billing.md), [idempotency](/docs/idempotency.md) and [asynchronous results](/docs/async.md).

Attribution: Public posts from lemmy.world and the federated Lemmy network; content belongs to its authors.

[Provider documentation](https://join-lemmy.org/docs/contributors/04-api.html)

[REST inspection](https://api.agentik.cc/v1/tools/lemmy/posts) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

[HTML page](/providers/lemmy/posts) · [Agent index](/llms.txt)
