Nematodes comprise a diverse and ubiquitous group, widely used as bioindicators for environmental monitoring. The characterization of nematode assemblages in soils, both arable and undisturbed, promotes the understanding of their ecology, diversity, and contribution to ecosystem functions. The present contribution is the dataset used in the study described in Nematode assemblages in four ecosystems of Parque Nacional del Agua, Costa Rica Applied Soil Ecology, 172, 104360. It contains tables of the estimated abundance of genera and a series of ecological indices (maturity index, plant parasitic index, sigma maturity index, basal index, enrichment index, channel index, structure index, Shannon-Wiener diversity index, and the true diversity) obtained for the nematode assemblages associated with soils of five locations with four different types of ecosystems (primary forest and, derived by conversion of the primary forest, secondary forest, tree plantation and pasture) at the edges of the park in the area of sustainable management of natural resources. Because the provided dataset was obtained following a precise methodological protocol, this contribution will be very useful for later comparative studies of nematode assemblages in tropical and non-tropical habitats.