Resources are often sparsely clustered in nature. Thus, foraging animals may benefit from remembering the location of a newly discovered food patch while continuing to explore nearby [1,2]. For example, after encountering a drop of yeast or sugar, hungry flies often perform a local search consisting of frequent departures and returns to the food site [3,4]. Fruit flies, Drosophila melanogaster, can perform this food-centered search behavior in the absence of external stimuli or landmarks, instead relying solely on internal (idiothetic) cues to keep track of their location [5]. This path integration behavior may represent a deeply conserved navigational capacity in insects [6,7], but the neural pathways underlying food-triggered searches remain unknown. Here, we used optogenetic activation to screen candidate cell classes and found that local searches can be initiated by diverse sensory neurons including sugar-sensors, water-sensors, olfactory-receptor neurons, as well as hunger-signaling neurons of the central nervous system. Optogenetically-induced searches resemble those triggered by actual food and are modulated by starvation state. Furthermore, search trajectories exhibit key features of path integration: searches remain tightly centered around the fictive-food site, even during long periods without reinforcement, and flies re-center their searches when they encounter a new fictive-food site. Flies can even perform elaborate local searches within a constrained maze. Together, these results suggest that flies enact local searches in response to a wide variety of food-associated cues, and that these sensory pathways may converge upon a common neural system for path integration. Optogenetically induced local searches in Drosophila can now serve as a tractable system for the study of spatial memory and navigation in insects.