Crews from Scarborough were called to rescue the pair and put out the flames at the property on Victoria Road at 2.02am.
Paramedics were also called but North Yorkshire Fire and Rescue Service said it did not believe the two people needed hospital treatment.
The fire was in the kitchen of the flat and caused fire damage to an oven and kitchen unit, as well as smoke damage throughout the flat.
Firefighters suspect it was caused by a build-up of fat or grease in the oven which caught fire after the oven was left on.
As well as putting out the flames, the teams retrieved a number of animal cages from the flat.