The temperature dependence of La0.8Ba0.2CoO3 and La0.8Ca0.2CoO3 perovskite structures was investigated, and the LaCoO3 structure was analyzed at room temperature. These materials were characterized by X-ray absorption spectroscopy (XAS) at the cobalt K-edge, and both the X-ray absorption near edge structure (XANES) and extended X-ray absorption fine structure (EXAFS) data were analyzed. The correlated Einstein model was used in the EXAFS data analysis. These materials were prepared by the combustion method. The structures of LaCoO3 at room temperature and of the Ca2+- and Ba2+-doped samples in the temperature range of 50K–298K the CoO6 octahedron have a distorted monoclinic I2/a symmetry. However, the Ba2+-doped sample the CoO6 octahedron has a slightly distorted rhombohedral R-3c symmetry at 50K, 220K and 260K. The La0.8Ca0.2CoO3 structure does not vary much with temperature and has a more distorted Co octahedron and higher local thermal disorder.