Numerous applications of liquid crystals rely on control of molecular orientation at an interface. However, little is known about the precise molecular structure of such interfaces. In this work, synchrotron X-ray reflectivity measurements, accompanied by large-scale atomistic molecular dynamics simulations, are used for the first time to reconstruct the air-liquid crystal interface of a nematic material, namely, 4-pentyl-4'-cyanobiphenyl (5CB). The results are compared to those for 4-octyl-4'-cyanobiphenyl (8CB) which, in addition to adopting isotropic and nematic states, can also form a smectic phase. Our findings indicate that the air interface imprints a highly ordered structure into the material; such a local structure then propagates well into the bulk of the liquid crystal, particularly for nematic and smectic phases.