4

I was trying to fetch the number of answers I have posted on Stack Overflow and for that I was using this endpoint:

https://api.stackexchange.com/2.2/me?site=stackoverflow

Check your own /me response here.

It has all the relevant fields but not the number of questions and answers I have posted on Stack Overflow.

Any specific reason for not keeping it there, or does any other way (except paginating and counting all my answers from /me/answers) exist to obtain that statistic?

1 Answer 1

4

You need to add a custom filter to include the answer_count and question_count fields.

This one:

filter=!-*jbN*Cqbrcb

will include those two fields.

You can find in the documentation for the user type which fields are included in the default filter (green-tick) and which not (red cross).

See my answer on Stack Apps How to create API filters? for instructions how to create a filter.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .