# Lemmy search

Search posts, comments, communities, or posts linking one exact URL, across the federated Lemmy network (Reddit-like forums), as indexed by lemmy.world: post. Needs query.

Search posts, comments, communities, or posts linking one exact URL, across the federated Lemmy network (Reddit-like forums), as indexed by lemmy.world: post title, link, body, community, creation time, score, comment count; or community name, title, description and subscriber counts. Sort by top over a period or newest. Post bodies can be long: keep limit small.

- Tool ID: `lemmy/search`
- 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": {
    "query": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Words, or a full exact URL with type 'Url', e.g. 'shopify'"
    },
    "type": {
      "type": "string",
      "enum": [
        "Posts",
        "Comments",
        "Communities",
        "Url"
      ],
      "default": "Posts",
      "description": "What to search, e.g. 'Posts'"
    },
    "sort": {
      "type": "string",
      "enum": [
        "TopAll",
        "TopYear",
        "TopSixMonths",
        "TopMonth",
        "TopWeek",
        "TopDay",
        "New",
        "Hot",
        "Active",
        "MostComments"
      ],
      "default": "TopYear",
      "description": "Order, e.g. 'TopYear' or 'New'"
    },
    "community": {
      "type": "string",
      "pattern": "^[a-z0-9_]{1,40}(@[a-z0-9.-]{1,100})?$",
      "description": "Restrict to one community name, e.g. 'technology' or 'technology@lemmy.world'"
    },
    "limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 50,
      "default": 2,
      "description": "Results to return (posts are large; communities small), e.g. 2"
    },
    "page": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "default": 1,
      "description": "Page number, starting at 1, e.g. 2"
    }
  },
  "required": [
    "query"
  ],
  "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/search",
  "input": {
    "query": "shopify",
    "type": "Posts",
    "limit": 2
  }
}
```

## 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/search) · [OpenAPI](/openapi.json) · [Connection guide](/connect.md)

---

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