2

I'm looking for the best way to get a full list of every event which has caused a user's reputation to change, It could look like:

timestamp,reputation_change,object_uri
2011-01-25 14:58:27Z,10,/ajax/users/14343/rep/post/4794379/1295913600/1296000000
2011-01-25 12:24:46Z,10,/questions/1759455/how-can-i-account-for-am-or-pm-with-datetime-strptime/1759485#1759485,

After a few minutes of poking around I've discovered I could generate this data without too much trouble by iterating over the daily reputation links like:

https://stackoverflow.com/ajax/users/14343/rep/day/1304035200

https://stackoverflow.com/ajax/users/14343/rep/day/1304121600

https://stackoverflow.com/ajax/users/14343/rep/day/1304208000

But doing it this way is silly if this data is available elsewhere, perhaps already in JSON format, and without requiring hundreds of GET requests, not that this would actually be a problem.

I don't need the exact the timestamps, just the day would suffice.

Is there an easier way to get this data?

1 Answer 1

2

Not that this will solve you're main problem, but that actually isn't part of the API. If you go to api.stackexchange.com you kind information on how to get the data "raw", in JSON format.

Sadly however the API doesn't let you get reputation changes for multiple days at once, so you're still stuck with making lots of GET requests.

(I'm curious how you found those?)

3
  • 1
    Thanks Jonathan, after asking the question I saw that the API can give you a day by day changes for a given user's reputation. While in some aspects the API is more convenient (JSON vs HTML), the limit of 300 requests would ultimately make it less desireable than the individual requests.
    – sente
    May 18, 2012 at 20:02
  • 1
    I found those urls after reverse engineering where the data is coming to make the reputation graphs/charts on profile pages.
    – sente
    May 18, 2012 at 20:43
  • 1
    If you use an app key the 300 request limit, is bumped up to 10,000 requests (per day per user). You can request the last 100 reputation changes, and work out which day they fall on yourself by doing something like api.stackexchange.com/2.0/users/191463/… Then you can set the page parameter to get the next 100 (though you'd have to be wary of duplicates or missing out rep changes over the page break, if the user increases their reputation between your requests, you can do it solely on dates to avoid this)
    – Jonathan.
    May 18, 2012 at 21:09

You must log in to answer this question.

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