Hellen Obiri of Kenya set a women's course record to win the New York City Marathon on Sunday while compatriot Benson Kipruto won the men's race by edging Alexander Mutiso in a photo finish.