How to retrieve stackoverflow tag usage count via stackexchange api call?

允我心安 提交于 2019-12-07 13:02:31

问题


I want to retrieve the 'tag usage count' of a language like Ruby or Java via the StackExchange API.

Basically I want to retrieve these numbers via API call: https://stackoverflow.com/tags

e.g. how do I get the 780k for Java as seen in the link via StackExchange API call?

Does anyone know?

I tried this: https://api.stackexchange.com/2.2/search/advanced?order=desc&sort=activity&tagged=java&site=stackoverflow

but that doesn't give me the total count

It seems to be easy with the Stack Exchange Data Explorer http://data.stackexchange.com/stackoverflow/query/229727

But how to retrieve these counts via API?


回答1:


ok found the answer myself:

https://api.stackexchange.com/2.2/tags?order=desc&sort=popular&inname=java&site=stackoverflow

just replace java with whatever tag you need.

The Tag count then is included in the json response.



来源:https://stackoverflow.com/questions/28004445/how-to-retrieve-stackoverflow-tag-usage-count-via-stackexchange-api-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!