rscore calculation and api call