The structure near the interface of thin YBa2Cu3Ox films (<500 Å) deposited on SrTiO3(001) with laser ablation was revealed utilizing grazing incidence x-ray diffraction. The structure consists of a layer with large crystal mosaicity just above the interface, a c-oriented tetragonal layer with lattice constants a=b=3.883±0.001 Å, and a well textured but strained orthorhombic layer with lattice constants a≂3.887 Å, b≂3.867 Å in the middle, and a thin air-contaminated top layer. The thicknesses of the differently structured layers determined from x-ray reflectivity data are 50±4.7, 20±2.2, 200±5.5, and 12.56±0.14 Å, from the interface to the top layer, respectively. Since there are no additional phases appearing in this system aside from those mentioned, we conclude that the film remains strained at a distance about 300 Å above the interface.