Information on the diet of endangered species is crucial in conservation, especially for diet specialists. The Fairy Pitta, Pitta nympha, is classified as “vulnerable species” by IUCN. In a field-based study on the nestlings’ diet and parental care, combined with the existing literature, we confirm pitta’s dietary specialization as vermivory and report the effect of rain on the proportion and size of earthworms in the nestlings’ diet. We use the quantitative results, along with the literature on earthworm densities, to speculate that the habitat’s surface area required to supply a pair of the Fairy Pitta with earthworms for the whole breeding event approximately matches the territory (home range) size extracted from the published censuses of the Fairy Pitta. This match highlights the importance of earthworms for the population ecology of the Fairy Pitta. Finally, based on the comparison of earthworm densities in natural and anthropogenic habitats, we hypothesize that spatial mosaic of patches of natural and anthropogenic habitats, with patch sizes based on the Fairy Pitta’s territory size, may mitigate the negative effects of the conversion of natural habitats to anthropogenic habitats on pitta’s population.