> **For coding agents and LLMs:** This is one Social Fetch marketing page (markdown export). For API orientation start with [`/llms.txt`](https://www.socialfetch.dev/llms.txt); for auth and crawl rules use [`/agents.txt`](https://www.socialfetch.dev/agents.txt); for every operation use [`/llms-endpoints.txt`](https://www.socialfetch.dev/llms-endpoints.txt).

## This page

- **On-site (HTML):** <https://www.socialfetch.dev/platforms/lemmy/search>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/lemmy/search.mdx>

---

# Lemmy Search API

Four result lists in one answer: posts, comments, communities and users, filtered the way the instance filters them.

`GET /v1/lemmy/search?instance=lemmy.world&query=linux&type=Posts` returns `data.posts`, `data.comments`, `data.communities` and `data.users`. Each post and comment row carries its community, author and counts; a user hit carries the full profile, including `avatar`, bio, join date, post and comment counts and the admin flag.

`type` is `All`, `Comments`, `Posts`, `Communities`, `Users` or `Url`; `Url` finds posts linking to an exact URL. `All` and `Comments` can take much longer than the other kinds on a large instance. Narrow with `community`, `author` or `scope`, and order with the instance's sorts. Search returns no total, and an empty result is a found answer with empty lists, not `not_found`.

## Request

- **Endpoint:** `GET /v1/lemmy/search`
- **Credits:** 1 credit
Failed requests are free
- **Input:** by query and type
- **Full reference:** [docs](https://www.socialfetch.dev/docs/api/v1/lemmy/search/get)
- **Platform page:** [/platforms/lemmy](https://www.socialfetch.dev/platforms/lemmy)

## FAQ

### How do I search for a link?

Set type=Url and query to the exact URL. The instance returns posts that link to it.

### Why are there two empty lists?

The answer always has all four lists. A type filter fills the matching one and leaves the others empty; that is still a found answer.

### Can I search within a community or by author?

Yes. Pass community, author, or both.

### Why are All and Comments slow?

They cover every kind or every comment's text, which takes longer on a large instance. Posts, Communities and Users are quicker.

### How many credits does a search cost?

Pricing is documented on the operation in the API registry (shown on this page). Confirm on every response with meta.creditsCharged: that field is the billing source of truth. Each paginated page is a separate billed request.
