Stack Overflow

Get Stack Overflow user

Get a Stack Overflow user's profile: reputation, badges, activity counts, location, website and profile text.

GET/v1/stack-overflow/users/{memberId}
1credit
x-api-keystringheader

API key (`sfk_...`)

Parameters
2
memberIdintegerrequiredpath

User id on the chosen site, e.g. `22656`. `-1` is the Community user.

≥ -1 · ≤ 2147483647

sitestringoptionalquery

Stack Exchange site, by its API name (`askubuntu`, `serverfault`, `math`, `ru.stackoverflow`). Default: `stackoverflow`. The sites endpoint lists them all.

Response fields
47

Endpoint-specific response payload.

datalookupStatus
string

`not_found` when no user has this id on the site.

one of: found, not_found

datasite
string

The Stack Exchange site the user belongs to.

The user when `lookupStatus` is `found`; otherwise null.

datauserid
integer

User id on this site.

datauseraccountId
integernullable

Network-wide account id.

datausername
stringnullable

Display name.

datauserurl
stringnullable

Profile URL.

datauserimageUrl
stringnullable

Avatar URL.

datausertype
stringnullable

Kind of account.

one of: registered, moderator, unregistered, does_not_exist, team_admin, null

datauserreputation
integernullable

Reputation on this site.

Reputation gained over recent periods.

datauserreputationChangeday
integernullable

Change today.

datauserreputationChangeweek
integernullable

Change this week.

datauserreputationChangemonth
integernullable

Change this month.

datauserreputationChangequarter
integernullable

Change this quarter.

datauserreputationChangeyear
integernullable

Change this year.

Badge counts.

datauserbadgesgold
integernullable

Gold badges.

datauserbadgessilver
integernullable

Silver badges.

datauserbadgesbronze
integernullable

Bronze badges.

datauseracceptRate
integernullable

Accept rate in percent; null when not shown.

datauserlocation
stringnullable

The location the user chose to show; null when empty.

datauserwebsiteUrl
stringnullable

The website the user chose to show; null when empty.

datauseraboutHtml
stringnullable

The profile text the user wrote, as HTML; null when empty or not asked for.

datauserjoinedAt
stringnullable

When the account joined this site, ISO 8601 UTC.

datauserlastSeenAt
stringnullable

Last visit, ISO 8601 UTC.

datauserlastModifiedAt
stringnullable

Last change to the profile, ISO 8601 UTC; null when not shown.

datauserquestionCount
integernullable

Questions asked.

datauseranswerCount
integernullable

Answers given.

datauserprofileViews
integernullable

Profile views.

Votes the user has cast.

datauservotesCastup
integernullable

Upvotes cast.

datauservotesCastdown
integernullable

Downvotes cast.

datauserisEmployee
booleannullable

Whether the user works for Stack Exchange.

Collectives the user belongs to.

datausercollectives[]slug
stringnullable

Collective slug.

datausercollectives[]name
stringnullable

Collective name.

datausercollectives[]url
stringnullable

Collective page.

datausercollectives[]description
stringnullable

What the collective is.

Tags the collective covers.

datausercollectives[]tags[]
stringoptional
datausercollectives[]role
stringnullable

The user's role in it, e.g. `member`.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

Code example

curl "https://api.socialfetch.dev/v1/stack-overflow/users/22656" \
  -H "x-api-key: YOUR_API_KEY"

Responses

User.