3

I'm looking for a comment_count property in the results of /search/advanced to get a count of comments under a question.

Is there an undocumented q for /search/advanced that gives a comment_count property for returned question objects?

Or is making a new request, with gathered question id's, to /questions/{ids}/comments and then looping and counting comments per question id the only option?

1 Answer 1

1

See the question object. comment_count has been available since API version 2.2 but it is not returned by default.

You must create and use a custom filter that includes comment_count.

So:
        /2.2/search/advanced?q=cheese whiz&site=stackoverflow (Try it)

does not return comment_count, but:

        /2.2/search/advanced?q=cheese whiz&site=stackoverflow&filter=!JDuPcYJf3SMj*XSgk.VuM)Yu4HKS_cpasj (Try it)

does, for example. (Scroll down on both pages to see the query results.)

0

You must log in to answer this question.

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