Using forum APIs to get topic count

Hi,

I’m using forum APIs to get the number of topics in each category. But there is an issue:
Requesting /categories.json returns a list of categories and their topic count which seems fine at first, but after a quick check, one can see it does not count the topics within subcategories. Yet, there is another item in the response as “topics_all_time” which again seems to be the solution, but when I divide the number by 30 - which is the number of topics per page -, the number of pages for categories which have subcategories is higher than what we actually have in forum. Not sure, but I think the all time topic count includes deleted or moved topics.

Now the question is: How can I get the real number of existing topics in each category?

:blush:

When I get pages, it works fine for all of them which means the available topics via APIs are more than what we explore normally. All topics from API are visible. So what’s going on exactly?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.