Traditionally, urban areas have been described as sites inhabited by a reduced number of animal species. However, the new spaces created represent a new niche that some species take advantage of. This work characterized the ant community in four different microhabitats in an urban area of Costa Rica. Bait sampling of ants revealed a total of 22 species, 20 of which are native species. Four adjacent areas were sampled: the interior of a building, two green areas, and an ecological reserve. Comparing these four areas, the two green areas showed the greatest similarity, while the building interior was the least similar. The results suggest that urban green areas can serve as reservoirs for native biodiversity.