# Lemmy comments

What are people saying in this Lemmy thread or community? Takes post id, community, sort and more, all optional.

What are people saying in this Lemmy thread or community? Comments of one post (post_id from lemmy/posts) or of a whole community, sorted top, hot, new, old or controversial: text, author, time, score, up and down votes, reply count and the post they belong to. Each comment carries its post and community, about 4,000 characters in all: keep limit small and page with page. Pass post_id or community, not both.

- Tool ID: `lemmy/comments`
- 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": {
    "post_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 1000000000,
      "description": "Post id, e.g. 53785563"
    },
    "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": [
        "Top",
        "Hot",
        "New",
        "Old",
        "Controversial"
      ],
      "default": "Top",
      "description": "Order, e.g. 'Top'"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 20,
      "default": 5,
      "description": "Comments to return, e.g. 5"
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 1,
      "description": "Page number, e.g. 2"
    }
  },
  "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/comments",
  "input": {
    "community": "technology",
    "sort": "New",
    "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/comments) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

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