2

I'm currently working on a small project with SE data, and I can't find an API method for this, so I'm asking here.

Is there any way to get a history of any user's reputation each day?

I know this is possible because I can see the raw data by viewing the source of http://stackexchange.com/users/{userid}?tab=reputation, which for me looks like this (on meta):

[6,111,111,111,111,111,109,103,103,103,103,103,103,103,103,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,108,118,118,118,118,118,118,118,118,118,118,118,118,118,118,128,228,228,243,243,243,253,258,263,263,268,278,278,278,283,283,285,285,287,287,287,287,370,462,537,562,664,710,725,820,830,835,840,860,873,936,1042,1042,1107,1197,1197,1197,1212,1239,1246,1314,1447,1457,1604,1598,1601,1608,1611,1621,1642,1642,1660,1745,1790,1795,1995,2000,2055,2055,2065,2065,2065,2120,2150,2170,2170,2300,2340,2340,2340,2340,2350,2350,2350,2380,2405,2405,2450,2500,2715,2730,2900,3000,3097,3097,3097,3240,3373,3378,3388,3396,3406,3406,3416,3426,3626,3856,3895,3931,3946,3956,3991,4014,4049,4049,4059,4064,4064,4079,4079,4079,4172,4227,4237,4237,4262,4312,4322,4342,4342,4342,4359,4493,4523,4624,4624,4624,4624,4624,4624,4684,4684,4684,4827,4962,5012,5012,5012,5097,5107,5107,5107,5107,5107,5117,5142,5172,5172,5157,5167,5167,5167,5322,5322,5322,5332,5342,5342,5377,5607,5672,5672,5672,5692,5692,5692,5692,5702,5702,5707,5742,5752,5802,5812,5907,5937,5975,6032,6032,6107,6157,6290,6370,6368,6373,6428,6532,6542,6552,6552,6572,6685,6705,6725,6737,6737,6737,6735,6783,6783,6878,6880,6874,6914,6919,6954,6989,7039,7042,7062,7147,7194,7206,7293,7508,7628,7668,7743,7768,7805,7805,7843,7923,7983,7983,8071,8096,8151,8181,8186,8186,8191,8191,8236,8261,8271,8271,8354,8554,8564,8656,8826,8856,8858,8920,8925,8925,8940,8945,8955,9005,9145,9165,9325,9410,9523,9611,9694,9699,9824,9874,9934,9944,9949,9949,9949,9949,9949,10149,10189,10224,10284,10294,10294,10294,10324,10366,10366,10506,10516,10531,10531,10531,10536,10536,10566,10576,10631,10643,10641,10666,10666,10664,10669,10669,10654,10664,10664,10664,10674,10674,10674,10684,10674,10679,10709,10829,10834,10854,10854,10854,10854,10904,10904,10919,10929,10934,10934,10934,10934,10934,11099,11139,11139,11154,11154,11154,11164,11314,11459,11503,11503,11558,11686,11717,11805,11805,11815,11835,11835,11845,11855,11880,11880,12080,12100,12200,12225,12245,12282,12382,12432,12437,12502,12554,12559,12559,12624,12691,12708,12713,12718,12748,12851,12854,12852,12852,12882,12887,12894,12894,12904,13004,13014,13024,13039,13084,13184,13322,13377,13402,13422,13427,13444,13458,13541,13611,13631,13831,13869,13894,13914,13957,13962,13980,14170,14228,14428,14474,14494,14524,14569,14717,14761,14826,14825]

Is it possible to get this data programmatically, other than by scraping the specific user's page? Such as a data.SE query, or an API call?

I've tried the reputation-on-users method, but then I found a problem: it doesn't show the -1 rep change from downvotes on answers, which can throw off the data. (This is shown, however, in the rep graph on the SE user page.)

  • 1
    Note that stackapps.com is the go-to site for API questions too. – Martijn Pieters Mar 1 '14 at 20:04
  • Shouldn't you combine /2.2/users/1223693/timeline?site=stackoverflow and /2.2/users/1223693/reputation?site=stackoverflow as timeline has your downvotes? – rene Mar 1 '14 at 20:23
  • @rene I want to get any user's rep history, not just mine. I'll edit to clarify – Doorknob Mar 1 '14 at 20:23
  • But that is your timeline which I can fetch...it might still be a bug in the api though – rene Mar 1 '14 at 20:24
  • @rene Wait, so you can see my downvotes? That's supposed to be impossible... – Doorknob Mar 1 '14 at 20:25
  • True...I missed that...it are the downvotes you received, not the ones you voted for... – rene Mar 1 '14 at 20:28
  • If you take the down_vote_count from the user object will that be enough to compensate? – rene Mar 1 '14 at 20:42
  • @rene Not all downvotes are on answers. – Doorknob Mar 1 '14 at 20:43
  • @AaronBertrand But I do have access to it. Please read the question. (http://stackexchange.com/users/{userid}?tab=reputation) – Doorknob Mar 1 '14 at 21:14
  • @AaronBertrand I'm not sure what you're referring to. Your answer missed the point of the question - I don't care about downvotes. I care about the rep history. – Doorknob Mar 1 '14 at 22:33
1

You can reconstruct the data on that page by querying /users/{id}/reputation-history/full for a particular user, but it requires that they authorize your application to see that information first, and places the burden of aggregating the data on you.

The only other option is to scrape the user's network profile page for the preaggregated daily reputation totals, as you already mentioned.

Since this information is already available to the page though, it might make sense to request a method be added to the API that will give you the reputation values within a given date range. Doesn't help with your immediate situation, but it could be of benefit in the future.

You must log in to answer this question.

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