4

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 https://data.stackexchange.com/stackoverflow/query/229727

But how to retrieve these counts via API?

Community
  • 1
  • 1
ThinkTeamwork
  • 544
  • 5
  • 19

1 Answers1

6

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.

ThinkTeamwork
  • 544
  • 5
  • 19
  • How often does it update? I am using https://api.stackexchange.com/2.2/tags?order=desc&sort=popular&site=stackoverflow and refreshing the page several times, but the numbers never change. I guess the API does not provide a real-time count. – Jaime Montoya Nov 29 '17 at 23:20