> **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/user>
- **Markdown (.mdx) URL:** <https://www.socialfetch.dev/platforms/lemmy/user.mdx>

---

# Lemmy User API

A profile with counts and moderated communities, plus the newest post and comment from the same answer.

`GET /v1/lemmy/user?instance=lemmy.ml&username=dessalines` returns `data.user` with `id`, `name`, `displayName`, `bio`, `avatar`, `banner`, `actorId`, `host`, `handle`, `publishedAt`, `updatedAt`, `banned`, `banExpiresAt`, `deleted`, `isBot`, `isLocal`, `matrixUserId`, `postCount`, `commentCount`, `postScore`, `commentScore`, `isAdmin` and `moderates`.

The same request returns `data.posts` and `data.comments` with the newest row of each, because Lemmy returns both halves together. Use the user posts and user comments routes for a full page. Ask by `username` or numeric `id`, not both; `user@host` resolves an account on another instance. A deleted account asked by `username` returns `lookupStatus: not_found` with `reason.code: deleted`; a name that never existed returns `not_found` with `reason: null`. An `id` lookup cannot tell a deleted account from one that never existed, so it returns `not_found` with `reason: null`.

## Request

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

## FAQ

### Why do posts and comments have only one row?

The profile request asks the instance for one item of each kind, and that is what it returns. The user posts and user comments routes page each half properly.

### What does moderates contain?

The communities the user moderates, when the instance includes them. Each entry is a community reference with id, name, host and handle.

### How do I resolve a user on another instance?

Use user@host, for example someone@lemmy.world. The answer is that instance's copy of the profile, so counts can lag the user's home instance.

### How many credits does a user lookup 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.
