A refrigeration cycle apparatus comprising: a refrigerant circuit including a compressor, an air heat exchanger, a decompression device, a heat medium heat exchanger, and a refrigerant pipe, the heat medium heat exchanger having a refrigerant side and a medium side, the compressor, the air heat exchanger, the decompression device, and the refrigerant side of the heat medium heat exchanger being connected by the refrigerant pipe; a heat medium circuit including the heat medium heat exchanger, a heat medium pump, and a fluid pipe, the medium side of the heat medium heat exchanger and the heat medium pump being connected by the fluid pipe; and a controller configured to: perform freezing prevention control to prevent freezing of a heat medium flowing through the heat medium heat exchanger by controlling the heat medium pump, based on outlet superheat degree of the heat medium heat exchanger and an average temperature of an outlet heat medium temperature and an inlet heat medium temperature of the heat medium heat exchanger, the outlet superheat degree of the heat medium heat exchanger being calculated by subtracting an evaporating temperature of the heat medium heat exchanger from an outlet refrigerant temperature of the heat medium heat exchanger, and set a rotational speed of the heat medium pump to be higher when the outlet superheat degree of the heat medium heat exchanger is greater than a reference value and the average heat medium temperature of the outlet heat medium temperature and the inlet heat medium temperature of the heat medium heat exchanger is greater than a reference value. a refrigerant circuit including a compressor, an air heat exchanger, a decompression device, a heat medium heat exchanger, and a refrigerant pipe, the heat medium heat exchanger having a refrigerant side and a medium side, the compressor, the air heat exchanger, the decompression device, and the refrigerant side of the heat medium heat exchanger being connected by the refrigerant pipe; a heat medium circuit including the heat medium heat exchanger, a heat medium pump, and a fluid pipe, the medium side of the heat medium heat exchanger and the heat medium pump being connected by the fluid pipe; and a controller configured to: perform freezing prevention control to prevent freezing of a heat medium flowing through the heat medium heat exchanger by controlling the heat medium pump, based on outlet superheat degree of the heat medium heat exchanger and an average temperature of an outlet heat medium temperature and an inlet heat medium temperature of the heat medium heat exchanger, the outlet superheat degree of the heat medium heat exchanger being calculated by subtracting an evaporating temperature of the heat medium heat exchanger from an outlet refrigerant temperature of the heat medium heat exchanger, and set a rotational speed of the heat medium pump to be higher when the outlet superheat degree of the heat medium heat exchanger is greater than a reference value and the average heat medium temperature of the outlet heat medium temperature and the inlet heat medium temperature of the heat medium heat exchanger is greater than a reference value. perform freezing prevention control to prevent freezing of a heat medium flowing through the heat medium heat exchanger by controlling the heat medium pump, based on outlet superheat degree of the heat medium heat exchanger and an average temperature of an outlet heat medium temperature and an inlet heat medium temperature of the heat medium heat exchanger, the outlet superheat degree of the heat medium heat exchanger being calculated by subtracting an evaporating temperature of the heat medium heat exchanger from an outlet refrigerant temperature of the heat medium heat exchanger, and set a rotational speed of the heat medium pump to be higher when the outlet superheat degree of the heat medium heat exchanger is greater than a reference value and the average heat medium temperature of the outlet heat medium temperature and the inlet heat medium temperature of the heat medium heat exchanger is greater than a reference value.