Sorry for late response.
I looked around for half an hour but could not find a way to get the number of participants for a category via the Discourse API.
I did not find this information in the single category endpoint, list of categories endpoint or the
site.json endpoint (which is otherwise quite useful; just discovered it). Also there’s no
category_stats table, where this kind of information would be expected when following the Discourse nomenclature.
You can of course get this information via a SQL query that uses the Data Explorer plugin, and even access that via API – I’d have to slightly modify this query, which currently lists instead of counts category contributors. But the issue is here that Data Explorer queries are only accessible to logged-in users based on group membership, and cannot be made accessible to anonymous users. So this will probably not help, as I guess you’re looking for this to integrate it into a Vue.js based website.
So the only way to access this as part of the anonymous Discourse API would be a custom plugin that extends the Discourse API. Not sure if we have the budget for that right now – I’d say only if it’s really important, as it would compete for the remaining budget with necessary repairs and updates to Discourse.