Ajinkya Rahane was the top-scorer for the visitors with his 48-run knock. The lower-order batsmen Bhuvneshwar Kumar (33) and Mohammed Shami (27) chipped in with useful knocks.
India are trailing the three-match series 0-2.
Brief Scores:
India: 187 and 247 in 80.1 overs. (A Rahane 48, Virat Kohli 41; Kagiso Rabada 3/59, M Morkel 3/47, V Philander 3/61)
South Africa 1st innings: 194 all out.