If it must be done through the API, you could set up a Data Explorer query and use the methods outlined in How to run Data Explorer queries with the Discourse API
إعجابَين (2)
If it must be done through the API, you could set up a Data Explorer query and use the methods outlined in How to run Data Explorer queries with the Discourse API