Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

stackoverflow api - get number of answers and questions per user

Is it possible to get the number of answers and questions the a user has made through the stack overflow api?

Currently, I have found a hacky way. It consists of getting the json response for user questions (or answers) and then counting the number of items in the array.

However, since that data is paginated, it requires multiple requests to count them all. Id rather find a way to get the count using only a single request.

Im getting my information from https://api.stackexchange.com/docs maby im missing something?

like image 251
MichaelTaylor3D Avatar asked Nov 09 '14 20:11

MichaelTaylor3D


People also ask

What percentage of Stack Overflow questions are answered?

From the Stack Exchange sites page: 74%. This generally includes questions that have at least one upvoted answer and/or an accepted answer.

How many questions have been asked on Stack Overflow?

Pathways to a Just Digital Future. Since 2008, Stack Overflow has over 18 million questions, with over 11 million users and 51 million unique visitors per month.

How do you get answers on Stack Overflow?

Answering Questions. Go to https://stackoverflow.com/questions. You can use any web browser, like Chrome or Safari, to visit this site and answer questions. You can sort the questions by newest, active, bountied, unanswered, and more.

How long does it take for someone to answer on Stack Overflow?

Although most questions on StackOverflow are answered in less than an hour, we observe that about 30% of the questions which are not answered within an hour have a response time of more than a day (see Figure 1).


1 Answers

There is an easier way to grab the number of questions or answers posted by a user.

You can use the filter=total query parameter, as explained in the documentation

The forms presented on the pages below do not indicate it but you can use the parameter with both questions and answers. See the links for examples of querying for the number of answers and questions for my account on stackoverflow:

  • answers per user | example
  • questions per user | example
like image 114
toniedzwiedz Avatar answered Sep 30 '22 14:09

toniedzwiedz