Skip to main content
GET
/
api
/
user
/
{username}
Get User Profile
curl --request GET \
  --url https://api.example.com/api/user/{username}
{
  "200": {},
  "404": {},
  "username": "<string>",
  "avatar_url": "<string>",
  "description": "<string>",
  "created_at": "<string>",
  "custom_css": "<string>",
  "background_image": "<string>",
  "stats": {
    "followers": 123,
    "following": 123,
    "posts": 123,
    "upvotes": 123,
    "downvotes": 123
  }
}
Retrieves public profile information for a specified user, including their username, avatar, description, creation date, custom styling, and profile statistics.

Path Parameters

username
string
required
The username of the user whose profile to retrieve

Response

username
string
The user’s username
avatar_url
string
URL to the user’s avatar image
description
string
User’s profile description/bio
created_at
string
Timestamp of when the user account was created
custom_css
string
Custom CSS styling for the user’s profile
background_image
string
URL to the user’s profile background image
stats
object
User profile statistics
followers
integer
Number of followers
following
integer
Number of users being followed
posts
integer
Total number of posts
upvotes
integer
Total upvotes received
downvotes
integer
Total downvotes received

Status Codes

200
Success
Profile retrieved successfully
404
Error
User not found
{
  "error": "user not found"
}

Example Request

curl -X GET https://api.example.com/api/user/johndoe

Example Response

{
  "username": "johndoe",
  "avatar_url": "https://example.com/avatars/johndoe.png",
  "description": "Software developer and tech enthusiast",
  "created_at": "2024-01-15 10:30:00",
  "custom_css": ".profile { color: blue; }",
  "background_image": "https://example.com/backgrounds/johndoe.jpg",
  "stats": {
    "followers": 150,
    "following": 75,
    "posts": 42,
    "upvotes": 320,
    "downvotes": 15
  }
}

Build docs developers (and LLMs) love