This paper proposes a flexible framework for structuring and pricing parametric heat wave insurance. The framework is based on a general heat wave definition formulated in terms of an underlying temperature index. The definition can be varied in terms of the heat wave duration, intensity, measurement period and underlying index. This construction makes it straightforward to create contracts tailored to insure against heat events of many different types. A single stochastic model for the underlying index can be used to price all contracts. We consider contracts with payments that depend on the number of heat waves of a certain type occurring in the measurement period and derive the necessary pricing relations based on a general model structure encompassing several popular temperature models in the literature. An empirical case study is performed using data for Berlin where the daily maximum temperature is used as the underlying index. Model implied heat wave probabilities are consistent with historical patterns, point to high likelihoods for short duration heat events of different threshold temperatures and non-negligible risks for future heat waves of extreme temperatures and durations never before observed.