Stack Overflow

List Stack Overflow user answers

List the answers a Stack Overflow user has given, by activity, votes or time.

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

API key (`sfk_...`)

Parameters
7
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.

sortstringoptionalquery

Order: `activity` (default), `creation` or `votes`. Only `creation` pages without a ceiling; `activity` and `votes` stop at the list ceiling. Rows with equal scores can repeat or skip.

one of: activity, creation, votes

orderstringoptionalquery

Direction of the sort: `desc` (default) or `asc`.

one of: desc, asc

includearrayoptionalquery

`body` adds the answer text (HTML and Markdown) to each row. Default: none.

limitintegeroptionalquery

Up to this many rows per page, 1 to 100. Default: 30. A page can hold fewer than `limit` rows where rows share a creation second or a block of 100 rows ends. Follow `page.nextCursor` until `hasMore` is false.

≥ 1 · ≤ 100

cursorstringoptionalquery

Cursor from `page.nextCursor` of the previous response. It only works with the same filters.

min 1 chars · max 1024 chars

Response fields
92

Endpoint-specific response payload.

datalookupStatus
string

`not_found` when no user has this id on the site. A user with no answers is `found` with an empty list.

one of: found, not_found

datasite
string

The Stack Exchange site the answers belong to.

datamemberId
integer

The user the answers belong to.

The answers on this page.

dataanswers[]id
integer

Answer id.

dataanswers[]questionId
integernullable

The question it answers.

dataanswers[]questionTitle
stringnullable

Title of the question it answers, with HTML entities decoded.

Tags of the question it answers, filled when the answer is nested in its question; empty on answer lists, which do not carry them.

dataanswers[]tags[]
stringoptional
dataanswers[]url
stringnullable

Link to the answer.

dataanswers[]score
integernullable

Votes up minus votes down.

Vote counts.

dataanswers[]votesup
integernullable

Upvotes.

dataanswers[]votesdown
integernullable

Downvotes.

dataanswers[]isAccepted
booleannullable

Whether the asker accepted it.

dataanswers[]createdAt
stringnullable

When it was posted, ISO 8601 UTC.

dataanswers[]lastActivityAt
stringnullable

Last edit or activity, ISO 8601 UTC.

dataanswers[]lastEditedAt
stringnullable

Last edit, ISO 8601 UTC; null when never edited.

dataanswers[]communityWikiAt
stringnullable

When it became a community wiki; null when it is not.

dataanswers[]lockedAt
stringnullable

When it was locked; null when it is not.

Who wrote it.

dataanswers[]authorid
integernullable

User id on this site; null for a deleted user.

dataanswers[]authoraccountId
integernullable

Network-wide account id, the same on every site.

dataanswers[]authorname
stringnullable

Display name.

dataanswers[]authorurl
stringnullable

Profile URL.

dataanswers[]authorimageUrl
stringnullable

Avatar URL.

dataanswers[]authorreputation
integernullable

Reputation on this site.

dataanswers[]authortype
stringnullable

Kind of account.

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

dataanswers[]authoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

Who edited it last; null when never edited.

dataanswers[]lastEditorid
integernullable

User id on this site; null for a deleted user.

dataanswers[]lastEditoraccountId
integernullable

Network-wide account id, the same on every site.

dataanswers[]lastEditorname
stringnullable

Display name.

dataanswers[]lastEditorurl
stringnullable

Profile URL.

dataanswers[]lastEditorimageUrl
stringnullable

Avatar URL.

dataanswers[]lastEditorreputation
integernullable

Reputation on this site.

dataanswers[]lastEditortype
stringnullable

Kind of account.

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

dataanswers[]lastEditoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataanswers[]license
stringnullable

Content licence, e.g. `CC BY-SA 4.0`.

dataanswers[]commentCount
integernullable

Comments on the answer.

The bounty this answer was awarded; null when none.

dataanswers[]bountyAwardedamount
integernullable

Reputation awarded.

Who received it.

dataanswers[]bountyAwardedusers[]id
integernullable

User id on this site; null for a deleted user.

dataanswers[]bountyAwardedusers[]accountId
integernullable

Network-wide account id, the same on every site.

dataanswers[]bountyAwardedusers[]name
stringnullable

Display name.

dataanswers[]bountyAwardedusers[]url
stringnullable

Profile URL.

dataanswers[]bountyAwardedusers[]imageUrl
stringnullable

Avatar URL.

dataanswers[]bountyAwardedusers[]reputation
integernullable

Reputation on this site.

dataanswers[]bountyAwardedusers[]type
stringnullable

Kind of account.

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

dataanswers[]bountyAwardedusers[]acceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataanswers[]bodyHtml
stringnullable

Answer text as HTML; null when bodies were not asked for.

dataanswers[]bodyMarkdown
stringnullable

Answer text as Markdown; null when bodies were not asked for.

Comments on the answer when asked for with `include=comments`; null otherwise.

dataanswers[]comments[]id
integer

Comment id.

dataanswers[]comments[]postId
integernullable

The question or answer the comment is on.

dataanswers[]comments[]postType
stringnullable

Whether the comment is on a question or an answer; null when not known.

one of: question, answer, null

dataanswers[]comments[]url
stringnullable

Link to the comment.

dataanswers[]comments[]score
integernullable

Upvotes the comment received.

dataanswers[]comments[]edited
booleannullable

Whether the comment was edited. The flag comes from the route that returned the comment, so the same comment can differ between routes.

dataanswers[]comments[]createdAt
stringnullable

When it was written, ISO 8601 UTC.

Who wrote it.

dataanswers[]comments[]authorid
integernullable

User id on this site; null for a deleted user.

dataanswers[]comments[]authoraccountId
integernullable

Network-wide account id, the same on every site.

dataanswers[]comments[]authorname
stringnullable

Display name.

dataanswers[]comments[]authorurl
stringnullable

Profile URL.

dataanswers[]comments[]authorimageUrl
stringnullable

Avatar URL.

dataanswers[]comments[]authorreputation
integernullable

Reputation on this site.

dataanswers[]comments[]authortype
stringnullable

Kind of account.

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

dataanswers[]comments[]authoracceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

The user the comment is addressed to, when it is a reply. Null when the comment is not a reply; on the comments-by-post routes it is always null because those routes do not carry reply targets.

dataanswers[]comments[]replyToid
integernullable

User id on this site; null for a deleted user.

dataanswers[]comments[]replyToaccountId
integernullable

Network-wide account id, the same on every site.

dataanswers[]comments[]replyToname
stringnullable

Display name.

dataanswers[]comments[]replyTourl
stringnullable

Profile URL.

dataanswers[]comments[]replyToimageUrl
stringnullable

Avatar URL.

dataanswers[]comments[]replyToreputation
integernullable

Reputation on this site.

dataanswers[]comments[]replyTotype
stringnullable

Kind of account.

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

dataanswers[]comments[]replyToacceptRate
integernullable

Percent of the user's questions with an accepted answer; null when not shown.

dataanswers[]comments[]isByPostAuthor
booleannullable

Whether the comment's author wrote the post it is on; null on lists that do not carry it.

dataanswers[]comments[]license
stringnullable

Content licence, e.g. `CC BY-SA 4.0`.

dataanswers[]comments[]bodyHtml
stringnullable

Comment text as HTML.

dataanswers[]comments[]bodyMarkdown
stringnullable

Comment text as Markdown; null on lists that do not carry it.

Pagination state for the current page.

datapagehasMore
boolean

Whether another page is available.

datapagenextCursor
stringnullable

Cursor for the next page; null on the last page.

datalimitReached
boolean

True when the list stopped at the site's 25-page ceiling (2,500 rows, or 625 when the page carries text), or when a user's answer or comment list is too large for page-offset paging and has served its first 100 rows (25 when it carries text). Sort by `creation` to page deeper. False for every list that ends because it ran out.

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/answers" \
  -H "x-api-key: YOUR_API_KEY"

Responses

Answer listing.