Frederic Le Feurmou
Frederic Le Feurmou

Reputation: 1786

Get a tag popularity over time from the stackexchange api?

How can I get a stackoverflow tag popularity history from the stackexchange api ?

Currently I get the total of tags over a specific period of time but I have to perform a new http call for each period of time. I searched in the documentation but I didn't find a way to do this.

I want to get an array of total questions with a specific tag paginated by a period of time ( month / week / day ).

What I currently have

Request URL

https://api.stackexchange.com/2.2/search?filter=total&order=desc&site=stackoverflow&sort=activity&tagged=javascript

Response

{"total":785846}

What I want

Response

[
  {
    total: 12345,
    fromdate: 2015-01-01,
    todate: 2015-02-01
  },
  {
    total: 54321,
    fromdate: 2015-02-01,
    todate: 2015-03-01
  }
]

( Here is my little project: http://fredericlefeurmou.github.io/stack-overlow-analytics )

Upvotes: 0

Views: 143

Answers (1)

Andy
Andy

Reputation: 50600

The API does not support this method of time segmentation. Your best bet is to do it the way you are currently, with multiple API calls and segmenting it yourself.

If you find your are exceeding your API quota (and you already have a key), you can post a feature request on Meta.SE.

Upvotes: 0

Related Questions