Calculate a User's Reputation

JavaScript (ES6), 145 139 136 125 123 117 bytes

a=>fetch(`//api.stackexchange.com/users?site=codegolf&filter=!)LgZAmQ6ls0hH&inname=`+a).then(_=>_.text()).then(alert)

Saved 6 bytes thanks to Shaggy and 6 bytes thanks to Cyoce.

I'm not sure if it should output all users with the same name, or just one of them; this code outputs all of them.

f=a=>fetch(`//api.stackexchange.com/users?site=codegolf&filter=!)LgZAmQ6ls0hH&inname=`+a).then(_=>_.text()).then(alert)

f("tom")


Python 2, 178 169 149 Bytes

I'd use requests for this:

from requests import*
a=get("http://api.stackexchange.com/users?site=codegolf&inname="+input()).json()["items"][0]
print a["reputation"],a["user_id"]

Basically, it uses stack's api to fetch the information as JSON and then gets the item "reputation". Additionally, the API featured many extra parameters, I shaved those off as well.

Generous contributions from: carusocomputing, ElPedro, Malivil, Keerthana Prabhakaran


Groovy, 144 156 bytes

{new groovy.json.JsonSlurper().parse(new URL("http://api.stackexchange.com/2.2/users/?site=codegolf&inname=$it")).items.collect{[it.user_id,it.reputation]}}

Anonymous closure.

EDIT: forgot to use import of groovy.json. for JSON Slurper + 14 bytes.

Example output [[UserID, Reputation],...]:

[[20260, 60695], [20469, 21465], [3103, 8856], [41805, 7783], [134, 6829], [42643, 5622], [45268, 4389], [10732, 3976], [32, 3635], [53745, 3392], [10801, 3216], [49362, 2418], [2104, 2160], [3563, 1988], [18280, 1491], [742, 1466], [59487, 1362], [19039, 1330], [56642, 1133], [9522, 951], [34438, 886], [1744, 793], [52661, 778], [18187, 768], [11426, 751], [26850, 711], [178, 637], [29451, 631], [19700, 616], [15862, 601]]