Stack Exchange API doesn't provide a direct way to get the impact of a user. Still considering the definition of impact, it seems possible to reproduce the calculations, as all the required data is available in API: views, questions and answers. This project is an implementation of that idea. Practical limitations make an application scope very narrow though. Someday the impact should be exposed in the public API.
Retrieving the large collections of user’s answers or questions ends up with throttling, despite the use of an api key. Due to that, the calculation of the top user’s impact may take tens of minutes.
Install using pip:
$ pip install git+https://github.com/1dimir/StackAPI-Impact
Command line interface:
usage: get-so-impact [-h] [-k API_KEY] user_id
$ get-so-impact 21350362
> 21650
As a package:
from stackapi_impact import StackExchangeImpact
USER_ID = 21350362
impact = StackExchangeImpact()
result = impact.calculate(USER_ID)
print(result)
This project is licensed under the MIT License - see the LICENSE.txt file for details
- Stack Exchange API - Documentation for the Stack Exchange API
- stackapi - Python wrapper for the Stack Exchange API
- How to get the impact? - Stackoverflow question
- definition - Definition of People Reached
- query - Stack Exchange Data Explorer Query for People Reached