Compact semiconductor light sources with high performance continuous-wave (CW) and single mode operation are highly demanded for many applications in the terahertz (THz) frequency range. Distributed feedback (DFB) and photonic crystal (PhC) quantum cascade (QC) lasers are amongst the leading candidates in this field. Absorbing boundary condition is a commonly used method to control the optical performance of a laser in double-metal confinement. However, this approach increases the total loss in the device and results in a large threshold current density, limiting the CW maximum output power and operating temperature. In this letter, a robust surface emitting continuous wave terahertz QC laser is realized in a two-dimensional PhC structure by a second order Bragg grating extractor that simultaneously provides the boundary condition necessary for mode selection. This results in a 3.12 THz single mode CW operation with a 3 mW output power and a maximum operation temperature (T-max) of 100 K. Also, a highly collimated far-field pattern is demonstrated, which is an important step towards real world applications.