These birds feed mainly on arthropods, in particular insects. They acquire prey by gleaning in shrubs and on tree branches, and by hawking prey that tries to fly away. Other invertebrates and some berries and similar small juicy fruits are also eaten, the latter especially by American yellow warblers in their winter quarters. The yellow warbler is one of several insectivorous bird species that reduce the number of coffee berry borer beetles in Costa Rica coffee plantations by 50%. Caterpillars are the staple food for nestlings, with some – e.g. those of geometer moths (Geometridae) – preferred over others.