Aims. We report estimates of the X-ray coronal size of active galactic nuclei in the lamppost geometry. In this commonly adopted scenario, the corona is assumed for simplicity to be a point-like X-ray source located on the axis of the accretion disc. However, the corona must intercept a number of optical/UV seed photons from the disc consistent with the observed X-ray flux, which constrains its size. Methods. We employ a relativistic ray-tracing code, originally developed by Dovčiak and Done, that calculates the size of a Comptonizing lamppost corona illuminated by a standard thin disc. We assume that the disc extends down to the innermost stable circular orbit of a non-spinning or a maximally spinning black hole. We apply this method to a ...