# Lemmy User Profile API Documentation

<p><strong>Lemmy User Profile API</strong> returns the public profile of a Lemmy user as JSON: id, name, display name, bio, avatar, banner, actor id, post count, comment count, admin flag and publish date. The response also includes the user's recent posts and comments. A valid profile with zero posts is still a successful response.</p>

- **Documentation:** [https://scrappa.co/docs/lemmy-api/lemmy_user](https://scrappa.co/docs/lemmy-api/lemmy_user)
- **API group:** Lemmy API
- **Endpoint:** `GET https://scrappa.co/api/lemmy/user`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `username` | string | Yes | Lemmy username. Example: EatingPies. |
| `sort` | string | No | Sort order for posts and comments. One of: New, Active, Hot, TopDay, TopWeek, TopMonth. Defaults to New. |
| `limit` | integer | No | Items per page. Server caps at 50. Defaults to 20. |
| `page` | integer | No | 1-based page number. Defaults to 1. |
| `instance` | string | No | Lemmy instance hostname. Defaults to lemmy.world. The hostname must resolve to a public address; private, loopback and unresolvable hosts are rejected without charge. |

## Example response

```json
{
    "data": {
        "user": {
            "id": 3100864,
            "bio": "A Lemmy user.",
            "name": "EatingPies",
            "avatar": "https://lemmy.world/pictrs/image/jkl012.jpeg",
            "actor_id": "https://lemmy.world/u/EatingPies",
            "is_admin": false,
            "published": "2024-01-15T10:00:00.000000Z",
            "post_count": 22,
            "display_name": "EatingPies",
            "comment_count": 2
        },
        "posts": [
            {
                "id": 53070436,
                "score": 42,
                "title": "A technology post title",
                "community": {
                    "id": 2478,
                    "name": "technology",
                    "title": "Technology"
                },
                "published": "2026-10-10T14:30:00.000000Z",
                "comments_count": 167
            }
        ],
        "comments": [
            {
                "id": 26295573,
                "score": 12,
                "content": "Comment content",
                "post_id": 53031195,
                "published": "2026-10-10T15:00:00.000000Z",
                "content_plain": "Comment content"
            }
        ],
        "has_more": true
    },
    "meta": {
        "billable": true,
        "endpoint_family": "user_profile"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The username parameter is missing or invalid. This response is not billable. |
| 404 | User Not Found | The requested Lemmy user was not found. This response is not billable. |
| 503 | Upstream Unavailable | The Lemmy API is temporarily unavailable. This response is not billable. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
