High resolution x-ray diffraction peaks of diamond nanosize powders of nominal sizes ranging from 5 to 250nm were analyzed and provided information on grain structure, average size of crystallites, and concentration of dislocations. Selected samples were heat treated at 1670K at pressures 2.0 and 5.5GPa or had surface modified by outgassing, heat treatment at vacuum conditions, and by controlled adsorption of gases. The apparent lattice parameter method was applied to characterize the structure of a shell-core model of nanosize particles. The multiple whole profile fitting provided information on crystallite sizes and density of dislocations. Population of dislocations increased with applied pressure, while strain and interplanar distances in the surface layers decreased. Adsorption of foreign gases on the grain surface modified the structure of the surface layers but did not affect dislocations near the center of the grains.