4

I'm trying to use the top answers on tags API to get the users who contribute the most for a given tag. Like so:

          /2.2/tags/azure-web-sites/top-answerers/month?site=stackoverflow

However, that API seems to only return the top answerers for either the past month or for all time.

Is there any way to get the top answerers for a custom time range? In particular, I'm interested in getting the top answerers for the past week.

4
  • First, go and upvote the "Please add the tagged parameter to /answers, /users, etc" feature request. As it stands, what you want my be nigh impossible with the API. Commented Nov 10, 2015 at 22:37
  • I neglected to mention that that FR (which is not mine) is helpful to making your problem solvable at all (for high traffic tags) and much easier for lower traffic tags like the one in the question. Commented Nov 10, 2015 at 23:44
  • @BrockAdams Thanks, and upvoted :) What's FR though? I haven't heard of that.
    – Zain Rizvi
    Commented Nov 11, 2015 at 0:16
  • I doubt this Q will ever get approved as a feature request. It's too rare and too expensive and not much dev work is being done (apparently) on the API anymore. Keep in mind that the underlying task that computes /2.2/tags/ runs once per day, if that. Commented Nov 11, 2015 at 2:31

1 Answer 1

4

This is very costly to do in the API and currently impossible for many combinations of tag and date (because it would require more than the 10,000 allowed API calls per day).
I'll write more about that tomorrow (11/11 or 11/12 UTC).

Meanwhile, perhaps a SEDE query will work?

The query: Top Answerers, by your tags and your date range takes your date range and up to 4 tags and lists the top-performing answers.

Here it is for [azure-web-sites] for the first week of November:

User           Score  Uncapped Rep  Up votes  Dwn votes  Accepted Ans  Bounties
-------------  -----  ------------  --------  ---------  ------------  --------
David Ebbo       11           170        11          0            4          0
Joe Raio          5            80         5          0            2          0
Gaurav Mantri     4            55         4          0            1          0
Amit Apple        2            20         2          0            0          0
Chris Gillum      2            35         2          0            1          0
David Makogon     2            20         2          0            0          0
etc., etc...

Keep in mind:

  1. SEDE data is only updated once a week.
  2. If User 0 appears, that is the sum for all the deleted or unregistered users. It's amusing to note that 0 can often be a top performer for a given tag and date combo. :)
4
  • Hey, that's pretty cool, thanks! Is there an Api to access the SEDE?
    – Zain Rizvi
    Commented Nov 12, 2015 at 2:11
  • 2
    Alas, there is no SEDE API yet. Please go and upvote these feature requests: 1) Please provide... 1, 2) Please provide... 2, 3) Running queries to (SEDE)..., ... Theoretically, if the FRs get enough upvotes, they have to implement them; right? Right? :-? Commented Nov 12, 2015 at 5:56
  • Taking your above query and just changing the dates to be 11/08 to 11/13, it's not returning any results at all, even though there was definitely activity on that tag (query). Maybe the data is a snapshot that's only updated every few days, and not live data?
    – David Ebbo
    Commented Nov 13, 2015 at 5:28
  • 1
    @DavidEbbo yes, that would be note 1, above. :) ... You can see when the data was last updated in the upper right of the main SEDE page, underneath the Compose Query button. Commented Nov 13, 2015 at 5:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .