The game was over by half-time, with David Silva, Raheem Sterling and Leroy Sane all getting in on the act.
Silva poked home Sterling’s deflected cross for the opener and Sane then rolled in a low cross for Sterling to tap into an empty net.
BBC reports that Sane added a fine third from Sterling’s volleyed cross, with the German’s touch leaving defender Fabian Balbuena on the ground, allowing him to slot home.
West Ham were much better in the second half and Michail Antonio hit the post – but Sane scored his second and City’s fourth in injury time.
Manuel Pellegrini’s Hammers side have now won only once in seven games.